[ase-users] Parallelizing lammpslib

Martin Bäker martin.baeker at tu-bs.de
Mon Nov 26 13:34:18 CET 2018


Dear all,

I am currently working with the lammpslib-interface of ASE, but it
seems I am unable to find out how to run lammps in parallel when using
the ASE interface.

I tried simply calling the testscript 
lammpslib_simple.py
via mpirun, I also tried to redefine the lammps-command
export LAMMPS_COMMAND="/usr/bin/mpirun -np 8 /usr/bin/lmp_daily"
but it seems not to work.

Calling the python interface of lammps itself via mpirun using a
testscript below (taken from here
http://devonwa.com/2016/09/01/installing-and-using-LAMMPS-with-ASE/#mpi4py_with_LAMMPS)
works fine.

I'd be grateful for any tipps or advice.

Martin.

--- Lammps test script

## Tests lammps only

from lammps import lammps
from mpi4py import MPI
import os

lmp = lammps()
lmp_path = os.environ['LAMMPSPATH']
lmp.file(os.path.join(lmp_path, "bench/in.lj"))
me = MPI.COMM_WORLD.Get_rank()
nprocs = MPI.COMM_WORLD.Get_size()

print "Proc %d out of %d procs has" % (me,nprocs),lmp
MPI.Finalize()


-- 
                   Priv.-Doz. Dr. Martin Bäker
                   Institut für Werkstoffe
                   Technische Universität Braunschweig
                   Langer Kamp 8
                   38106 Braunschweig
                   Germany
                   Tel.: 00-49-531-391-3065  
                   Fax   00-49-531-391-3058
                   e-mail <martin.baeker at tu-bs.de> 
		   http://www.tu-braunschweig.de/ifw/institut/mitarbeiter/baeker
              	   http://www.scienceblogs.de/hier-wohnen-drachen 



More information about the ase-users mailing list