[mpich-discuss] Deprecated C++ bindings
Raffenetti, Ken
raffenet at anl.gov
Mon Jan 24 14:21:51 CST 2022
Checking return codes will work, but another option that you might want to try is to install a custom error handler function.
https://www.mpich.org/static/docs/v3.4.x/www3/MPI_Comm_create_errhandler.html
Your error handler callback function will then be invoked by MPI at the detection of an error, before returning back to the application.
Ken
On 1/24/22, 1:56 PM, "Mccall, Kurt E. (MSFC-EV41) via discuss" <discuss at mpich.org> wrote:
Hi,
Up to now I’ve been using this in my C++ code:
MPI_Comm_set_errhandler(intercom, MPI::ERRORS_THROW_EXCEPTIONS);
and hoping the MPI function calls would throw MPI::Exception when there is a problem.
Is the recommended approach now just to test the return values from the functions?
Using 4.0rc3.
Thanks,
Kurt
More information about the discuss
mailing list