I am using OpenMPI with the Intel C++ compiler on an Intel Ubuntu system. Whenever I try to replace new[]
and delete[]
calls with MPI_Alloc_mem
and MPI_Free_mem
calls, respectively, I always get a segmentation fault.
The MPI_Alloc_mem
calls return MPI_SUCCESS
. The segmentation fault occurs on the call to MPI_Free_mem
. The MPI_Alloc_mem
calls are with MPI_INFO_NULL
. I explicitly typecast the void**
and void*
arguments in MPI_Alloc_mem
and MPI_Free_mem
respectively.
I have no idea why this happens. I'd appreciate any advice.