NVHPC - multiple definitions of main
Posted: Fri Feb 04, 2022 9:20 pm
We have NVHPC 21.9 and CUDA 11.4 on our CentOS 7.8 cluster. I'm using the following configure command for 5.0.3 according to the instructions:
I ran "make core". There were some bugs that I had to sort out, which are not critical (I can elaborate on that later). At the "Linking yambo" stage, I got this error:
I found two other posts on this issue from 2011 but they were using Intel compilers and -nofor-main is not recognized by nvc/fortran.
Thank you in advance for any suggestions.
Code: Select all
./configure FC=nvfortran F77=nvfortran CC=nvc CPP="gcc -E -P" FPP="gfortran -E -P -cpp" --enable-open-mp --enable-par-linalg --enable-hdf5-par-io --enable-slepc-linalg --enable-cuda="cuda11.4,cc70"
Code: Select all
driver.o: In function `main':
/home/ejf5wk/yambo/5.0.3_rs7wz/lib/yambo/driver/src/driver/driver.c:36: multiple definition of `main'
/sfs/applications/202112_build/software/standard/core/nvhpc/21.9/Linux_x86_64/21.9/compilers/lib/f90main.o:nvcsdZ121AEfFQ7.ll:(.text+0x0): first defined here
/sfs/applications/202112_build/software/standard/core/nvhpc/21.9/Linux_x86_64/21.9/compilers/lib/f90main.o: In function `main':
nvcsdZ121AEfFQ7.ll:(.text+0x2f): undefined reference to `MAIN_'
pgacclnk: child process exit status 1: /bin/ld
make: *** [yambo] Error 2
Thank you in advance for any suggestions.