[mpich-devel] Developing MPI program without mpirun

Rui Liu liur at comp.nus.edu.sg
Sun Nov 20 19:55:03 CST 2016


Hi folks,

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,

[mpiexec at ciidaa-a01] match_arg (utils/args/args.c:159): unrecognized argument pmi_args
[mpiexec at ciidaa-a01] HYDU_parse_array (utils/args/args.c:174): argument matching returned error
[mpiexec at ciidaa-a01] parse_args (ui/mpich/utils.c:1596): error parsing input array
[mpiexec at ciidaa-a01] HYD_uii_mpx_get_parameters (ui/mpich/utils.c:1648): unable to parse user arguments
[mpiexec at ciidaa-a01] main (ui/mpich/mpiexec.c:153): error parsing parameters

Anyone knows how to achieve that? I attach my server and client key source code for your reference.

server side:

char myport[MPI_MAX_PORT_NAME];
MPI_Open_port(MPI_INFO_NULL, myport);
cout << myport << endl; (assume myport is tag#0$description#ciidaa-a01$port#52985$ifname#10.10.10.1$, it always return string like this)
MPI_Comm_accept(myport, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &client);
MPI_Recv(&number, 1, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, client, &status);


client side:

char name[] = "tag#0$description#ciidaa-a01$port#52985$ifname#10.10.10.1$";
MPI_Comm_connect(name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &server);
int number = -1 ;
MPI_Send(&number, 1, MPI_INT, 0, 0, server);


Best,
Rui

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/devel/attachments/20161121/bf3202af/attachment-0001.html>


More information about the devel mailing list