diff options
-rw-r--r-- | src/Operator.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Operator.c b/src/Operator.c index 76a71f5..5c64810 100644 --- a/src/Operator.c +++ b/src/Operator.c @@ -460,7 +460,7 @@ int PUGHInterp_InterpGV (cGH *GH, else { /* dereferencing such an address should code crash on most systems */ - type_desc[type].send_buffer = (void *) 1; + type_desc[type].send_buffer = (void *) type_desc[type].vtypesize } } @@ -555,7 +555,7 @@ int PUGHInterp_InterpGV (cGH *GH, else { /* access to such a fake address should crash the code on most systems */ - type_desc[type].recv_buffer = (void *) 1; + type_desc[type].recv_buffer = (void *) type_desc[type].vtypesize; } /* now exchange the data for this CCTK data type */ @@ -803,7 +803,10 @@ int PUGHInterp_InterpLocal (cGH *GH, int out_array_types[]) { int dim, point, retval; - CCTK_REAL *coords, *origin, *delta, **data; + CCTK_REAL *coords, *origin, *delta; +/* FIXME: the volatile qualifier is just a workaround for compiler bug + on the Hitachi SR8000 machine, without it optimized code will crash */ + volatile CCTK_REAL **data; /* check arguments */ @@ -831,7 +834,7 @@ int PUGHInterp_InterpLocal (cGH *GH, /* get the grid spacings - this assumes a cartesian grid */ origin = (CCTK_REAL *) malloc (2 * num_dims * sizeof (CCTK_REAL)); delta = origin + num_dims; - data = (CCTK_REAL **) coord_arrays; + data = (volatile CCTK_REAL **) coord_arrays; for (dim = 0; dim < num_dims; dim++) { origin[dim] = data[dim][0]; @@ -840,7 +843,7 @@ int PUGHInterp_InterpLocal (cGH *GH, /* sort the individual interpolation coordinate arrays into a single one */ coords = (CCTK_REAL *) malloc (num_dims * num_points * sizeof (CCTK_REAL)); - data = (CCTK_REAL **) interp_coord_arrays; + data = (volatile CCTK_REAL **) interp_coord_arrays; for (point = 0; point < num_points; point++) { for (dim = 0; dim < num_dims; dim++) |