Initialize the mpi_errcode argument to MPI_Abort in MPAS's log_abort routine#1418
Initialize the mpi_errcode argument to MPI_Abort in MPAS's log_abort routine#1418mgduda wants to merge 3 commits intoMPAS-Dev:developfrom
Conversation
islas
left a comment
There was a problem hiding this comment.
Would it make sense to use a value of 6 (SIGABRT) for mpi_errcode? It could allow for catching and cleaning up elsewhere (e.g. in a coupled situation) which may be a good or bad thing.. Same for potentially creating core dumps which most people may not find useful. All assuming the MPI implementation utilizes and forwards the errcode passed in.
SIGKILL is the most straight-forward and simplest.
Just some thoughts.
|
Sure, we can use I'll push an update shortly. |
|
Actually, I found a couple of other places in MPAS where we call |
…routine The mpi_errcode variable in log_abort that is passed as the errorcode input argument to MPI_Abort was previously uninitialized, leading to the potential use of uninitialized memory in MPI_Abort (or in routines called by MPI_Abort). In practice, the uninitialized value in mpi_errcode caused no problems, though when running MPAS with valgrind's memcheck tool, it could lead to the generation of (possibly numerous) uninitialized memory errors in the log from memcheck. This commit initializes mpi_errcode with a value of 6, corresponding to the POSIX SIGABRT signal number, though the specific value is probably not important.
…_abort The mpi_errcode variable in mpas_dmpar_global_abort that is passed as the errorcode input argument to MPI_Abort was previously uninitialized, leading to the potential use of uninitialized memory in MPI_Abort (or in routines called by MPI_Abort). In practice, the uninitialized value in mpi_errcode caused no problems, though when running MPAS with valgrind's memcheck tool, it could lead to the generation of uninitialized memory errors in the log from memcheck. This commit initializes mpi_errcode with a value of 6, corresponding to the POSIX SIGABRT signal number, though the specific value is probably not important.
The mpi_errcode variable in mpas_dmpar_abort that is passed as the errorcode input argument to MPI_Abort was previously uninitialized, leading to the potential use of uninitialized memory in MPI_Abort (or in routines called by MPI_Abort). In practice, the uninitialized value in mpi_errcode caused no problems, though when running MPAS with valgrind's memcheck tool, it could lead to the generation of uninitialized memory errors in the log from memcheck. This commit initializes mpi_errcode with a value of 6, corresponding to the POSIX SIGABRT signal number, though the specific value is probably not important.
f84999b to
97680bd
Compare
This PR initializes the
mpi_errcodeargument toMPI_Abortin several MPAS routines.The
mpi_errcodevariable in MPAS'slog_abort,mpas_dmpar_global_abort, andmpas_dmpar_abortroutines that is passed as theerrorcodeinput argument toMPI_Abortwas previously uninitialized, leading to the potential use of uninitialized memory inMPI_Abort(or in routines called byMPI_Abort).In practice, the uninitialized value in
mpi_errcodecaused no problems, though when running MPAS with valgrind's memcheck tool, it could lead to the generation of (possibly numerous) uninitialized memory errors in the log from memcheck.Note that although this PR initializes the
mpi_errcodevariable with a value of 6, corresponding to the POSIX SIGABRT signal number, the specific value is probably not important.