I'm trying to run this simple code to

***
#include <mpi.h>

int main(){
  char port_name[MPI_MAX_PORT_NAME];
  int provided;
  int thread_level = MPI_THREAD_MULTIPLE;
  MPI_Comm inter_comm;

  MPI_Init_thread(0, 0, thread_level, &provided);
  MPI_Open_port(MPI_INFO_NULL, port_name);
  MPI_Comm_accept(port_name, MPI_INFO_NULL, 0, MPI_COMM_SELF, &inter_comm);

  // Code never reach here.
  MPI_Comm_disconnect(&inter_comm);
  MPI_Close_port(port_name);
  MPI_Finalize();
  return 0;
}

***

The code is run with the following command.
***
> mpic++ server.cc
> mpiexec -mp ./a.out
***

Unfortunately it is crashed immediately after start with the following
error message.
****
$ mpiexec -np 1 ./a.out
[myhost:32527] OPAL ERROR: Timeout in file base/pmix_base_fns.c at line 195
[myhost:32527] *** An error occurred in MPI_Comm_accept
[myhost:32527] *** reported by process [776667137,0]
[myhost:32527] *** on communicator MPI_COMM_SELF
[myhost:32527] *** MPI_ERR_UNKNOWN: unknown error
[myhost:32527] *** MPI_ERRORS_ARE_FATAL (processes in this communicator
will now abort,
[myhost:32527] ***    and potentially your MPI job)
***
The code works just find on previous versions of open-mpi (1.10.x, 1.8.x)
and (MPICH).

I've compile the open-mpi myself with both default configuration and the
following:
***
> ./configure --enable-mpi-thread-multiple
***

Any suggestion?

Reply via email to