Hi all,
I am trying to get a project working that involves using a python script to call a LAMMPS input script. To do this, I used conda to set up a conda environment for lammps using the command:
conda create -n “lammps” -c conda-forge lammps mpi4py numpy scipy
I can then activate this environment by sourcing my .bashrc and then using the “conda activate lammps” command. I find that I can run simple mpi4py scripts in this environment. I also find that I can run simple lammps scripts (such as those in the “Using PyLammps and mpi4py (Experimental)” section on the website) on a single mpi processor, i.e. I can run mpirun -np 1 python melt.py), but when I try to run to use multiple processors, i.e. run mpirun -np 2 python melt.py, the job runs more slowly than before! The log file seems to indicate that the 2 processors are actually running independently on the same input script.
I’m wondering if this strange behavior is somehow due to two separate mpi’s being installed (one for LAMMPs and one for mpi4py) that are having trouble communicating? Any suggestions for what I should do to get my project working in the near-term is much appreciated.
Best,
Robert