upc

Berkeley UPC compiler error upcc: error running '/bin/gmake --no-print-directory' to link application


I am trying to compile a group of codes. Any idea why I am getting an error ? Thanks for your help.

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

EDIT: I have checked the group of codes on a different computer. The compilation is successful and the codes work. But in that computer I have compiled all the dependent libraries myself from scratch. However, on this computer I am using libraries from modules in the software farm. This is not working. This is the output from 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
----------------------+---------------------------------------------------------

Solution

  • This looks like a system configuration issue - it appears you have Berkeley UPC installed for an InfiniBand network that is either improperly installed or possibly absent on your system. This may be a result of installation via a package manager, instead of building from source which is the only recommended/supported means for installing Berkeley UPC.

    If all you want is to run jobs on the local node, I'd recommend compiling with upcc -network=smp to enable the smp loopback backend, which should not depend on the InfiniBand libraries. If you are trying to run jobs on a multi-node network, your best bet is to rebuild from source, following the install instructions.

    NOTE: StackOverflow's interface is cumbersome for tracking down these types of issues. If these simple suggestions don't solve your problem, I'd highly recommend submitting a bug report at the Berkeley UPC issue tracker, and we can help you track it down further from there. Failing that, email to the "upc-users AT lbl.gov" list would be a better forum for diagnosing.