From 5f0423b97d64ff06b9317ddb5c140c805cf8f1b6 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Fri, 31 Aug 2018 17:04:27 -0600 Subject: [PATCH] change -mpi to -mpicolor --- doc/src/Howto_client_server.txt | 11 ++++++----- doc/src/Run_options.txt | 4 ++-- doc/src/message.txt | 10 +++++----- examples/message/README | 8 ++++---- examples/message/Script.sh | 8 ++++---- src/lammps.cpp | 1 + 6 files changed, 22 insertions(+), 20 deletions(-) diff --git a/doc/src/Howto_client_server.txt b/doc/src/Howto_client_server.txt index ce9bbc0763..714c23f066 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 b58aaa16e1..27f436ed55 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 6c84f3135c..cca1a5b369 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 34a5794e7a..6cd99d5c09 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 0125bdd500..fdcd6f1188 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 dec4a57186..fcdfecf30a 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"