I am learning to program in MPI in C and I didn't manage to find what happens with the dynamically allocated memory (malloc/calloc) in all processes from a MPI communicator/group when one of the processes calls MPI_Abort.
Not freeing the dynamically allocated memory can cause malfunctions/unpredictable behaviors? Is this considered as a leak?
MPI_Abort() is analogous to
This routine makes a "best attempt" to abort all tasks in the group of
comm. This function does not require that the invoking environment take any action with the error code. However, a Unix or POSIX environment should handle this as a return errorcode from the main program.
Where it is effective at aborting processes, any dynamically-allocated memory held by those processes is released back to the OS. Dynamic allocations do not survive process termination. So,
Not freeing the dynamically allocated memory can cause malfunctions/unpredictable behaviors?
To some extent.
Is this considered as a leak?
There is no leak of
calloc()ed memory arising from the operation of
MPI_Abort(). Memory leaking is relevant only in the context of a process that continues to run.