Hi All,
I have a python script in which, a “for” loop runs LAMMPS sequentially multiple times and gathers some results. Each run only uses one core. I have a number of cores available and I’d like to parallelize this loop. Is there any built-in method to call different LAMMPS scripts in parallel on different cores from Python? Something similar to multiprocessing.Pool() or concurrent.futures.ProcessPoolExecutor() in Python maybe?
If you are running LAMMPS from Python, you could use mpi4py to parallize with MPI on the Python level. You would just need to create a split communicator and pass it to LAMMPS when creating the LAMMPS instance.
There should be some previous discussions of how to do this in the archives.