wget http://mirrors.ustc.edu.cn/gnu/gsl/gsl-2.5.tar.gz
tar -xzvf gsl-2.5.tar.gz
cd gsl-2.5/
## load gcc7
./configure --prefix=/usr/local/gsl
make -j4
sudo make -j4 install
## Environment variables
export PATH=/usr/local/gsl/bin:$PATH
export LD_LIBRARY_PATH=usr/local/gsl/lib:$LD_LIBRARY_PATH
wet https://gitlab.com/libxc/libxc/-/archive/5.1.7/libxc-5.1.7.tar.gz
tar -xvf libxc-5.1.7.tar.gz
cd libxc-5.1.7
## load gcc7
autoreconf -i
./configure --prefix=/usr/local/libxc --enable-shared
make -j4
sudo make install -j4
## Environment variables
export PATH=/usr/local/libxc/bin:$PATH
export LD_LIBRARY_PATH=usr/local/libxc/lib:$LD_LIBRARY_PATH
/usr/local/fftw-338-gcc7.all
wget ftp://ftp.fftw.org/pub/fftw/fftw-3.3.8.tar.gz
tar -zxvf fftw-3.3.8.tar.gz
cd fftw-3.3.8/
su root
## load gcc7
./configure --enable-shared --prefix=/usr/local/fftw-338-gcc7.all
make -j 4 && make -j 4 install && make clean
./configure --enable-shared --enable-single --prefix=/usr/local/fftw-338-gcc7.all
make -j 4 && make -j 4 install && make clean
./configure --enable-shared --enable-long-double --prefix=/usr/local/fftw-338-gcc7.all
make -j 4 && make -j 4 install && make clean
./configure --enable-shared --enable-float --prefix=/usr/local/fftw-338-gcc7.all
make -j 4 && make -j 4 install && make clean
## Environment variables
export PATH=/usr/local/fftw-338-gcc7.all/bin:$PATH
export PKG_CONFIG_PATH=/usr/local/fftw-338-gcc7.all/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/usr/local/fftw-338-gcc7.all/lib:$LD_LIBRARY_PATH
wget https://github.com/shankar1729/jdftx/archive/v1.6.0.tar.gz
tar -xvf v1.6.0.tar.gz
cd jdftx-1.6.0
mkdir build
cd build
## load gcc7
# load intel oneapi
MPIBIN=/home/ywmu/backup/opt/mpi/2021.4.0/bin
FFTWROOT=/usr/local/fftw-338-gcc7.all
CC="$MPIBIN/mpicc -fPIC" FC=$MPIBIN/mpiifort CXX="$MPIBIN/mpicxx -fPIC" cmake -D EnableCUDA=no -D EnableProfiling=yes -D EnableMKL=yes -D MKL_PATH=$MKLROOT -D ForceFFTW=yes -D ThreadedBLAS=no -D GSL_PATH=/usr/local/gsl -D EnableLibXC=yes -D LIBXC_PATH=/usr/local/libxc -D FFTW3_PATH=$FFTWROOT -D FFTW3_THREADS_LIBRARY=$FFTWROOT/lib/libfftw3f.a -D CMAKE_INCLUDE_PATH=$FFTWROOT/include ../jdftx
make -j4
cd pseudopotentials
make -j4
cd ..
cd test
make -j4 test
cd ..
mkdir ../compile
mkdir ../compile/bin ../compile/lib
cp -r pseudopotentials doc ../compile/
cp libjdftx.so ../compile/lib
cp /usr/local/libxc/lib/libxc.so.9.1.7 ../compile/lib/libxc.so.9
cp /usr/local/gsl/lib/libgsl.so.23.1.0 ../compile/lib/libgsl.so.23
cp jdftx phonon wannier ../compile/bin
cp -r ../jdftx/scripts ../compile/
cd ../compile/bin
ln -s ../pseudopotentials pseudopotentials
## Environment variables
# load intel OneAPI
export JDHOME=${soft_root}/jdftx
export PATH=$JDHOME/bin:$JDHOME/scripts:$PATH
export LD_LIBRARY_PATH=$JDHOME/lib:$LD_LIBRARY_PATH
export JDFTx_pseudo==$JDHOME/pseudopotentials
wget https://github.com/shankar1729/jdftx/archive/v1.6.0.tar.gz
tar -xvf v1.6.0.tar.gz
cd jdftx-1.6.0
mkdir build
cd build
## load gcc7
# load intel 2015 (MKL+MPI)
# load CUDA 9.2
MPIBIN=/opt/intel2015/impi/5.0.1.035/intel64/bin
FFTWROOT=/usr/local/fftw-338-gcc7.all
CC="$MPIBIN/mpicc -fPIC" FC=$MPIBIN/mpiifort CXX="$MPIBIN/mpicxx -fPIC" cmake -D EnableCUDA=yes -D EnableProfiling=yes -D EnableMKL=yes -D MKL_PATH=$MKLROOT-D CUDA_ARCH=compute_60 -D CUDA_CODE=sm_60 -D ForceFFTW=yes -D ThreadedBLAS=no -D EnableMPI=yes -D CudaAwareMPI=no -D GSL_PATH=/usr/local/gsl -D EnableLibXC=yes -D LIBXC_PATH=/usr/local/libxc -D FFTW3_PATH=$FFTWROOT -D FFTW3_THREADS_LIBRARY=$FFTWROOT/lib/libfftw3f.a -D CMAKE_INCLUDE_PATH=$FFTWROOT/include ../jdftx
## compute_60 and sm_60 GPU Card 1080Ti
make -j4
## load gcc7
# load intel MKL
# load GPU aware OpenMPI
# load CUDA 9.2
MPIBIN=path of OpenMPI
FFTWROOT=/usr/local/fftw-338-gcc7.all
CC="$MPIBIN/mpicc -fPIC" FC=$MPIBIN/mpiifort CXX="$MPIBIN/mpicxx -fPIC" cmake -D EnableCUDA=yes -D EnableProfiling=yes -D EnableMKL=yes -D MKL_PATH=$MKLROOT-D CUDA_ARCH=compute_60 -D CUDA_CODE=sm_60 -D ForceFFTW=yes -D ThreadedBLAS=no -D EnableMPI=yes -D CudaAwareMPI=yes -D GSL_PATH=/usr/local/gsl -D EnableLibXC=yes -D LIBXC_PATH=/usr/local/libxc -D FFTW3_PATH=$FFTWROOT -D FFTW3_THREADS_LIBRARY=$FFTWROOT/lib/libfftw3f.a -D CMAKE_INCLUDE_PATH=$FFTWROOT/include ../jdftx
## compute_60 and sm_60 GPU Card 1080Ti
make -j4
https://gitmemory.cn/repo/shankar1729/jdftx/issues/195
Yep, you are using IntelMPI which does not support direct transfers between NVIDIA GPUs. To continue to use this MPI, recompile with CudaAwareMPI=No. Note that this will involve additional CPU-GPU transfers during MPI operations and will have higher communication overhead.
Alternatively, consider using a cuda-aware build of OpenMPI. Note that the OS package manager versions of openmpi typically do not include this support by default and you will typically need to build it locally.
Best, Shankar