[mpich2-commits] r7522 - mpich2/trunk/src/mpi/errhan

gropp at mcs.anl.gov gropp at mcs.anl.gov
Mon Nov 29 13:23:58 CST 2010


Author: gropp
Date: 2010-11-29 13:23:58 -0600 (Mon, 29 Nov 2010)
New Revision: 7522

Modified:
   mpich2/trunk/src/mpi/errhan/comm_call_errhandler.c
   mpich2/trunk/src/mpi/errhan/win_call_errhandler.c
Log:
Correct mechanism for calling the C++ installed error handler

Modified: mpich2/trunk/src/mpi/errhan/comm_call_errhandler.c
===================================================================
--- mpich2/trunk/src/mpi/errhan/comm_call_errhandler.c	2010-11-29 19:22:10 UTC (rev 7521)
+++ mpich2/trunk/src/mpi/errhan/comm_call_errhandler.c	2010-11-29 19:23:58 UTC (rev 7522)
@@ -126,12 +126,16 @@
     /* Process any user-defined error handling function */
     switch (comm_ptr->errhandler->language) {
     case MPID_LANG_C:
+	(*comm_ptr->errhandler->errfn.C_Comm_Handler_function)( 
+	    &comm_ptr->handle, &errorcode );
+	break;
 #ifdef HAVE_CXX_BINDING
     case MPID_LANG_CXX:
+	MPIR_Process.cxx_call_errfn( 0, &comm_ptr->handle, 
+				     &errorcode, 
+		       comm_ptr->errhandler->errfn.C_Comm_Handler_function );
+	break;
 #endif
-	(*comm_ptr->errhandler->errfn.C_Comm_Handler_function)( 
-	    &comm_ptr->handle, &errorcode );
-	break;
 #ifdef HAVE_FORTRAN_BINDING
     case MPID_LANG_FORTRAN90:
     case MPID_LANG_FORTRAN:

Modified: mpich2/trunk/src/mpi/errhan/win_call_errhandler.c
===================================================================
--- mpich2/trunk/src/mpi/errhan/win_call_errhandler.c	2010-11-29 19:22:10 UTC (rev 7521)
+++ mpich2/trunk/src/mpi/errhan/win_call_errhandler.c	2010-11-29 19:23:58 UTC (rev 7522)
@@ -121,12 +121,16 @@
 #endif
     switch (win_ptr->errhandler->language) {
     case MPID_LANG_C:
+	(*win_ptr->errhandler->errfn.C_Win_Handler_function)( 
+	    &win_ptr->handle, &errorcode );
+	break;
 #ifdef HAVE_CXX_BINDING
     case MPID_LANG_CXX:
+	MPIR_Process.cxx_call_errfn( 2, &win_ptr->handle, 
+				     &errorcode, 
+		       win_ptr->errhandler->errfn.C_Win_Handler_function );
+	break;
 #endif
-	(*win_ptr->errhandler->errfn.C_Win_Handler_function)( 
-	    &win_ptr->handle, &errorcode );
-	break;
 #ifdef HAVE_FORTRAN_BINDING
     case MPID_LANG_FORTRAN90:
     case MPID_LANG_FORTRAN:



More information about the mpich2-commits mailing list