Commit 08528178 authored by David Rohr's avatar David Rohr
Browse files

fix cleanup when configuration fails

parent 2b3aa359
......@@ -63,17 +63,19 @@ int main(int argc, char* argv[])
// ************ Configuration and Pre-calculating necessary objects *****************
printf("Configuring\n");
if (bio->configure(argc, argv)) return(1);
if (bio->configure(argc, argv) == 0)
{
// ******************************* Run BioEM routine ******************************
printf("Running\n");
timer.Start();
bio->run();
timer.Stop();
// ******************************* Run BioEM routine ******************************
printf("Running\n");
timer.Start();
bio->run();
timer.Stop();
// ************************************ End **********************************
printf ("The code ran for %f seconds.\n", timer.GetElapsedTime());
bio->cleanup();
// ************************************ End **********************************
printf ("The code ran for %f seconds.\n", timer.GetElapsedTime());
bio->cleanup();
}
delete bio;
#ifdef WITH_MPI
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment