diff options
author | cott <> | 2004-01-06 07:56:00 +0000 |
---|---|---|
committer | cott <> | 2004-01-06 07:56:00 +0000 |
commit | 2df622d3e73a4c3b4cac7114efbb98e8b9382370 (patch) | |
tree | 7f004c50ecc8453965e84334db19398304b93efe /CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.hh | |
parent | 65df233e3c829a85a59e8efa5559d1c12fa09b8f (diff) |
We can now recover parameters.
darcs-hash:20040106075639-19929-06e2883236b3a6710cabb2229a18e62219bd5452.gz
Diffstat (limited to 'CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.hh')
-rw-r--r-- | CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.hh | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.hh b/CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.hh index 73d50ca9c..be467adfc 100644 --- a/CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.hh +++ b/CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.hh @@ -1,8 +1,9 @@ -// $Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.hh,v 1.7 2003/12/01 13:15:21 cott Exp $ +// $Header: /home/eschnett/C/carpet/Carpet/CarpetAttic/CarpetIOFlexIOCheckpoint/src/ioflexio.hh,v 1.8 2004/01/06 08:56:39 cott Exp $ #ifndef CARPETIOFLEXIO_HH #define CARPETIOFLEXIO_HH + #include <vector> #include "cctk.h" @@ -54,6 +55,37 @@ #elif CCTK_REAL_PRECISION_16 #define FLEXIO_REAL FLEXIO_REAL16 #endif + +/* some macros needed for recovery */ +#ifdef CCTK_MPI + +#define CACTUS_MPI_ERROR(fn_call) \ + do { \ + int errcode; \ + \ + if ((errcode = fn_call) != MPI_SUCCESS) \ + { \ + char mpi_error_string[MPI_MAX_ERROR_STRING+1]; \ + int resultlen; \ + \ + MPI_Error_string (errcode, mpi_error_string, &resultlen); \ + fprintf (stderr, "MPI call '%s' returned error code %d (%s)\n", \ + #fn_call, errcode, mpi_error_string); \ + fprintf(stderr, "At line %d of file %s\n", __LINE__, __FILE__); \ + } \ + } while (0) + + +#ifdef CCTK_INT4 +#define CARPET_MPI_INT4 (sizeof (CCTK_INT4) == sizeof (int) ? MPI_INT : \ + sizeof (CCTK_INT4) == sizeof (short) ? MPI_SHORT : \ + MPI_DATATYPE_NULL) +#endif + +#define CARPET_MPI_CHAR MPI_CHAR + +#endif + namespace CarpetIOFlexIO { // Variable definitions |