*/
#include "gmxpre.h"
-#include "gromacs/commandline/cmdlineinit.h"
+#include "cmdlineinit.h"
+
+#include "config.h"
#include <cstring>
#include <boost/scoped_ptr.hpp>
-#include "gromacs/legacyheaders/network.h"
-#include "gromacs/legacyheaders/types/commrec.h"
-
#include "gromacs/commandline/cmdlinemodulemanager.h"
#include "gromacs/commandline/cmdlineprogramcontext.h"
+#include "gromacs/legacyheaders/network.h"
+#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/init.h"
g_commandLineContext.reset();
}
+int processExceptionAtExitForCommandLine(const std::exception &ex)
+{
+ int rc = processExceptionAtExit(ex); //Currently this aborts for GMX_LIB_MPI
+ finalizeForCommandLine(); //thus this MPI_Finalize doesn't matter
+ return rc;
+}
+
int runCommandLineModule(int argc, char *argv[],
CommandLineModuleInterface *module)
{