源代码和必需的依赖
QmQbo3MMqHwtqCzcMLU2Atot4ivsZe9Xtx6cjs1HgZX8j9 octopus-11.2/fftw-3.3.4.tar.gz
QmQvYnKGW9zR1eoLJvuNveTi86GevZpXAtj9gL9dFkD9zJ octopus-11.2/gsl-1.16.tar.gz
QmXBrGqZsrCJq86bWhdtWYhmXAf6RJUgCedxpXxLzwtqYy octopus-11.2/libxc-5.2.2.tar.gz
QmY7Yk3QtQEEY9UdQA1w4UHV39JGJNJgdZa6EVVt9pBTip octopus-11.2/octopus-11.2.tar.gz
QmU496ystHdbLnocGPJAZdcYdZZQJmtVW6n98ktxy2iy3d octopus-11.2
配置编译环境,octopus需要支持C++14的编译器,
. /opt/intel/oneapi/setvars.sh
确认编译器版本
icc --version
icc (ICC) 2021.5.0 20211109
which mpirun
/opt/intel/oneapi/mpi/2021.5.1/bin/mpirun
配置MKL
. /opt/intel/mkl/bin/mklvars.sh intel64
echo $MKLROOT
/opt/intel/compilers_and_libraries_2020.1.217/linux/mkl
安装依赖
tar xf gsl-1.16.tar.gz
./configure --prefix=/opt/app/octopus/11.2 CC=icc FC=ifort CFLAGS='-std=c99'
make -j
注意:这个版本的fftw用oneapi编译会失败,使用GCC编译
tar xf fftw-3.3.4.tar.gz
./configure --prefix=/opt/app/octopus/11.2
make -j
tar xf libxc-5.2.2.tar.gz
./configure --prefix=/opt/app/octopus/11.2 CC=icc FC=ifort CFLAGS='-std=c99'
make -j
编译octopus 11.2, 11.4版本编译不通过
tar xf octopus-11.2.tar.gz
./configure --prefix=/opt/app/octopus/11.2 CC=mpiicc FC=mpiifort \
FCFLAGS="-L${MKLROOT}/lib/intel64 -liomp5 -lpthread -ldl -qmkl=parallel" \
CXX=mpiicpc CXXFLAGS='-std=c++14' \
--with-libxc-prefix=/opt/app/octopus/11.2 \
--with-gsl-prefix=/opt/app/octopus/11.2 \
FCFLAGS_FFTW="-I/opt/app/octopus/11.2/include" --enable-mpi
make -j
GPU版本编译,必须这么configure
./configure --prefix=/opt/app/octopus/11.2 CC=mpiicc FC=mpiifort FCFLAGS="-L${MKLROOT}/lib/intel64 -liomp5 -lpthread -ldl -qmkl=parallel" CXX=mpiicpc CXXFLAGS='-std=c++14' --with-libxc-prefix=/opt/app/octopus/11.2 --with-gsl-prefix=/opt/app/octopus/11.2 FCFLAGS_FFTW="-I/opt/app/octopus/11.2/include" --enable-mpi --enable-cuda CFLAGS="-L/opt/app/cuda/11.2/targets/x86_64-linux/lib -L/opt/app/cuda/11.2/targets/x86_64-linux/lib/stubs" --with-cuda-prefix=/opt/app/cuda/11.2
找不到-lcuda
./configure --prefix=/opt/app/octopus/11.2 CC=mpiicc FC=mpiifort FCFLAGS="-L${MKLROOT}/lib/intel64 -liomp5 -lpthread -ldl -qmkl=parallel" CXX=mpiicpc CXXFLAGS='-std=c++14' --with-libxc-prefix=/opt/app/octopus/11.2 --with-gsl-prefix=/opt/app/octopus/11.2 FCFLAGS_FFTW="-I/opt/app/octopus/11.2/include" --enable-mpi --enable-cuda LDFLAGS="-L/opt/app/cuda/11.2/targets/x86_64-linux/lib -L/opt/app/cuda/11.2/targets/x86_64-linux/lib/stubs"
找不到header
./configure --prefix=/opt/app/octopus/11.2 CC=mpiicc FC=mpiifort FCFLAGS="-L${MKLROOT}/lib/intel64 -liomp5 -lpthread -ldl -qmkl=parallel" CXX=mpiicpc CXXFLAGS='-std=c++14' --with-libxc-prefix=/opt/app/octopus/11.2 --with-gsl-prefix=/opt/app/octopus/11.2 FCFLAGS_FFTW="-I/opt/app/octopus/11.2/include" --enable-mpi --enable-cuda CFLAGS="-L/opt/app/cuda/11.2/targets/x86_64-linux/lib -L/opt/app/cuda/11.2/targets/x86_64-linux/lib/stubs"