I am trying to compile GPU version of abinit-8.10.2 with this configuration:
Code: Select all
./configure --enable-mpi='yes' FC=mpif90 CC=mpicc FCFLAGS="-O2" CUDA_ROOT="/
usr/local/cuda" NVCC="$CUDA_ROOT/bin/nvcc" PWDloc=`echo $PWD` --enable-gpu='yes' --with-gpu-flavor=cuda-single --with-gpu-libs="-L/usr/local/cuda/lib64 -lcublas -lcufft -lcudart -lstdc++" --with-gpu-incs="-I/usr/local/cuda/include" NVCC_CPPFLAGS="-DHAVE_CUDA_SDK" NVCC_CFLAGS="-O2 -arch=sm_30 -Xptxas=-v --use_fast_math --compiler-options -O3,-Wall,-fPIC,-g -I/usr/local/cuda/include -I${PWDloc}/../src/incs"
The configuration step success with 0 error. But when I was doing the next step "make" , it failed with following informations:
Code: Select all
/4.8.5/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../.. -lmpi_usempi -lmpi_mpifh -lmpi -lgfortran -lm -lquadmath -lpthread ../../src/28_numeric_noabirule/lib28_numeric_noabirule.a(m_abi_linalg.o): In function `__m_abi_linalg_MOD_
gpu_xorthonormalize':/home/zhouzy/softwares/abinit/abinit-8.10.2/src/28_numeric_noabirule/abi_gpu_linalg.f90:523: undefined ref
erence to `gpu_xgemm_'../../src/28_numeric_noabirule/lib28_numeric_noabirule.a(m_abi_linalg.o): In function `__m_abi_linalg_MOD_
gpu_xorthonormalize':m_abi_linalg.F90:(.text+0x944): undefined reference to `copy_from_gpu_'
m_abi_linalg.F90:(.text+0x9b4): undefined reference to `copy_on_gpu_'
m_abi_linalg.F90:(.text+0xa26): undefined reference to `gpu_xtrsm_'
m_abi_linalg.F90:(.text+0xce6): undefined reference to `copy_from_gpu_'
../../src/28_numeric_noabirule/lib28_numeric_noabirule.a(m_abi_linalg.o): In function `__m_abi_linalg_MOD_
abi_linalg_finalize':m_abi_linalg.F90:(.text+0x5c66): undefined reference to `gpu_linalg_shutdown_'
../../src/28_numeric_noabirule/lib28_numeric_noabirule.a(m_abi_linalg.o): In function `__m_abi_linalg_MOD_
abi_linalg_init':m_abi_linalg.F90:(.text+0x60c3): undefined reference to `gpu_linalg_init_'
collect2: error: ld returned 1 exit status
make[3]: *** [conducti] Error 1
make[3]: Leaving directory `/home/zhouzy/softwares/abinit/abinit-8.10.2/src/98_main'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/zhouzy/softwares/abinit/abinit-8.10.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/zhouzy/softwares/abinit/abinit-8.10.2'
make: *** [all] Error 2
I found that 'gpu_xgemm', 'copy_from_gpu', 'copy on gpu',... these functions are defined in m_abi_linalg.F90 this file. They are not outer libs. I have no idea why these functions are undefined reference.
P.S. My cuda version is v10.0.130. openmpi is 4.0.0. GPU card is Tesla K20c.
Please help. Thanks a lot.
Wish you have a nice day.