From 256b0260f70fc2751063619389557ed9d94ee4ba Mon Sep 17 00:00:00 2001 From: tradke Date: Fri, 16 Aug 2002 13:33:01 +0000 Subject: Broadcast recovered cctk_time as a CCTK_REAL (instead CCTK_REAL4). This fixes precision problems when advancing by very small delta times. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@76 7842ec3a-9562-4be5-9c5b-06ba18f2b668 --- src/RecoverVar.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/RecoverVar.c b/src/RecoverVar.c index cbcf3ba..fd22452 100644 --- a/src/RecoverVar.c +++ b/src/RecoverVar.c @@ -186,8 +186,8 @@ int IOHDF5Util_RecoverVariables (cGH *GH, const fileinfo_t *fileinfo) int IOHDF5Util_RecoverGHextensions (cGH *GH, const fileinfo_t *fileinfo) { hid_t group; - CCTK_REAL4 real4Buffer; - CCTK_INT4 int4Buffer[3]; + CCTK_REAL realBuffer; + CCTK_INT4 int4Buffer[3]; if (CCTK_MyProc (GH) == 0) @@ -201,7 +201,7 @@ int IOHDF5Util_RecoverGHextensions (cGH *GH, const fileinfo_t *fileinfo) { READ_ATTRIBUTE (group, "cctk_iteration", HDF5_INT4, &int4Buffer[1]); READ_ATTRIBUTE (group, "main_loop_index", HDF5_INT4, &int4Buffer[2]); - READ_ATTRIBUTE (group, "cctk_time", HDF5_REAL4, &real4Buffer); + READ_ATTRIBUTE (group, "cctk_time", HDF5_REAL, &realBuffer); HDF5_ERROR (H5Gclose (group)); } @@ -220,14 +220,14 @@ int IOHDF5Util_RecoverGHextensions (cGH *GH, const fileinfo_t *fileinfo) CACTUS_MPI_ERROR (MPI_Bcast (int4Buffer, 3, PUGH_MPI_INT4, 0,MPI_COMM_WORLD)); if (int4Buffer[0]) { - CACTUS_MPI_ERROR (MPI_Bcast (&real4Buffer, 1, PUGH_MPI_REAL4, 0, - MPI_COMM_WORLD)); + CACTUS_MPI_ERROR (MPI_Bcast (&realBuffer, 1, PUGH_MPI_REAL, 0, + MPI_COMM_WORLD)); } #endif if (int4Buffer[0]) { - GH->cctk_time = real4Buffer; + GH->cctk_time = realBuffer; GH->cctk_iteration = int4Buffer[1]; CCTK_SetMainLoopIndex ((int) int4Buffer[2]); } -- cgit v1.2.3