我刚刚开始学习UPC,并且在运行hello world示例时遇到以下错误:
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
以下是代码:
#include <upc_relaxed.h>
#include <stdio.h>
int main() {
printf("Hello from thread %i/%i\n", MYTHREAD, THREADS);
upc_barrier;
return 0;
}
它编译为:
/usr/local/upc/opt/bin/upcc upcTest.upc -o up
并执行:
/usr/local/upc/opt/bin/upcrun -n 1 up
编译时我也遇到了这个错误:
<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
关于如何解决问题的任何想法?
提前致谢!
答案 0 :(得分:3)
HCA代表主机通道适配器,它只是各种网络类型的适配器的技术术语,尤其是InfiniBand。如果您的系统未启用InifiniBand,则不存在HCA。如果是这种情况,您应该使用其他网络类型,例如如果在仅具有以太网连接的群集上运行,则udp
;如果在单个多核/多串口节点上运行,则smp
。
网络类型由-network=<type>
的{{1}}选项指定。运行upcc
以获取可用网络类型列表并阅读文档以查看可在您拥有的硬件上使用哪些文档。