add support for '-in none' for multi-partition runs from the library interface
This commit is contained in:
@ -456,6 +456,7 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) :
|
||||
|
||||
if (universe->me == 0) {
|
||||
if (inflag == 0) infile = stdin;
|
||||
else if (strcmp(arg[inflag], "none") == 0) infile = stdin;
|
||||
else infile = fopen(arg[inflag],"r");
|
||||
if (infile == nullptr)
|
||||
error->one(FLERR,fmt::format("Cannot open input script {}: {}",
|
||||
@ -530,10 +531,12 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) :
|
||||
str, utils::getsyserror()));
|
||||
}
|
||||
|
||||
infile = fopen(arg[inflag],"r");
|
||||
if (infile == nullptr)
|
||||
error->one(FLERR,fmt::format("Cannot open input script {}: {}",
|
||||
arg[inflag], utils::getsyserror()));
|
||||
if (strcmp(arg[inflag], "none") != 0) {
|
||||
infile = fopen(arg[inflag],"r");
|
||||
if (infile == nullptr)
|
||||
error->one(FLERR,fmt::format("Cannot open input script {}: {}",
|
||||
arg[inflag], utils::getsyserror()));
|
||||
}
|
||||
}
|
||||
|
||||
// screen and logfile messages for universe and world
|
||||
@ -1103,7 +1106,7 @@ void _noopt LAMMPS::help()
|
||||
"List of command line options supported by this LAMMPS executable:\n\n"
|
||||
"-echo none/screen/log/both : echoing of input script (-e)\n"
|
||||
"-help : print this help message (-h)\n"
|
||||
"-in filename : read input from file, not stdin (-i)\n"
|
||||
"-in none/filename : read input from file or stdin (default) (-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"
|
||||
|
||||
Reference in New Issue
Block a user