CPMD

安装

集群环境:intel处理器 + mkl + intel mpi + intel fftw。

1 申请cpmd许可证,学术机构免费;

2 邮件一般一周之内就回复了,下载相关安装文件,并打补丁;

patch -p0 < patch.to.4612
patch -p0 < patch.to.4615
patch -p0 < patch.to.4616
patch -p0 < patch.to.4621
patch -p0 < patch.to.4624

3 运行以下命令查询支持的硬件及编译器类型,

./configure.sh PLATFORM

4 查看某一支持类型的详细信息,

./configure.sh -i LINUX-X86_64-INTEL
 Configuration to build a serial cpmd executable for x86_64 using 
 the INTEL Fortran compiler.

./configure.sh -i LINUX-X86_64-INTEL-IMPI-FFTW
 Configuration to build a parallel cpmd executable for a 
 Xeon Phi x86_64 machine using INTEL Fortran compiler 
 version 16/17 or later, intelMPI and MKL.
 
./configure.sh -i LINUX-X86_64-INTEL-MPI
 Configuration to build a serial cpmd executable for x86_64 using 
 the INTEL Fortran compiler.
 
./configure.sh -i LINUX-X86_64-INTEL-MPI-FFTW
 Configuration to build a parallel cpmd executable for x86_64 using 
 the INTEL Fortran compiler version 12 or later.

集群上选择LINUX-X86_64-INTEL-IMPI-FFTW;

5 生成MAKEFILE;

./configure.sh LINUX-X86_64-INTEL-IMPI-FFTW

6 修改MAKEFILE;

FFLAGS = -O2 -I$(MKLROOT)/include/fftw -xHOST -free -I${SRCDIR} -I${OBJDIR}
LFLAGS = -static-intel -mkl=cluster -xHOST -I$(MKLROOT)/include/fftw

7 编译安装;

make -j 20

# 查看物理CPU个数
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l

# 查看每个物理CPU中core的个数(即核数)
cat /proc/cpuinfo| grep "cpu cores"| uniq

# 查看逻辑CPU的个数
cat /proc/cpuinfo| grep "processor"| wc -l

正常结束;

a - mts_utils.mod.o
a - interface_utils.mod.o
a - my_para.o
a - compress.o
a - sysdepend.o
a - c_mem_utils.o
/usr/bin/ranlib /apps/soft/cpmd/cpmd4.3//lib/libcpmd.a
mpiifort -cpp -O2 -I/apps/soft/intel2017/compilers_and_libraries_2017.5.239/linux/mkl/include/fftw -xHOST -free -I/apps/soft/cpmd/cpmd4.3/src -I/apps/soft/cpmd/cpmd4.3//obj -o /apps/soft/cpmd/cpmd4.3//bin/cpmd.x timetag.o cpmd.o /apps/soft/cpmd/cpmd4.3//lib/libcpmd.a -static-intel -mkl=cluster -xHOST -I/apps/soft/intel2017/compilers_and_libraries_2017.5.239/linux/mkl/include/fftw 
-rwxr-xr-x 1 root root 81526192 Jul  8 09:15 /apps/soft/cpmd/cpmd4.3//bin/cpmd.x
Compilation done.
make[1]: Leaving directory `/apps/soft/cpmd/cpmd4.3/obj'
[root@master cpmd4.3]#

8 修改.bashrc。

# cpmd
export PATH=$PATH:/apps/soft/cpmd4.3/bin

测试

下载测试包cpmd-test.tar.gz,在~/tddft文件夹下运行,

mpirun -n 20 cpmd.x inp-1 > test_out1.log