<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><div id="bloop_customfont" style="margin: 0px;">Hi folks,</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">I am working on a simple client/server program but I don’t want to use mpirun/mpiexec to start the program (In nature, I just want to adopt MPI API into my own project but cannot start it using mpirun). I mostly followed the singleton mode of MPI, using APIs like MPI_Open_port, MPI_Comm_connect, and MPI_Comm_accept. But it doesn’t work. The error info is presented as following,</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;"><div id="bloop_customfont" style="margin: 0px;">[mpiexec@ciidaa-a01] match_arg (utils/args/args.c:159): unrecognized argument pmi_args</div><div id="bloop_customfont" style="margin: 0px;">[mpiexec@ciidaa-a01] HYDU_parse_array (utils/args/args.c:174): argument matching returned error</div><div id="bloop_customfont" style="margin: 0px;">[mpiexec@ciidaa-a01] parse_args (ui/mpich/utils.c:1596): error parsing input array</div><div id="bloop_customfont" style="margin: 0px;">[mpiexec@ciidaa-a01] HYD_uii_mpx_get_parameters (ui/mpich/utils.c:1648): unable to parse user arguments</div><div id="bloop_customfont" style="margin: 0px;">[mpiexec@ciidaa-a01] main (ui/mpich/mpiexec.c:153): error parsing parameters</div></div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">Anyone knows how to achieve that? I attach my server and client key source code for your reference.</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;">server side:</div><div id="bloop_customfont" style="margin: 0px;"><br></div><div id="bloop_customfont" style="margin: 0px;"><div id="bloop_customfont">char myport[MPI_MAX_PORT_NAME];</div><div id="bloop_customfont">MPI_Open_port(MPI_INFO_NULL, myport);</div><div id="bloop_customfont">cout << myport << endl; (assume myport is tag#0$description#ciidaa-a01$port#52985$ifname#10.10.10.1$, it always return string like this)</div><div id="bloop_customfont">MPI_Comm_accept(myport, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &client);</div><div id="bloop_customfont">MPI_Recv(&number, 1, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, client, &status);</div><div id="bloop_customfont"><br></div><div id="bloop_customfont"><br></div><div id="bloop_customfont">client side:</div><div id="bloop_customfont"><br></div><div id="bloop_customfont"><div id="bloop_customfont">char name[] = "tag#0$description#ciidaa-a01$port#52985$ifname#10.10.10.1$";</div><div id="bloop_customfont">MPI_Comm_connect(name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &server);</div><div id="bloop_customfont">int number = -1 ;</div><div id="bloop_customfont">MPI_Send(&number, 1, MPI_INT, 0, 0, server);</div><div id="bloop_customfont"><br></div><div id="bloop_customfont"><br></div><div id="bloop_customfont">Best,</div><div id="bloop_customfont">Rui</div></div></div></div><div class="bloop_container"><div class="bloop_frame">  </div></div><br><div class="bloop_sign" id="bloop_sign_1479692712078381056"></div></body></html>