Skip to content

Instantly share code, notes, and snippets.

@HuangJiaLian
Created October 5, 2020 10:56
Show Gist options
  • Save HuangJiaLian/a1ef4cfb82a4a3b995f416a0ba7be11a to your computer and use it in GitHub Desktop.
Save HuangJiaLian/a1ef4cfb82a4a3b995f416a0ba7be11a to your computer and use it in GitHub Desktop.
并行LAMMPS提交脚本
#!/bin/bash -l
#PBS -N lmpExampleYY
#PBS -l nodes=1:ppn=20
#PBS -j oe
cd $PBS_O_WORKDIR
########## No Need To Change The Line Above #################
in_lmp=in.vacf.2d
mpirun --mca btl '^openib' lmp_mpi -in $in_lmp
@HuangJiaLian
Copy link
Author

另外并行的CP2K提交脚本也放在这里供参考:

#!/bin/bash -l
#PBS -N HBond
#PBS -l nodes=1:ppn=20
#PBS -j oe
cd $PBS_O_WORKDIR
########## No Need To Change The Line Above #################

inp_cp2k="inp"
out_cp2k="8w_bk.out"
mpirun --mca btl '^openib'  cp2k.popt -i $inp_cp2k -o $out_cp2k

@HuangJiaLian
Copy link
Author

你好,在集群上面配置并行计算很困难。主要是由于需要手动编译并行软件。

首先必须要软件本身支持并行计算,例如LAMMPS, CP2K。
没有专门为并行计算编写的fortarn和Python程序一般是没有办法并行计算的。

由于集群上原本的软件都多年没有更新,另外我们一般用户都没有管理员权限。
因此我是这样操作的:

重新编译MPI
重新编译并行的LAMMPS (原本集群上的好像不行了。这一步需要手动编译安装很多的其他支持库)
然后用PBS脚本多核计算。 下面是我的提交脚本。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment