Command line arguments
When launching a LAMMPS simulation, the general command
mpirun <mpi_args> <lmp_exec> <lmp_args>
is executed. mpi_args
usually contains the flag -n <num_procs>
, and -hostfile hostfile
is added if activate_virtual=True
(see Activate virtual cores). For the LAMMPS command line arguments lmp_args
, the flag -in <lmp_exec>
is always included, with lmp_exec
being the LAMMPS executable. How to pass custom MPI and LAMMPS arguments is described below.
MPI arguments
MPI arguments can be passed as a dictionary to the run
-method:
mpi_args = {'-display-allocation': None,
'-do-not-launch': None,
'--timeout': 600}
sim.run(num_procs=4, lmp_exec="lmp", mpi_args=mpi_args)
LAMMPS arguments
lammps-simulator
can take a dictionary of LAMMPS arguments as input:
lmp_args = {'-sf': 'kokkos'}
sim.run(num_procs=4, lmp_exec="lmp", lmp_args=lmp_args)