From 7d5745ea721bffe69097a6134b4765d94d94ff97 Mon Sep 17 00:00:00 2001 From: goodale Date: Fri, 8 Dec 2000 14:30:52 +0000 Subject: Fix parameter steering for parallel case. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IsoSurfacer/trunk@27 bfcf8e34-485d-4d46-a995-1fd6fa6fb178 --- src/IsoSurfacer.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/IsoSurfacer.c b/src/IsoSurfacer.c index e5e87ed..f9d8ea7 100644 --- a/src/IsoSurfacer.c +++ b/src/IsoSurfacer.c @@ -58,8 +58,10 @@ static void WriteHDF5(cGH *GH, polypatch *totals, isosurfacerGH *myGH, /***************************************************************************/ static int IsoSurfacerHandleCommands(cGH *GH) { + DECLARE_CCTK_PARAMETERS IsoCommand *Iso_PollCommand(cGH *cctkGH,IsoCommand *cmd); IsoCommand command; + CCTK_REAL new_isovalue; isosurfacerGH *myGH = (isosurfacerGH *) GH->extensions [CCTK_GHExtensionHandle ("IsoSurfacer")]; if(!myGH->RunIsoSurfacer) return 0; /* not running */ @@ -110,7 +112,7 @@ static int IsoSurfacerHandleCommands(cGH *GH) /* Here it just needs to read from the control socket and then change the isosurface appropriately */ - +#define VERBOSE #ifdef CCTK_MPI /* now we need to bcast this value to all procs */ { @@ -122,13 +124,18 @@ static int IsoSurfacerHandleCommands(cGH *GH) printf("+++++++++Process Command [%s] [%s] [%s]\n", command.cmd.object,command.cmd.target,command.cmd.value); #endif - myGH->isovalue=atof(command.cmd.value); /* steer it. */ + new_isovalue=atof(command.cmd.value); /* steer it. */ } - tmpval=myGH->isovalue; + else + { + new_isovalue = isovalue; + } + + tmpval=new_isovalue; CACTUS_MPI_ERROR(MPI_Bcast(&tmpval,1, PUGH_MPI_REAL,0, /* ugh. nor REAL8 */ pughGH->PUGH_COMM_WORLD)); - myGH->isovalue=tmpval; /* copyback */ + new_isovalue=tmpval; /* copyback */ sprintf(stringval,"%f", tmpval); CCTK_ParameterSet("isovalue","isosurfacer",stringval); @@ -140,7 +147,7 @@ static int IsoSurfacerHandleCommands(cGH *GH) printf("+++++++++Process Command [%s] [%s] [%s]\n", command.cmd.object,command.cmd.target,command.cmd.value); #endif - myGH->isovalue=atof(command.cmd.value); /* steer it. */ + //new_isovalue=atof(command.cmd.value); /* steer it. */ /* If we have MPI, must propagate the steering info to all processes */ /* CCTK_SetParameter(); how? */ -- cgit v1.2.3