[cig-commits] r5038 - in long/3D/Gale/trunk: . src/Gale/src
walter at geodynamics.org
walter at geodynamics.org
Sat Oct 14 15:01:36 PDT 2006
Author: walter
Date: 2006-10-14 15:01:35 -0700 (Sat, 14 Oct 2006)
New Revision: 5038
Modified:
long/3D/Gale/trunk/
long/3D/Gale/trunk/src/Gale/src/main.c
Log:
r953 at earth: boo | 2006-10-14 14:54:34 -0700
Reset the current directory which may get mangled by MPI_Init when not using mpirun
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:952
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:953
Modified: long/3D/Gale/trunk/src/Gale/src/main.c
===================================================================
--- long/3D/Gale/trunk/src/Gale/src/main.c 2006-10-14 22:01:29 UTC (rev 5037)
+++ long/3D/Gale/trunk/src/Gale/src/main.c 2006-10-14 22:01:35 UTC (rev 5038)
@@ -53,6 +53,9 @@
#ifdef HAVE_SDL
#include <SDL/SDL.h>
#endif
+#ifndef NO_UNISTD
+#include <unistd.h>
+#endif
#include <mpi.h>
#include <StGermain/StGermain.h>
@@ -102,7 +105,18 @@
char* errMessage = "Component dictionary must have unique names\n";
/* Initialise PETSc, get world info */
+
+#ifndef NO_UNISTD
+ char old_dir[1000];
+ getcwd(old_dir,999);
+#endif
+
MPI_Init( &argc, &argv );
+
+#ifndef NO_UNISTD
+ chdir(old_dir);
+#endif
+
MPI_Comm_dup( MPI_COMM_WORLD, &CommWorld );
MPI_Comm_size( CommWorld, &numProcessors );
MPI_Comm_rank( CommWorld, &rank );
More information about the cig-commits
mailing list