[cig-commits] r13389 - seismo/3D/SPECFEM3D_GLOBE/branches/pluggable
leif at geodynamics.org
leif at geodynamics.org
Mon Nov 24 17:34:59 PST 2008
Author: leif
Date: 2008-11-24 17:34:58 -0800 (Mon, 24 Nov 2008)
New Revision: 13389
Modified:
seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/bcast_model.c
seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/meshfem3D.f90
Log:
Fixed bugs: SIGSEGV caused by bogo proto; trim whitespace from
LOCAL_PATH; bad permissions on local copy of broadcasted "model.tgz".
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/bcast_model.c
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/bcast_model.c 2008-11-24 23:25:47 UTC (rev 13388)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/bcast_model.c 2008-11-25 01:34:58 UTC (rev 13389)
@@ -16,7 +16,7 @@
static char wd[150], modelDir[150];
-void FC_FUNC_(bcast_model, BCAST_MODEL)(int *pRank, char *scratchDir, int *scratchDirLen) {
+void FC_FUNC_(bcast_model, BCAST_MODEL)(int *pRank, char *scratchDir, int scratchDirLen) {
int fd, rank;
struct stat statBuf;
int size;
@@ -70,7 +70,7 @@
}
/* Create and enter the model directory. */
- sprintf(modelDir, "%.*s/model-%d", *scratchDirLen, scratchDir, rank);
+ sprintf(modelDir, "%.*s/model-%d", scratchDirLen, scratchDir, rank);
if (mkdir(modelDir, 0777) == -1) {
perror("mkdir");
MPI_Abort(MPI_COMM_WORLD, 1);
@@ -81,7 +81,7 @@
}
/* Save a local copy of the model archive. */
- fd = open("model.tgz", O_CREAT | O_WRONLY);
+ fd = open("model.tgz", O_CREAT | O_WRONLY, S_IRUSR);
if (fd == -1) {
perror("open");
MPI_Abort(MPI_COMM_WORLD, 1);
Modified: seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/meshfem3D.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/meshfem3D.f90 2008-11-24 23:25:47 UTC (rev 13388)
+++ seismo/3D/SPECFEM3D_GLOBE/branches/pluggable/meshfem3D.f90 2008-11-25 01:34:58 UTC (rev 13389)
@@ -857,7 +857,7 @@
endif
if(ELLIPTICITY) call make_ellipticity(nspl,rspl,espl,espl2,ONE_CRUST)
- call bcast_model(myrank, LOCAL_PATH)
+ call bcast_model(myrank, trim(LOCAL_PATH))
call read_3d_mantle_model()
More information about the CIG-COMMITS
mailing list