Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] Usage of MPI_Win_create with MPI_Comm_Spawn
From: Ramesh Vinayagam (rvinayagam.85_at_[hidden])
Date: 2014-03-17 19:48:49


Hi,

Can comm_spawn be used with win_create?

For ex:
Master process:
-----------------------

  MPI_Comm_spawn(worker_program,MPI_ARGV_NULL, world_size-1,
                 info, 0, MPI_COMM_SELF, &everyone,
                 MPI_ERRCODES_IGNORE);

  MPI_Win_create(&testval, sizeof(double), 1,
                 MPI_INFO_NULL, everyone,
                 &nwin);

Worker process:
------------------------

 MPI_Comm_get_parent(&parent);
  if (parent == MPI_COMM_NULL) error("No parent!");
  MPI_Comm_remote_size(parent, &size);
  if (size != 1) error("Something's wrong with the parent");

  MPI_Win_create(MPI_BOTTOM, 0,
                 1, MPI_INFO_NULL,
                 parent, &nwin);

This one fails currently. Am I doing something wrong. It would be great if
someone could help me.

Thanks
Ramesh