xnn.common.deploy.mdi_engine.main#
- xnn.common.deploy.mdi_engine.main(argv=None)[source]#
Command-line entry point serving a checkpoint as an MDI engine.
Invoked as
xnn mdi ...orpython -m xnn.common.deploy.mdi_engine ...:xnn mdi --ckpt runs/exp/best.pt \ -mdi "-role ENGINE -name xnn -method TCP -port 8021 -hostname localhost"
Serve a plain checkpoint with D4 added and a net charge of -1:
xnn mdi --ckpt best.pt --dispersion "{name: d4, cutoff_pair: 12.0}" \ --total-charge -1 -mdi "..."
For the MPI communication method, launch under
mpirunalongside the driver (mpi4pyrequired):mpirun -np 1 xnn mdi --ckpt best.pt -mdi "-role ENGINE -name xnn -method MPI" \ : -np 1 lmp -mdi "-role DRIVER -name LAMMPS -method MPI" -in input.dat