Question

I just started learning UPC and I'm getting the following error when running an hello world example:

GASNet gasnetc_init returning an error code: GASNET_ERR_RESOURCE (Problem with requested resource)
at /home/dx/Downloads/berkeley_upc-2.14.2/gasnet/vapi-conduit/gasnet_core.c:1422
reason: unable to open any HCA ports

Here's the code:

#include <upc_relaxed.h>
#include <stdio.h>

int main() {
   printf("Hello from thread %i/%i\n", MYTHREAD, THREADS);
   upc_barrier;
   return 0;
}

it was compiled with:

/usr/local/upc/opt/bin/upcc upcTest.upc -o up 

and executed with:

/usr/local/upc/opt/bin/upcrun -n 1 up

When compiling I also got this error:

<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition

Any idea on how to solve the problem?

Thanks in advance!

Was it helpful?

Solution

HCA stands for Host Channel Adapter which is just the technical term for adapters for various network types, most notably for InfiniBand. If your system is not InifiniBand enabled then no HCAs are present. If this is the case you should be using another network type, e.g. udp if runing on a cluster with Ethernet-only connectivity or smp if running on a single multicore/multisocket node.

The network type is specified by the -network=<type> option to upcc. Run upcc -version to get the list of available network types and read the docs to see which one can be used on the hardware you have.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top