[mvapich-discuss] Troubles when using MPI_Open_port

Hari Subramoni subramoni.1 at osu.edu
Fri Apr 17 09:38:28 EDT 2015


Good to know that running with the environment solves the issue for you :-).

Regards,
Hari.

On Fri, Apr 17, 2015 at 9:27 AM, 马凯 <makailove123 at 163.com> wrote:

> It works effectively. Thanks for you help!
>
>
>
>
>
> At 2015-04-17 20:46:58, "Hari Subramoni" <subramoni.1 at osu.edu> wrote:
>
> Hello,
>
> Can you try running with "MV2_SUPPORT_DPM=1" and see if it solves the
> issue?
>
> Please refer to the following section of the userguide for more
> information.
>
>
> http://mvapich.cse.ohio-state.edu/static/media/mvapich/mvapich2-2.1-userguide.html#x1-23100011.73
>
> If this does not help solve your issue, can you please send the output of
> mpiname -a?
>
> Regards,
> Hari.
>
> On Fri, Apr 17, 2015 at 8:36 AM, 马凯 <makailove123 at 163.com> wrote:
>
>> I tried to use MPI_Open_port in my program, but when I run it, I got the
>> error message as this:
>> [cli_0]: aborting job:
>> Fatal error in PMPI_Open_port:
>> Other MPI error, error stack:
>> PMPI_Open_port(123): MPI_Open_port(MPI_INFO_NULL, port=0x7fff87806ed0)
>> failed
>> MPID_Open_port(70).: Function not implemented
>>
>> Could some one give me some help?
>> Thanks!
>>
>> This is my code:
>> #include <mpi.h>
>> #include <stdio.h>
>> #include <stdlib.h>
>>
>> #define MAX_DATA 1024
>>
>> int main(int argc, char *argv[]) {
>>     MPI_Comm client;
>>     MPI_Status status;
>>     char port_name[MPI_MAX_PORT_NAME];
>>     double buf[MAX_DATA];
>>     int size, again;
>>     MPI_Init(&argc, &argv);
>>     MPI_Comm_size(MPI_COMM_WORLD, &size);
>>     if (size != 1) {
>>         printf("Server too big\n");
>>         exit(EXIT_FAILURE);
>>     }
>>     MPI_Open_port(MPI_INFO_NULL, port_name);
>>     printf("server available at %s\n", port_name);
>>     while (1) {
>>         MPI_Comm_accept(port_name, MPI_INFO_NULL, 0, MPI_COMM_WORLD,
>> &client);
>>         again = 1;
>>         while (again) {
>>             MPI_Recv(buf, MAX_DATA, MPI_DOUBLE, MPI_ANY_SOURCE,
>> MPI_ANY_TAG, client, &status);
>>             switch (status.MPI_TAG) {
>>                 case 0: MPI_Comm_free(&client);
>>                         MPI_Close_port(port_name);
>>                         MPI_Finalize();
>>                         return 0;
>>                 case 1: MPI_Comm_disconnect(&client);
>>                         again = 0;
>>                         break;
>>                 case 2: /* do something */
>>                         break;
>>                 default:
>>                         /* Unexpected message type */
>>                         MPI_Abort(MPI_COMM_WORLD, 1);
>>             }
>>         }
>>     }
>> }
>>
>>
>>
>>
>> _______________________________________________
>> mvapich-discuss mailing list
>> mvapich-discuss at cse.ohio-state.edu
>> http://mailman.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss
>>
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cse.ohio-state.edu/pipermail/mvapich-discuss/attachments/20150417/a53d7600/attachment.html>


More information about the mvapich-discuss mailing list