目录

CPMD

目录
misaraty 更新 | 2022-01-25
前言
集群环境:Intel CPU + MKL + Intel MPI + Intel FFTW

安装

  1. 申请CPMD许可证,学术机构免费。

  2. 邮件一般一周之内就回复了,下载安装文件和补丁

1
2
3
4
5
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
  1. 运行以下命令查询支持的硬件及编译器类型。
1
./configure.sh PLATFORM
  1. 查看某一支持类型的详细信息。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
./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

  1. 生成MAKEFILE
1
./configure.sh LINUX-X86_64-INTEL-IMPI-FFTW
  1. 修改MAKEFILE
1
2
FFLAGS = -O2 -I$(MKLROOT)/include/fftw -xHOST -free -I${SRCDIR} -I${OBJDIR}
LFLAGS = -static-intel -mkl=cluster -xHOST -I$(MKLROOT)/include/fftw
  1. 编译安装。
1
2
3
4
5
6
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

          正常结束显示,

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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]#
  1. 修改.bashrc
1
2
# cpmd
export PATH=$PATH:/apps/soft/cpmd4.3/bin

测试

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

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