reformat source
This commit is contained in:
@ -528,8 +528,7 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) :
|
|||||||
if (helpflag == 0) {
|
if (helpflag == 0) {
|
||||||
universe->ulogfile = fopen("log.lammps","w");
|
universe->ulogfile = fopen("log.lammps","w");
|
||||||
if (universe->ulogfile == nullptr)
|
if (universe->ulogfile == nullptr)
|
||||||
error->universe_warn(FLERR,"Cannot open log.lammps for writing: "
|
error->universe_warn(FLERR,"Cannot open log.lammps for writing: " + utils::getsyserror());
|
||||||
+ utils::getsyserror());
|
|
||||||
}
|
}
|
||||||
} else if (strcmp(arg[logflag],"none") == 0)
|
} else if (strcmp(arg[logflag],"none") == 0)
|
||||||
universe->ulogfile = nullptr;
|
universe->ulogfile = nullptr;
|
||||||
@ -661,8 +660,8 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((me == 0) && (!helpflag))
|
if ((me == 0) && (!helpflag))
|
||||||
utils::logmesg(this,"LAMMPS ({}{})\nProcessor partition = {}\n", version,
|
utils::logmesg(this,"LAMMPS ({}{})\nProcessor partition = {}\n", version, update_string,
|
||||||
update_string, universe->iworld);
|
universe->iworld);
|
||||||
}
|
}
|
||||||
|
|
||||||
// check consistency of datatype settings in lmptype.h
|
// check consistency of datatype settings in lmptype.h
|
||||||
|
|||||||
@ -27,21 +27,18 @@ static constexpr int MAXLINE = 256;
|
|||||||
create & initialize the universe of processors in communicator
|
create & initialize the universe of processors in communicator
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
Universe::Universe(LAMMPS *lmp, MPI_Comm communicator) : Pointers(lmp)
|
Universe::Universe(LAMMPS *lmp, MPI_Comm communicator) :
|
||||||
|
Pointers(lmp), uscreen(stdout), ulogfile(nullptr), procs_per_world(nullptr), root_proc(nullptr),
|
||||||
|
uni2orig(nullptr)
|
||||||
{
|
{
|
||||||
uworld = uorig = communicator;
|
uworld = uorig = communicator;
|
||||||
MPI_Comm_rank(uworld,&me);
|
MPI_Comm_rank(uworld, &me);
|
||||||
MPI_Comm_size(uworld,&nprocs);
|
MPI_Comm_size(uworld, &nprocs);
|
||||||
|
|
||||||
uscreen = stdout;
|
|
||||||
ulogfile = nullptr;
|
|
||||||
|
|
||||||
existflag = 0;
|
existflag = 0;
|
||||||
nworlds = 0;
|
nworlds = 0;
|
||||||
procs_per_world = nullptr;
|
|
||||||
root_proc = nullptr;
|
|
||||||
|
|
||||||
memory->create(uni2orig,nprocs,"universe:uni2orig");
|
memory->create(uni2orig, nprocs, "universe:uni2orig");
|
||||||
for (int i = 0; i < nprocs; i++) uni2orig[i] = i;
|
for (int i = 0; i < nprocs; i++) uni2orig[i] = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,8 +86,7 @@ void Universe::reorder(char *style, char *arg)
|
|||||||
if (me == 0) {
|
if (me == 0) {
|
||||||
FILE *fp = fopen(arg,"r");
|
FILE *fp = fopen(arg,"r");
|
||||||
if (fp == nullptr)
|
if (fp == nullptr)
|
||||||
error->universe_one(FLERR,fmt::format("Cannot open -reorder "
|
error->universe_one(FLERR,fmt::format("Cannot open -reorder file {}: {}", arg,
|
||||||
"file {}: {}",arg,
|
|
||||||
utils::getsyserror()));
|
utils::getsyserror()));
|
||||||
|
|
||||||
// skip header = blank and comment lines
|
// skip header = blank and comment lines
|
||||||
|
|||||||
Reference in New Issue
Block a user