[cig-commits] r8244 - mc/3D/CitcomS/trunk/lib
tan2 at geodynamics.org
tan2 at geodynamics.org
Thu Nov 8 14:31:21 PST 2007
Author: tan2
Date: 2007-11-08 14:31:21 -0800 (Thu, 08 Nov 2007)
New Revision: 8244
Modified:
mc/3D/CitcomS/trunk/lib/Instructions.c
mc/3D/CitcomS/trunk/lib/Pan_problem_misc_functions.c
Log:
Replaced a system call by std C library remove() and disabled another system call (backup input file). Partially fixed issue130. All remaining system calls are in lib/Output_gzdir.c.
Modified: mc/3D/CitcomS/trunk/lib/Instructions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Instructions.c 2007-11-08 21:38:09 UTC (rev 8243)
+++ mc/3D/CitcomS/trunk/lib/Instructions.c 2007-11-08 22:31:21 UTC (rev 8244)
@@ -1426,7 +1426,7 @@
if((E->output.gzdir.vtk_io == 3)||(E->parallel.me == 0)){
/* delete the geo files */
get_vtk_filename(files,1,E,0);
- sprintf(message,"rm %s",files);system(message);
+ remove(files);
if(E->parallel.me == 0){
/* close the log */
fclose(E->output.gzdir.vtk_fp);
Modified: mc/3D/CitcomS/trunk/lib/Pan_problem_misc_functions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Pan_problem_misc_functions.c 2007-11-08 21:38:09 UTC (rev 8243)
+++ mc/3D/CitcomS/trunk/lib/Pan_problem_misc_functions.c 2007-11-08 22:31:21 UTC (rev 8244)
@@ -80,7 +80,10 @@
if (E->parallel.me==0) {
sprintf(unique_name,"%06d.%s-%s",E->control.PID,comment,name);
sprintf(command,"cp -f %s %s\n",name,unique_name);
+#if 0
+ /* disable copying file, since some MPI implementation doesn't support it */
system(command);
+#endif
}
}
@@ -459,7 +462,7 @@
{
int k,klim,nb,nt,nm;
double drb,dr0,drt,dr,drm,range,r,mrange, brange,bfrac,trange, tfrac;
-
+
brange = (double)E->control.coor_refine[0];
bfrac = (double)E->control.coor_refine[1];
trange = (double)E->control.coor_refine[2];
@@ -496,7 +499,7 @@
rr[k] = r;
}
}
-/*
+/*
get r spacing at radial locations and node numbers as specified
@@ -530,10 +533,10 @@
rr[1] = E->control.rrlayer[0];
for(j = 1; j < E->control.rlayers; j++){
- ddr = (E->control.rrlayer[j] - E->control.rrlayer[j - 1]) /
+ ddr = (E->control.rrlayer[j] - E->control.rrlayer[j - 1]) /
(E->control.nrlayer[j] - E->control.nrlayer[j - 1]);
for(k = E->control.nrlayer[j-1]+1;k <= E->control.nrlayer[j];k++)
rr[k] = rr[k-1]+ddr;
}
-
+
}
More information about the cig-commits
mailing list