TDDFT软件 octopus 编译

准备工作

我们在某个主目录中进行编译, 首先创建一个目录

# 创建一个你喜欢的目录
mkdir /home/huahua/program/build_octopus_intel
basedir=/home/huahua/program/build_octopus_intel/

我们使用mpiicc, mpiifort和mkl,以及以下文件

gsl-2.6.tar.gz  libxc-4.3.4.tar.gz  octopus-9.2.tar.gz

我这里用的我们组的超算intel parallel studio 2016 update2 一套。

我们从mkl中调用blas, lapack, fftw等库,如果你的mkl中没有编译fftw3xf
尝试进入/opt/intel/mkl/interfaces/fftw3xf/文件夹
执行

cd /opt/intel/mkl/interfaces/fftw3xf/
#也可能是 cd /opt/intel2016/mkl/interfaces/fftw3xf/
#也可能是 cd /xxxx/parallel_studio_xe_2016_update2/mkl/interfaces/fftw3xf/
make libintel64

分别解压gsl, libxc, octopus到主目录
此时,/home/huahua/program/build_octopus_intel/目录下有gsl-2.6, libxc-4.3.4, octopus-9.2等文件夹

编译

# 编译gsl
cd gsl-2.6
./configure CC=mpiicc --prefix=${basedir} --disable-shared --enable-static
make
make install
cd ..

# 编译libxc
cd libxc-4.3.4
./configure --prefix=${basedir}  CC=mpiicc FC=mpiifort
make
make install
cd ..

# 编译octopus
cd octopus-9.2
./configure --prefix=${basedir} --with-gsl-prefix=${basedir} --with-libxc-prefix=${basedir} --with-blas="-L$MKL_DIR -Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread" --with-blacs="$MKL_DIR/libmkl_blacs_intelmpi_lp64.a" --with-scalapack="$MKL_DIR/libmkl_scalapack_lp64.a" FCFLAGS="-mkl -u -zero -fpp1 -nbs -pc80 -pad -align -unroll -O3 -ip -tpp7 -xW" CC=mpiicc FC=mpiifort
# 注1:上边这行贼长,三击鼠标左键选中吧
# 注2:虽然octopus官网说with-blas已经包含了lapack,但实际上并不能行,我在FCFLAGS中添加了"-mkl"。
make
make install

# 此时 ${basedir}/bin中就包含了gsl, xc以及octopus的相关组件。

参考链接

https://octopus-code.org/wiki/Manual:Building_from_scratch
https://octopus-code.org/wiki/Manual:Appendix:Porting_Octopus_and_Platform_Specific_Instructions

posted @ 2020-04-19 20:18  花花今天没吃药  阅读(1155)  评论(2编辑  收藏  举报