Page 1 of 1

Linking error in Yambo > 4.5.0 with CUDA

Posted: Sun Jan 10, 2021 4:08 am
by Yadong Wei
Dear developers:
I tried to install yambo-4.5.0 parallel with GPUs. Everything went fine when compiling libraries, but I got error when linking Yambo. This error occurs in Yambo-4.5.0, 4.5.3 and 5.0.0 released in github. First it shows warning:

Code: Select all

nvlink warning : Skipping incompatible '/home/pwmat/yambo-master/lib/libbse.a' when searching for -lbse
nvlink warning : Skipping incompatible '/home/pwmat/yambo-master/lib/libacfdt.a' when searching for -lacfdt
...
(actually nearly every just compiled library: -lbse, -lqp, -ltddft, et.al)
Then the error:

Code: Select all

driver.o: In function `main':
/home/pwmat/yambo-master/lib/yambo/driver/src/driver/driver.c:50: undefined reference to `tool_init'
/home/pwmat/yambo-master/lib/yambo/driver/src/driver/driver.c:54: undefined reference to `options_maker'
/home/pwmat/yambo-master/lib/yambo/driver/src/driver/driver.c:58: undefined reference to `command_line'
/home/pwmat/yambo-master/lib/yambo/driver/src/driver/driver.c:62: undefined reference to `launcher'
/home/pwmat/yambo-master/lib/yambo/driver/src/driver/driver.c:66: undefined reference to `input_file'
pgacclnk: child process exit status 1: /usr/bin/ld
It seems that the code needs to be compiled with 32-bit pgcc, but it is deprecated since PGI-2017 release.
PGI 2017 is only available for 64-bit operating systems and does not include the ability to compile 32-bit applications for execution on either 32- or 64-bit operating systems.
So is that mean I have to use PGI before 2016 to make yambo properly? Is there any proper environments for a successful compilation for GPU-accelerated Yambo?
My environment includes:
1. Cuda-11.1 with Nvidia-driver V455.45.01
2. Nvidia HPC SDK (PGI version 20.11 LLVM 64-bit) pgfortran and pgcc
3. openmpi-4.0.1
4. CentOS 7.9 (Linux 3.10.0-1160.11.1.el7.x86_64)
And config.log file attached.

Re: Linking error in Yambo > 4.5.0 with CUDA

Posted: Sun Jan 10, 2021 10:05 am
by Daniele Varsano
Dear Yadong,
So is that mean I have to use PGI before 2016 to make yambo properly?
No, I have successfully compiled using:

cuda/10.2
hpc-sdk/2020
spectrum_mpi/10.3.1

./configure FC=pgf90 F77=pgfortran CPP=cpp -E CC=pgcc MPIFC=mpipgifort MPIF77=mpipgifort MPICC=mpipgicc --enable-cuda=cuda10.2,cc70 --enable-mpi --enable-open-mp

using:
cuda/10.2
Nvidia hpc-sdk/2020
spectrum_mpi/10.3.1

I hope others can provide you more advises,
Best,
Daniele

Re: Linking error in Yambo > 4.5.0 with CUDA

Posted: Sun Jan 10, 2021 10:19 am
by andrea.ferretti
Dear Yadong,

this is just to confirm that 64 bit compilation is totally ok and that you can/should consider the newest version of the pgi/nv-sdk compilers (surely PGI 2019 and nv 2020 should do).

Coming to your problem: I see you are compiling with cc60 (P100 cards ?). Is this wanted ? Otherwise which cards are you targeting ?
The issue raised when linking (incompatibility) may arise when there are some unclean left overs from previous incompatible compilations (or attempts of).
Did you issue make distclean before trying again (I guess you did, but just to checkout out all options coming to mind).

last comment: did you also try with cuda 10.x ?

take care
Andrea