Community
cancel
Showing results for 
Search instead for 
Did you mean: 
dlinenbe
Beginner
96 Views

MPI_Comm_spawn seg fault when used with MPI_Info_set

Hello,

I am a licensed user of Intel MPI for Windows. (5.0.3)   64 bit, Windows 7

I am using MPI_Comm_spawn, and the program crashes when I use MPI_Info_set.

This can be seen as follows:

Master.exe (root node)

#include "mpi.h" 
#include <stdio.h>
#include<Windows.h>
int main( int argc, char **argv ) 

    int intercomm;
    MPI_Init(&argc, &argv); 
    MPI_Info info;
    MPI_Info_create(&info);
    MPI_Info_set(info, "host", "localhost");           // Crashes with host set to localhost,  If this line is commented out, program works fine
    MPI_Comm_spawn("hello.exe", MPI_ARGV_NULL, 2, info, 0, MPI_COMM_SELF, &intercomm, MPI_ERRCODES_IGNORE);  //<-- Intel MPI crashes 
    Sleep(10000);
    MPI_Finalize();

The slave executable: (Hello.exe)

int main_(int argc, char **argv)
{
    MPI_Init(&argc, &argv);
    printf("helloworld\n"); 
    fflush(stdout);
    Sleep(10000);
}

I run with mpiexec -delegate -n 1 Master.exe

The program works fine with the MPI_Info_set line commented out , or using MPI_INFO_NULL. 

It also crashes if I set the "hostfile" key, and supply localhost as the first line of my hostfile. Getting this to work properly is critical to our business!

Thanks,

David Linenberg

 

 

0 Kudos
2 Replies
dlinenbe
Beginner
96 Views

 

As a note:

I tried the above programs using OpenMPI on an Amazon Linux AWS micro-instance. The code worked fine without any crashing, both with the "host" key set to "localhost"  and "127.0.0.1", as well as with the "hostfile" key (and a hostfile which contained localhost on the first line of the file).  

David Linenberg

 

okkebas
Beginner
96 Views

I have a similar but different problem.In my case MPI_COMM_SPAWN doesn't use the MPI_INFO at all. To test I do something like

      infokeys = '-bootstrap'
      infovalues = 'forkwrong'

      call MPI_INFO_CREATE(info,ierr)
      call MPI_INFO_SET(info, infokeys, infovalues, ierr)

 

since the value for infovalues is not valid, I expected it would crash, However it will just run. When I set infovalues correct, it will also run, but seems MPI_COMM_SPAWN ignores the MPI_INFO information.

 Does intel mpi only accept certain mpirun options in MPI_INFO when calling MPI_COMM_SPAWN?

I'm using  intel mpi 5.0.3.048

Thanks!

Reply