Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: [OMPI users] Simple MPI_Comm_spawn program hangs
From: Prakash Velayutham (prakash.velayutham_at_[hidden])
Date: 2007-12-01 12:28:49


Hello,

Open MPI 1.2.4

I am trying to run a simple C program.

######################################################################################

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

void
main(int argc, char **argv)
{

         int tag = 0;
         int my_rank;
         int num_proc;
         char message_0[] = "hello slave, i'm your master";
         char message_1[50];
         char master_data[] = "slaves to work";
         int array_of_errcodes[10];
         int num;
         MPI_Status status;
         MPI_Comm inter_comm;
         MPI_Info info;
         int arr[1];
         int rc1;

         MPI_Init(&argc, &argv);
         MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
         MPI_Comm_size(MPI_COMM_WORLD, &num_proc);

         printf("MASTER : spawning a slave ... \n");
         rc1 = MPI_Comm_spawn("/bin/hostname", MPI_ARGV_NULL, 1,
MPI_INFO_NULL, 0, MPI_COMM_WORLD, &inter_comm, arr);

         MPI_Finalize();
         exit(0);
}

######################################################################################

This program hangs as below:

prakash_at_bmi-xeon1-01:~/thesis/CS/Samples> ./master1
MASTER : spawning a slave ...
bmi-xeon1-01

Any ideas why?

Thanks,
Prakash