diff --git a/doc/src/Howto_client_server.txt b/doc/src/Howto_client_server.txt index ce9bbc07638584ffbfc64e4ac2e5ed29e95b56c9..714c23f0669eed55eaa15e31f100d117e5e2448c 100644 --- a/doc/src/Howto_client_server.txt +++ b/doc/src/Howto_client_server.txt @@ -119,12 +119,13 @@ For message exchange in {mpi/one} mode: Launch both codes in a single mpirun command: -mpirun -np 2 lmp_mpi -mpi 2 -in in.message.client -log log.client : -np 4 lmp_mpi -mpi 2 -in in.message.server -log log.server +mpirun -np 2 lmp_mpi -mpicolor 0 -in in.message.client -log log.client : -np 4 lmp_mpi -mpicolor 1 -in in.message.server -log log.server The two -np values determine how many procs the client and the server run on. -A LAMMPS executable run in this manner must use the -mpi P -command-line option as their first option, where P is the number of -processors the first code in the mpirun command (client or server) is -running on. +A LAMMPS executable run in this manner must use the -mpicolor color +command-line option as their its option, where color is an integer +label that will be used to distinguish one executable from another in +the multiple executables that the mpirun command launches. In this +example the client was colored with a 0, and the server with a 1. diff --git a/doc/src/Run_options.txt b/doc/src/Run_options.txt index b58aaa16e10c5cc983d99548e47cdadc6100ca8c..27f436ed55e4825886789259778e22f0b51819ce 100644 --- a/doc/src/Run_options.txt +++ b/doc/src/Run_options.txt @@ -18,7 +18,7 @@ letter abbreviation can be used: "-i or -in"_#file "-k or -kokkos"_#run-kokkos "-l or -log"_#log -"-m or -mpi"_#mpi +"-m or -mpicolor"_#mpicolor "-nc or -nocite"_#nocite "-pk or -package"_#package "-p or -partition"_#partition @@ -176,7 +176,7 @@ Option -plog will override the name of the partition log files file.N. :line -[-mpi] color :link(mpi) +[-mpicolor] color :link(mpi) If used, this must be the first command-line argument after the LAMMPS executable name. It is only used when LAMMPS is launched by an mpirun diff --git a/doc/src/message.txt b/doc/src/message.txt index 6c84f3135c58185d0854b2728a0a15d78a2015a4..cca1a5b369fd72d8ffe6eb9db99698c9a39c5e43 100644 --- a/doc/src/message.txt +++ b/doc/src/message.txt @@ -105,12 +105,12 @@ mode on a parallel machine, e.g. a cluster with many nodes. For mode {mpi/one}, the 2 codes communicate via MPI and are launched by the same mpirun command, e.g. with this syntax for OpenMPI: -mpirun -np 2 lmp_mpi -mpi 2 -in in.client -log log.client : -np 4 othercode args # LAMMPS is client -mpirun -np 2 othercode args : -np 4 lmp_mpi -mpi 2 -in in.server # LAMMPS is server :pre +mpirun -np 2 lmp_mpi -mpicolor 0 -in in.client -log log.client : -np 4 othercode args # LAMMPS is client +mpirun -np 2 othercode args : -np 4 lmp_mpi -mpicolor 1 -in in.server # LAMMPS is server :pre -Note the use of the "-mpi P" command-line argument with LAMMPS. See -the "command-line args"_Run_options.html doc page for further -explanation. +Note the use of the "-mpicolor color" command-line argument with +LAMMPS. See the "command-line args"_Run_options.html doc page for +further explanation. For mode {mpi/two}, the 2 codes communicate via MPI, but are launched be 2 separate mpirun commands. The specified {filename} argument is a diff --git a/examples/message/README b/examples/message/README index 34a5794e7a67fcc12b832a885b7f9f20cbcd9e3c..6cd99d5c097fffb8e5c09bba4fefa5dad5bb7c94 100644 --- a/examples/message/README +++ b/examples/message/README @@ -105,13 +105,13 @@ Mpi/one mode of messaging: Launch LAMMPS twice in a single mpirun command: -% mpirun -np 2 lmp_mpi -mpi 0 -in in.message.client -v mode mpione -log log.client : -np 4 lmp_mpi -mpi 1 -in in.message.server -v mode mpione -log log.server +% mpirun -np 2 lmp_mpi -mpicolor 0 -in in.message.client -v mode mpione -log log.client : -np 4 lmp_mpi -mpicolor 1 -in in.message.server -v mode mpione -log log.server Or run with in.message.tilt.client/server. The two -np values determine how many procs the client and the server run on. -A LAMMPS executable run in this manner must use the -mpi color -command-line option as their first option, where color is set to -one integer value for the 1st app, and another value for the 2nd app. +A LAMMPS executable run in this manner must use the -mpicolor color +command-line option as its first option, where color is set to one +integer value for the 1st app, and another value for the 2nd app. diff --git a/examples/message/Script.sh b/examples/message/Script.sh index 0125bdd500cc5797b38267e8f95e1e5a64f72024..fdcd6f11888448eb40e9425873257a7a9773b0b6 100644 --- a/examples/message/Script.sh +++ b/examples/message/Script.sh @@ -13,7 +13,7 @@ mpirun -np 1 lmp_mpi -v mode zmq -log log.message.server.zmq.g++.1 < in.message. mpirun -np 1 lmp_mpi -v mode mpitwo -log log.message.client.mpitwo.g++.1 < in.message.client & mpirun -np 1 lmp_mpi -v mode mpitwo -log log.message.server.mpitwo.g++.1 < in.message.server -mpirun -np 1 lmp_mpi -mpi 0 -in in.message.client -v mode mpione -log log.message.client.mpione.g++.1 : -np 1 lmp_mpi -mpi 1 -in in.message.server -v mode mpione -log log.message.server.mpione.g++.1 +mpirun -np 1 lmp_mpi -m 0 -in in.message.client -v mode mpione -log log.message.client.mpione.g++.1 : -np 1 lmp_mpi -m 1 -in in.message.server -v mode mpione -log log.message.server.mpione.g++.1 # message on 2/4 procs each @@ -28,7 +28,7 @@ mpirun -np 4 lmp_mpi -v mode zmq -log log.message.server.zmq.g++.4 < in.message. mpirun -np 2 lmp_mpi -v mode mpitwo -log log.message.client.mpitwo.g++.2 < in.message.client & mpirun -np 4 lmp_mpi -v mode mpitwo -log log.message.server.mpitwo.g++.4 < in.message.server -mpirun -np 2 lmp_mpi -mpi 0 -in in.message.client -v mode mpione -log log.message.client.mpione.g++.2 : -np 4 lmp_mpi -mpi 1 -in in.message.server -v mode mpione -log log.message.server.mpione.g++.4 +mpirun -np 2 lmp_mpi -m 0 -in in.message.client -v mode mpione -log log.message.client.mpione.g++.2 : -np 4 lmp_mpi -m 1 -in in.message.server -v mode mpione -log log.message.server.mpione.g++.4 # message.tilt on 1 proc each @@ -40,7 +40,7 @@ mpirun -np 1 lmp_mpi -v mode zmq -log log.message.tilt.server.zmq.g++.1 < in.mes mpirun -np 1 lmp_mpi -v mode mpitwo -log log.message.tilt.client.mpitwo.g++.1 < in.message.tilt.client & mpirun -np 1 lmp_mpi -v mode mpitwo -log log.message.tilt.server.mpitwo.g++.1 < in.message.tilt.server -mpirun -np 1 lmp_mpi -mpi 0 -in in.message.tilt.client -v mode mpione -log log.message.tilt.client.mpione.g++.1 : -np 1 lmp_mpi -mpi 1 -in in.message.tilt.server -v mode mpione -log log.message.tilt.server.mpione.g++.1 +mpirun -np 1 lmp_mpi -m 0 -in in.message.tilt.client -v mode mpione -log log.message.tilt.client.mpione.g++.1 : -np 1 lmp_mpi -m 1 -in in.message.tilt.server -v mode mpione -log log.message.tilt.server.mpione.g++.1 # message.tilt on 2/4 procs each @@ -52,4 +52,4 @@ mpirun -np 4 lmp_mpi -v mode zmq -log log.message.tilt.server.zmq.g++.4 < in.mes mpirun -np 2 lmp_mpi -v mode mpitwo -log log.message.tilt.client.mpitwo.g++.2 < in.message.tilt.client & mpirun -np 4 lmp_mpi -v mode mpitwo -log log.message.tilt.server.mpitwo.g++.4 < in.message.tilt.server -mpirun -np 2 lmp_mpi -mpi 0 -in in.message.tilt.client -v mode mpione -log log.message.tilt.client.mpione.g++.2 : -np 4 lmp_mpi -mpi 1 -in in.message.tilt.server -v mode mpione -log log.message.tilt.server.mpione.g++.4 +mpirun -np 2 lmp_mpi -m 0 -in in.message.tilt.client -v mode mpione -log log.message.tilt.client.mpione.g++.2 : -np 4 lmp_mpi -m 1 -in in.message.tilt.server -v mode mpione -log log.message.tilt.server.mpione.g++.4 diff --git a/src/lammps.cpp b/src/lammps.cpp index dec4a57186e0ee443fb4460669fc676ebae58b54..fcdfecf30a83795d742504e43ae12a9e0dd7bdc3 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -879,6 +879,7 @@ void LAMMPS::help() "-in filename : read input from file, not stdin (-i)\n" "-kokkos on/off ... : turn KOKKOS mode on or off (-k)\n" "-log none/filename : where to send log output (-l)\n" + "-mpicolor color : which exe in a multi-exe mpirun cmd (-m)\n" "-nocite : disable writing log.cite file (-nc)\n" "-package style ... : invoke package command (-pk)\n" "-partition size1 size2 ... : assign partition sizes (-p)\n"