How to run multiple jobs at the same time?

Dear all,

As shown in the attachment, I want to simulate the 9 regions marked in blue by using LAMMPS. Every region has its own independent input file and runs its MD simulation independently. How can I run the 9 simulations at the same time in LAMMPS? Can anyone give me some suggestions? Thanks.

Regards,

Zhou

simulation domain.jpg

run 9 separate simulations. Combine the 9 final coordinates together to 1. will this satisfy you?

在2015-08-18 17:03:38,LI Xinmenglixinmeng@…34…写道:

It is not really clear what you mean. If every simulation has its own input file and you want them to run independently of each other, you can use gnu parallel or xargs for that. If they are independent anyway, it does beg the question why these domains need to be simulated at the same time.

If the above is not what you mean, then you should really give us more information about what you actually want to achieve.

In that case you can start the simulations in parallel. Just google how xargs works. You will have to combine the coordinates yourself by post-processing. How correct this approach is, I have no idea.

Why don’t you just simulate all domains together using 9 cores? Is there stuff in the white domains that does/should not move? If so, you could use fix setforce to immobilize those regions.

It is not clear what he really to do. His model is not a common one. Zhou should explain more.

It is not really clear what you mean. If every simulation has its own input
file and you want them to run independently of each other, you can use gnu
parallel or xargs for that.

  You can also simply use & to put each simulation in the background.
For example:

cd directory1
lmp_mpi -in run.in &
cd ..

cd directory2
lmp_mpi -in run.in &
cd ..

cd directory3
lmp_mpi -in run.in &
cd ..

:

cd directory9
lmp_mpi -in run.in &
cd ..

   You can type these commands into the shell, or put these 9 commands
in a file (eg "script.sh"), make it executable (eg "chmod 755
script.sh"), and run it (eg "./script.sh &").

    &

"With & the process starts in the background, so you can continue to
use the shell and do not have to wait until the script is finished. If
you forget it, you can stop the current running process with Ctrl-Z
and continue it in the background with bg (or in the foreground with
fg). For more information, see job control"

http://unix.stackexchange.com/questions/86247/what-does-ampersand-mean-at-the-end-of-a-shell-script-line
http://hacktux.com/bash/ampersand

Of coarse, if you want each simulation to run using multiple
processors, then replace each "lmp_mpi -in run.in" line with something
like "mpirun -np 2 lmp_mpi -in run.in".

...and it's also probably a good idea to use "nice", for example:
   nice -n 15 ./script.sh
https://en.wikipedia.org/wiki/Nice_(Unix)

Cheers

Andrew

P.S. If you are logging in to a remote computer to run your
simulations, you may want to insert "nohup" at the beginning of each
line containing "lmp_mpi".
https://en.wikipedia.org/wiki/Nohup

why so complicated? this is all possible with LAMMPS directly and in a much more elegant fashion. check out:
http://lammps.sandia.gov/doc/Section_howto.html#howto-4

especially the third and fourth examples.

axel.