Ticket #6436: aelaguizy_mpi_destructor.patch

File aelaguizy_mpi_destructor.patch, 446 bytes (added by aelaguiz@…, 11 years ago)

Proposed patch to check for MPI_COMM_NULL on destruction

  • communicator.hpp

    diff -dur mpi/communicator.hpp mpi_new/communicator.hpp
    old new  
    871871    {
    872872      int finalized;
    873873      BOOST_MPI_CHECK_RESULT(MPI_Finalized, (&finalized));
    874       if (!finalized)
     874      if (!finalized && MPI_COMM_NULL != *comm)
    875875        BOOST_MPI_CHECK_RESULT(MPI_Comm_free, (comm));
    876876      delete comm;
    877877    }