Fixed incorrect call to gmx_finalize() in gmx_pme_error()
authorErik Lindahl <lindahl@cbr.su.se>
Tue, 31 Aug 2010 19:20:41 +0000 (21:20 +0200)
committerErik Lindahl <lindahl@cbr.su.se>
Tue, 31 Aug 2010 19:20:41 +0000 (21:20 +0200)
src/tools/gmx_pme_error.c

index 028e63ea0dab7d6815088d29caa6d8066e5611ad..3d58c45396dc7ec3a9d15766e2ec8c1cbaf0afe0 100644 (file)
@@ -48,6 +48,7 @@
 #include "coulomb.h"
 #include "mtop_util.h"
 #include "network.h"
+#include "main.h"
 
 /* We use the same defines as in mvdata.c here */
 #define  block_bc(cr,   d) gmx_bcast(     sizeof(d),     &(d),(cr))
@@ -1172,7 +1173,10 @@ int gmx_pme_error(int argc,char *argv[])
         fclose(fp);
     }
     
-    gmx_finalize();
+    if (gmx_parallel_env_initialized())
+    {
+        gmx_finalize();
+    }
     
     return 0;
 }