jemalloc and openmpi memory patcher

I’ve been using OpenMPI 1.8 and 2.0 together with jemalloc 3.6 for a year or two with no problem. Then last week it started to segfault and I’ve no idea what changed in my build or the cluster I use that can explain that. gdb show that it’s an interaction between OpenMPI _intercept_madvise and the jemalloc free.

From memory_patcher_component.c, _intercept_madvise is in a component called memory patcher so it can be disabled with

mpirun -mca memory ^patcher

(this is equivalent to pass export OMPI_MCA_memory=^patcher to each process).

This removed my segfaults. I don’t know what are the effects of the memory patcher component but I did not measured any performance regression after disabling it

#jemalloc, #openmpi