我正在尝试编译一组代码。知道为什么我收到错误吗?感谢您的帮助。
upcc -c -O code9xc_sac.upc -I/global/software/sl-7.x86_64/modules/tools/proj.4/4.9.3/include
gcc -c -O2 code7fft.c -funroll-loops -ftree-vectorize
upcc -o xcorupc_sac code9xc_sac.o code7fft.o /global/software/sl-7.x86_64/modules/gcc/7.4.0/fftw/3.3.8-gcc/lib/libfftw3.a /bearbin-data3/home/anayak7/Programs/sac/lib/sacio.a /bearbin-data3/home/anayak7/Programs/sac/lib/libsac.a /usr/local/software/sl-7.x86_64/modules/metis/5.1.0/lib/libmetis.a -I/global/software/sl-7.x86_64/modules/tools/proj.4/4.9.3/include -L/global/software/sl-7.x86_64/modules/tools/proj.4/4.9.3/lib -lproj -lm
upcc: error running '/bin/gmake --no-print-directory' to link application:
/usr/bin/ld: cannot find -libverbs
collect2: error: ld returned 1 exit status
gmake[1]: *** [link] Error 1
make: *** [all] Error 255
编辑:我已经检查了另一台计算机上的代码组。编译成功,代码有效。但是在那台计算机中,我自己从头开始编译了所有依赖库。但是,在这台计算机上,我正在使用软件场中模块中的库。这是行不通的。 这是upcc --version
的输出
-bash-4.2$ upcc --version
This is upcc (the Berkeley Unified Parallel C compiler), v. 2019.4.4
(getting remote translator settings...)
----------------------+---------------------------------------------------------
UPC Runtime | v. 2019.4.4, built on Nov 26 2019 at 10:44:35
----------------------+---------------------------------------------------------
UPC-to-C translator | v. 2.28.0, built on Jul 19 2018 at 20:29:47
| host aphid linux-x86_64/64
| gcc v4.2.4 (Ubuntu 4.2.4-1ubuntu4)
----------------------+---------------------------------------------------------
Translator location | http://upc-translator.lbl.gov/upcc-2019.4.0.cgi
----------------------+---------------------------------------------------------
networks supported | smp udp mpi ibv
----------------------+---------------------------------------------------------
default network | ibv
----------------------+---------------------------------------------------------
pthreads support | available (if used, default is 2 pthreads per process)
----------------------+---------------------------------------------------------
Configured with | '--with-translator=http://upc-translator.lbl.gov/upcc-2
| 019.4.0.cgi' '--enable-segment-large'
| '--with-sptr-packed-bits=20,9,35'
| '--disable-aligned-segments'
| '--prefix=/global/software/sl-7.x86_64/modules/gcc/7.4.
| 0/berkeley_upc/2019.4.4-gcc/opt'
| '--with-multiconf-magic=opt'
----------------------+---------------------------------------------------------
Configure features | trans_bupc,pragma_upc_code,driver_upcc,runtime_upcr,
| gasnet,upc_collective,upc_io,upc_memcpy_async,
| upc_memcpy_vis,upc_ptradd,upc_thread_distance,upc_tick,
| upc_sem,upc_dump_shared,upc_trace_printf,
| upc_trace_mask,upc_local_to_shared,upc_all_free,
| upc_atomics,pupc,upc_types,upc_castable,upc_nb,nodebug,
| notrace,nostats,nodebugmalloc,nogasp,nothrille,
| segment_large,os_linux,cpu_x86_64,cpu_64,cc_gnu,
| packedsptr,upc_io_64
----------------------+---------------------------------------------------------
Configure id | n0009.scs00 Tue Nov 26 10:34:27 PST 2019 sjames
----------------------+---------------------------------------------------------
Binary interface | 64-bit x86_64-unknown-linux-gnu
----------------------+---------------------------------------------------------
Runtime interface # | Runtime supports 3.0 -> 3.13: Translator uses 3.6
----------------------+---------------------------------------------------------
| --- BACKEND SETTINGS (for ibv network) ---
----------------------+---------------------------------------------------------
C compiler | /global/software/sl-7.x86_64/modules/langs/gcc/6.3.0/bi
| n/gcc
| GNU/6.3.0/6.3.0
| gcc (GCC) 6.3.0 Copyright (C) 2016 Free Software
| Foundation, Inc.
----------------------+---------------------------------------------------------
C compiler flags | -O3 --param max-inline-insns-single=35000 --param
| inline-unit-growth=10000 --param
| large-function-growth=200000 -Wno-unused
| -Wunused-result -Wno-unused-parameter -Wno-address
----------------------+---------------------------------------------------------
linker | /global/software/sl-7.x86_64/modules/gcc/6.3.0/openmpi/
| 3.0.1-gcc/bin/mpicc
| GNU/7.4.0/7.4.0
| gcc (GCC) 7.4.0 Copyright (C) 2017 Free Software
| Foundation, Inc.
----------------------+---------------------------------------------------------
linker flags | -D_GNU_SOURCE=1 -O3 --param
| max-inline-insns-single=35000 --param
| inline-unit-growth=10000 --param
| large-function-growth=200000 -Wno-unused
| -Wunused-result -Wno-unused-parameter -Wno-address
| -L/usr/local/software/sl-7.x86_64/modules/berkeley_upc/
| 2019.4.4-gcc-7.4.0/opt/lib -lupcr-ibv-seq -lumalloc
| -L/usr/local/software/sl-7.x86_64/modules/berkeley_upc/
| 2019.4.4-gcc-7.4.0/opt/lib -lgasnet-ibv-seq -libverbs
| -lpthread -lrt
| -L/global/software/sl-7.x86_64/modules/langs/gcc/6.3.0/
| lib/gcc/x86_64-pc-linux-gnu/6.3.0 -lgcc -lm
----------------------+---------------------------------------------------------
这看起来像是一个系统配置问题 - 看起来您已经为InfiniBand网络安装了Berkeley UPC,该网络安装不正确或系统上可能不存在。这可能是通过包管理器安装的结果,而不是从源代码构建,这是安装伯克利UPC的唯一推荐/支持的方法。
如果您只想在本地节点上运行作业,我建议您使用upcc -network=smp
进行编译以启用 smp 环回后端,这不应该依赖于 InfiniBand 库。如果尝试在多节点网络上运行作业,最好的办法是按照安装说明从源代码重建。
注意:StackOverflow的界面对于跟踪这些类型的问题很麻烦。如果这些简单的建议不能解决您的问题,我强烈建议您在伯克利UPC问题跟踪器上提交错误报告,我们可以帮助您从那里进一步跟踪它。如果做不到这一点,发送到"upc-users AT lbl.gov"列表的电子邮件将是一个更好的诊断论坛。