Good Afternoon,

I'm trying to diagnose an issue I've been having with MPI_Comm_Spawn. When I 
run the simple example program:

#include "mpi.h"
#include <stdio.h>
#include <stdlib.h>

int main( int argc, char *argv[] )
    int np[2] = { 1, 1 };
    int errcodes[2];
    MPI_Comm parentcomm, intercomm;
    char *cmds[2] = { "spawn_example", "spawn_example" };
    MPI_Info infos[2] = { MPI_INFO_NULL, MPI_INFO_NULL };

    MPI_Init( &argc, &argv );
    MPI_Comm_get_parent( &parentcomm );
    if (parentcomm == MPI_COMM_NULL)
        /* Create 2 more processes - this example must be called 
spawn_example.exe for this to work. */
        MPI_Comm_spawn_multiple( 2, cmds, MPI_ARGVS_NULL, np, infos, 0, 
MPI_COMM_WORLD, &intercomm, errcodes );
        printf("I'm the parent.\n");
        printf("I'm the spawned.\n");
    return 0;

I get the output:


It looks like MPI_INIT failed for some reason; your parallel process is

likely to abort.  There are many reasons that a parallel process can

fail during MPI_INIT; some of which are due to configuration or environment

problems.  This failure appears to be an internal failure; here's some

additional information (which may only be relevant to an Open MPI


  ompi_dpm_dyn_init() failed

  --> Returned "Unreachable" (-12) instead of "Success" (0)


I'm using OpenMPI 3.1.1. I know past versions (like 2.x) had a similar issue, 
but I believe those were fixed by this version. Is there something else that 
can cause this?

Thank you,
users mailing list

Reply via email to