catch format errors and print suitable error message
This commit is contained in:
@ -64,9 +64,15 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
try {
|
||||||
LAMMPS *lammps = new LAMMPS(argc,argv,MPI_COMM_WORLD);
|
LAMMPS *lammps = new LAMMPS(argc,argv,MPI_COMM_WORLD);
|
||||||
lammps->input->file();
|
lammps->input->file();
|
||||||
delete lammps;
|
delete lammps;
|
||||||
|
} catch(fmt::format_error &fe) {
|
||||||
|
fprintf(stderr,"fmt::format_error: %s\n", fe.what());
|
||||||
|
MPI_Abort(MPI_COMM_WORLD, 1);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
MPI_Barrier(MPI_COMM_WORLD);
|
MPI_Barrier(MPI_COMM_WORLD);
|
||||||
MPI_Finalize();
|
MPI_Finalize();
|
||||||
|
|||||||
Reference in New Issue
Block a user