git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15531 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2016-08-31 22:20:28 +00:00
parent ae458497bf
commit fab2f01a58
5 changed files with 148 additions and 5 deletions

View File

@ -14,7 +14,9 @@
#include <mpi.h>
#include "lammps.h"
#include "input.h"
#include "error.h"
#include <stdio.h>
#include <stdlib.h>
using namespace LAMMPS_NS;
@ -26,11 +28,22 @@ int main(int argc, char **argv)
{
MPI_Init(&argc,&argv);
#ifdef LAMMPS_EXCEPTIONS
try {
LAMMPS *lammps = new LAMMPS(argc,argv,MPI_COMM_WORLD);
lammps->input->file();
delete lammps;
} catch(LAMMPSAbortException & ae) {
MPI_Abort(ae.universe, 1);
} catch(LAMMPSException & e) {
MPI_Finalize();
exit(1);
}
#else
LAMMPS *lammps = new LAMMPS(argc,argv,MPI_COMM_WORLD);
lammps->input->file();
delete lammps;
#endif
MPI_Barrier(MPI_COMM_WORLD);
MPI_Finalize();
}