[lammps-users] How can I run PIMD simulation using GPU

Dear lammps users and developers,

I want to performe PIMD simulations using GPU, and is there any related tutorials ? I have compiled the gpu version of lammps, and obtained the executable lmp but not lmp_mpi. Could I run pimd by using: mpirun -np 20 lmp -partition 20x1 -in in.nvt.lammps > lmp.nvt.log ? I am looking forward to your help, and thanks very much!

Best
Jinfeng

Have you tried it?

Yes, I tried. But it seems not work, as the temperature of the system always rises up sharply. According to my knowledge, lmp is serial, could it be used with mpirun ? I am confused about this. What should I do to make it work properly ? Thanks for your help !

Best,
Jinfeng

Yes, I tried. But it seems not work, as the temperature of the system always rises up sharply. According to my knowledge, lmp is serial, could it be used with mpirun ? I am confused about this. What should I do to make it work properly ? Thanks for your help !

your knowledge is incorrect. whether the “lmp” executable has been compiled for serial or parallel can be easily seen from running it with the -h flag.
after the command line summary, there should be a section with information about OS, compiler and MPI library, for example a parallel compilation would show:

OS: Linux 5.11.11-100.fc32.x86_64 on x86_64

Compiler: GNU C++ 10.2.1 20201125 (Red Hat 10.2.1-9) with OpenMP 4.5
C++ standard: C++14
MPI v3.1: MPICH Version: 3.3.2
MPICH Release date: Tue Nov 12 21:23:16 CST 2019
MPICH ABI: 13:8:1

a serial compilation would show instead:

OS: Linux 5.11.11-100.fc32.x86_64 on x86_64

Compiler: GNU C++ 10.2.1 20201125 (Red Hat 10.2.1-9) with OpenMP not enabled
C++ standard: C++14
MPI v1.2: LAMMPS MPI STUBS for LAMMPS version 24 Dec 2020

furthermore, you cannot run in multi-partition mode with a serial executable.

that your temperature rises can have many reasons. do you get the same behavior when running without enabling the GPU package pair styles?

axel.

i canot help you with that. you are using a modified non-standard LAMMPS version (technically this must not even be called LAMMPS).
you have to contact the authors of this version for help.

axel.

Please check out the LAMMPS manual and examples. There is plenty of information there.
You won’t learn how to use a software from a single input file.

Axel.

Dear Axel,

Thanks for your help. Do you have one in.lammps file for pimd simulation that I can refer to ? As this is my first time to perform pimd simulation using lammps, and I am not familiar with the style of the in.lammps file. I am going to test it first by using a proper potential in lammps, to make sure that each setting is correct in the in-file. Thanks again!

Best,
Jinfeng

Dear Axel,

Thanks for your clear explanation. I have checked, and my lmp executable is a parallel version. I have not tried it without enabling the GPU package pair styles. Actually, I am trying to use the deep potential to perform pimd. My in.lammps file is as the following:

# bulk water

units metal
boundary p p p
atom_style atomic
atom_modify map yes

neighbor 2.0 bin
neigh_modify every 10 delay 0 check no

read_data water.lmp
mass 1 16
mass 2 1

pair_style deepmd graph1.pb
pair_coeff

variable ibead uloop 20 pad
velocity all create 300.0 1234${ibead} rot yes dist gaussian

fix 1 all nvt temp 300.0 300.0 0.5
fix 2 all pimd method nmpimd fmass 1.0 sp 1.0 temp 300.0 nhc 4
timestep 0.00025
thermo_style custom step pe ke etotal temp press vol
thermo 100
dump 2 all custom 100 water_${ibead}.nvt.dump id type x y z ix iy iz fx fy fz

run 20000000

Is there anything wrong in it ? Thanks very much again !

Best,
Jinfeng

Jinfeng Liu PhD
School of Basic Medical Science and Clinical Pharmacy, China Pharmaceutical University, Nanjing, Jiangsu, China.
Tel: 18616760236
Email: [email protected]

发件人:Axel Kohlmeyer [email protected]
发送日期:2021-04-09 22:01:35
收件人:“刘金峰” [email protected]
抄送人:LAMMPS Users Mailing List [email protected]
主题:Re: Re: [lammps-users] How can I run PIMD simulation using GPU