JDFTx 安装
- *cmake、gcc和intel编译器安装步骤不再赘述。 *
gsl 安装
1 | wget http://mirrors.ustc.edu.cn/gnu/gsl/gsl-2.5.tar.gz |
2 | tar -xzvf gsl-2.5.tar.gz |
3 | cd gsl-2.5/ |
4 | ./configure --prefix=/home/lyh/gsl |
5 | make -j 12 |
6 | make -j 12 install |
7 | |
8 | echo 'export PATH=/home/lyh/libxc/bin:$PATH' >> ~/.bashrc |
9 | echo 'export LD_LIBRARY_PATH=/home/lyh/libxc/lib:$LD_LIBRARY_PATH' >> ~/.bashrc |
10 | source ~/.bashrc |
libxc 安装
1 | wget http://www.tddft.org/programs/libxc/down.php?file=5.0.0/libxc-5.0.0.tar.gz |
2 | mv down.php\?file\=5.0.0%2Flibxc-5.0.0.tar.gz libxc-5.0.0.tar.gz |
3 | tar -zxvf libxc-5.0.0.tar.gz |
4 | ./configure --prefix=/home/lyh/libxc --enable-shared |
5 | make -j 12 |
6 | make check |
7 | make install -j 12 |
8 | |
9 | echo 'export PATH=/home/lyh/libxc/bin:$PATH' >> ~/.bashrc |
10 | echo 'export LD_LIBRARY_PATH=/home/lyh/libxc/lib:$LD_LIBRARY_PATH' >> ~/.bashrc |
11 | |
12 | source ~/.bashrc |
fftw3 安装
1 | wget ftp://ftp.fftw.org/pub/fftw/fftw-3.3.8.tar.gz |
2 | tar -zxvf fftw-3.3.8.tar.gz |
3 | mkdir fftw3 |
4 | cd fftw-3.3.8/ |
5 | ./configure --enable-shared --prefix=/home/lyh/fftw3 |
6 | make -j 12 |
7 | make -j 12 install |
8 | make clean |
9 | |
10 | ./configure --enable-shared --enable-single --prefix=/home/lyh/fftw3 |
11 | make -j 12 |
12 | make -j 12 install |
13 | make clean |
14 | |
15 | ./configure --enable-shared --enable-long-double --prefix=/home/lyh/fftw3 |
16 | make -j 12 |
17 | make -j 12 install |
18 | make clean |
19 | |
20 | ./configure --enable-shared --enable-float --prefix=/home/lyh/fftw3 |
21 | make -j 12 |
22 | make -j 12 install |
23 | make clean |
24 | |
25 | echo 'export PATH=/home/lyh/fftw3/bin:$PATH' >> ~/.bashrc |
26 | echo 'export PKG_CONFIG_PATH=/home/lyh/fftw3/lib/pkgconfig:$PKG_CONFIG_PATH' >> ~/.bashrc |
27 | echo 'export LD_LIBRARY_PATH=/home/lyh/fftw3/lib:$LD_LIBRARY_PATH' >> ~/.bashrc |
28 | echo 'export CBLAS_LIBRARY=/home/lyh/CBLAS/lib:$CBLAS_LIBRARY' >> ~/.bshrc |
blas cblas 安装
1 | wget http://www.netlib.org/blas/blas-3.8.0.tgz |
2 | wget http://www.netlib.org/blas/blast-forum/cblas.tgz |
3 | tar -zxvf blas-3.8.0.tgz |
4 | tar -zxvf cblas.tgz |
5 | cd BLAS-3.8.0/ |
6 | gcc -shared -fPIC -O3 *.f |
7 | ar rv libblas.a *.o |
8 | cd ../CBLAS/ |
9 | cp ../BLAS-3.8.0/libblas.a testing/ |
10 | mv Makefile.in Makefile.in_bak |
11 | ln -s Makefile.LINUX Makefile.in |
12 | vim Makefile.in |
13 | ##修改 |
14 | CFLAGS = -fPIC -O3 -DADD_ |
15 | FFLAGS = -fPIC -O3 |
16 | ##添加 -fPIC 参数 |
17 | make |
18 | ##会生成lib文件夹 |
jdftx 安装
1 | wget https://github.com/shankar1729/jdftx/archive/v1.6.0.tar.gz |
2 | tar -zxvf v1.6.0.tar.gz |
3 | cd jdftx-1.6.0/ |
4 | mkdir build |
5 | cd build |
6 | ------ |
7 | ##使用intel编译 |
8 | CC=icc CXX= icpc cmake \ |
9 | -D EnableCUDA=no \ |
10 | -D GSL_PATH=/home/lyh/gsl \ |
11 | -D ForceFFTW=yes \ |
12 | -D FFTW3_PATH=/home/lyh/fftw3 \ |
13 | -D FFTW3_THREADS_LIBRARY=/home/lyh/fftw3/lib/libfftw3f.a \ |
14 | -D EnableLibXC=yes \ |
15 | -D LIBXC_PATH=/home/lyh/libxc \ |
16 | -D ThreadeBlas=yes \ |
17 | -D CBLAS_PATH=/home/lyh/CBLAS \ |
18 | -D CBLAS_LIBRARY=/home/lyh/CBLAS/lib/cblas_LINUX.a \ |
19 | ../jdftx |
20 | ##使用gcc编译 |
21 | CC=gcc CXX=g++ cmake \ |
22 | -D EnableCUDA=no \ |
23 | -D GSL_PATH=/home/lyh/gsl \ |
24 | -D ForceFFTW=yes \ |
25 | -D FFTW3_PATH=/home/lyh/fftw3 \ |
26 | -D FFTW3_THREADS_LIBRARY=/home/lyh/fftw3/lib/libfftw3f.a \ |
27 | -D EnableLibXC=yes \ |
28 | -D LIBXC_PATH=/home/lyh/libxc \ |
29 | -D CBLAS_PATH=/home/lyh/CBLAS \ |
30 | -D CBLAS_LIBRARY=/home/lyh/CBLAS/lib/cblas_LINUX.a \ |
31 | ../jdftx |
32 | ------ |
33 | make -j 12 |
34 | |
35 | echo 'export PATH="/home/lyh/jdftx-1.6.0/build:/home/lyh/jdftx-1.6.0/jdftx/scripts:$PATH"' >> ~/.bashrc |