Hello,
I am currently performing Path Integral Molecular Dynamics (PIMD) simulations using LAMMPS, with special consideration for bosonic exchange statistics. During the simulation, I am using the DeepMD machine learning potential via the pair_style deepmd command. I have observed that during runtime, each MPI process (corresponding to the number of beads) appears to load a separate DeepMD potential model, which leads to insufficient GPU memory on my two L40s. This implies that if I were to run a PIMD simulation with 128 beads, I would require 128 GPUs. How can I avoid this situation, and what settings should I adjust?
My input script is as follows:
units metal
dimension 3
boundary p p p
atom_style atomic
atom_modify map yes
timestep 0.0003
variable Temp equal 1 # Temperature (0.1 K)
variable Press equal 50000.0 # Pressure (50 GPa = 50000 bar in metal units)
variable Nbeads equal 64 # Number of beads
variable seed equal 27506 # PRNG seed
variable tau_t equal 0.025 # Thermostat relaxation (25 fs in ps)
variable tau_p equal 0.5 # Barostat relaxation (500 fs in ps)
variable total_steps equal 100000 # Total simulation steps
read_data conf.data
mass 1 4.0026 # He mass
mass 2 12.0107 # C mass
pair_style deepmd frozen_model.pb
pair_coeff * *
neighbor 2.0 bin
neigh_modify every 1 delay 0 check yes
min_style cg
minimize 1.0e-6 1.0e-8 1000 10000
velocity all create {Temp} {seed} mom yes rot yes dist gaussian
fix nvt all nvt temp {Temp} {Temp} ${tau_t}
run 1000
unfix nvt
fix pimd all pimd/langevin/bosonic temp {Temp} thermostat PILE_L {seed} tau {tau_t} fixcom yes fix npt all npt temp {Temp} {Temp} {tau_t} iso {Press} {Press} ${tau_p}
thermo_style custom step time etotal ke pe evdwl ecoul vol temp press density
thermo 10
dump pos all xyz 200 pos.xyz
dump_modify pos element He C
dump for all xyz 200 for.xyz
dump_modify for element He C
dump vel all xyz 200 vel.xyz
dump_modify vel element He C
dump mom all xyz 200 mom.xyz
dump_modify mom element He C
dump pct all xyz 200 pct.xyz
dump_modify pct element He C
dump x_c all xyz 200 x_c.xyz
dump_modify x_c element He C
restart 2000 restart.*.lammps
run ${total_steps}
My run command is:
mpirun -np 64 lmp_mpi -in script.in -partition 64x1