Single node, multiple MPI tasks

706 Views Asked by At

I need to debug an MPI code for which I only have access to a single node/machine. The problem is the bug I am looking for only arises when running on more than node but it doesn't when running, for example, two MPI tasks in the same node, everything goes fine. I assume that my MPI implementation (mviapich2) cleverly treats tasks running on the same node by, for example, replacing network communications by IPC strategies or even memcpy.

So my question is: how could I run two MPI tasks on a single node but making MPI treat them as tasks on different nodes? Is that possible?

1

There are 1 best solutions below

0
Hristo Iliev On BEST ANSWER

You can disable the MVAPICH2 shared memory device by setting the MV2_USE_SHARED_MEM environment variable to 0:

mpiexec ... -env MV2_USE_SHARED_MEM 0 ... ./executable

Make sure that your MVAPICH2 was built with the TCP/IP device, otherwise your ranks won't be able to communicate with shared memory support turned off.