summaryrefslogtreecommitdiffstats
path: root/src/H5Eprivate.h
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2002-04-03 04:44:26 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2002-04-03 04:44:26 (GMT)
commitad641fa7b617c8ca2ec11602cde0f72fa12696cd (patch)
tree8e08d800581c3c76c3339f50e7fc59d1b62405c8 /src/H5Eprivate.h
parentc0ca09a89965e49df0cf1a1b11f955a7d1510a0f (diff)
downloadhdf5-ad641fa7b617c8ca2ec11602cde0f72fa12696cd.zip
hdf5-ad641fa7b617c8ca2ec11602cde0f72fa12696cd.tar.gz
hdf5-ad641fa7b617c8ca2ec11602cde0f72fa12696cd.tar.bz2
[svn-r5135] Purpose:
Features. Description: Error stack used to report only hdf5 predefined error messages because it takes only static strings. Runtime defined messages were not pushed to the stack. Added the means and macros to push MPI error strings onto the hdf5 error stack. Added a new minor error class as H5E_MPIERR for this class of messages. H5Epulbic.h, H5E.c: Added H5E_MPIERR and its minor class description. H5Eprivate.h: Added HMPI_XXX macros to push MPI error strings to the stack. H5FDmpio.c: Changed couple places to use the new macros to test the new macros. A more through changes to make use of these new macros will be done later. Platforms tested: eirene (serial, parallel) modi4(parallel)
Diffstat (limited to 'src/H5Eprivate.h')
-rw-r--r--src/H5Eprivate.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/H5Eprivate.h b/src/H5Eprivate.h
index a201111..e6f88f5 100644
--- a/src/H5Eprivate.h
+++ b/src/H5Eprivate.h
@@ -114,3 +114,25 @@ __DLL__ herr_t H5E_clear (void);
__DLL__ herr_t H5E_walk (H5E_direction_t dir, H5E_walk_t func,
void *client_data);
#endif
+
+#ifdef H5_HAVE_PARALLEL
+/*
+ * MPI error handling macros.
+ */
+
+extern char H5E_mpi_error_str[MPI_MAX_ERROR_STRING];
+extern int H5E_mpi_error_str_len;
+
+#define HMPI_ERROR(mpierr){ \
+ MPI_Error_string(mpierr, H5E_mpi_error_str, &H5E_mpi_error_str_len); \
+ HERROR(H5E_INTERNAL, H5E_MPIERRSTR, H5E_mpi_error_str); \
+}
+#define HMPI_GOTO_ERROR(retcode, str, mpierr){ \
+ HMPI_ERROR(mpierr); \
+ HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, retcode, str); \
+}
+#define HMPI_RETURN_ERROR(retcode, str, mpierr){ \
+ HMPI_ERROR(mpierr); \
+ HRETURN_ERROR(H5E_INTERNAL, H5E_MPI, retcode, str); \
+}
+#endif