[Debian-astro-commits] [gyoto] 72/221: Set an MPI error handler in Yorick (only attached to MPI_COMM_WORLD atm.)
Thibaut Jean-Claude Paumard
thibaut at moszumanska.debian.org
Fri May 22 20:52:34 UTC 2015
This is an automated email from the git hooks/post-receive script.
thibaut pushed a commit to branch master
in repository gyoto.
commit 9ac7d4aeaf91ff1ded73de320699bfb73da60e37
Author: Thibaut Paumard <paumard at users.sourceforge.net>
Date: Wed Oct 22 16:36:53 2014 +0200
Set an MPI error handler in Yorick (only attached to MPI_COMM_WORLD atm.)
---
yorick/gyoto_utils.C | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/yorick/gyoto_utils.C b/yorick/gyoto_utils.C
index 331d576..97fd64a 100644
--- a/yorick/gyoto_utils.C
+++ b/yorick/gyoto_utils.C
@@ -41,6 +41,16 @@ static YGyotoSupplier_t *YGyotoGlobalSupplier = NULL;
void ygyotoErrorHandler (const Gyoto::Error e) { y_error(e); }
+void ygyotoMPIErrorHandlerFcn(MPI_Comm * comm, int * error_code, ...) {
+ char error_string[MPI_MAX_ERROR_STRING];
+ int error_string_length;
+ MPI_Error_string(*error_code, error_string, &error_string_length);
+ error_string[error_string_length] = '\0';
+ y_error(error_string);
+}
+
+MPI_Errhandler ygyotoMPIErrorHandler;
+
extern "C" {
void
@@ -209,6 +219,10 @@ extern "C" {
yput_global(index, 0);
yarg_drop(1);
}
+ MPI_Comm_create_errhandler(&ygyotoMPIErrorHandlerFcn,
+ &ygyotoMPIErrorHandler);
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, ygyotoMPIErrorHandler);
+
#else
ypush_long(1);
#endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/gyoto.git
More information about the Debian-astro-commits
mailing list