Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] MPI_MAX_PORT_NAME different in C and Fortran headers
From: Enzo Dari (enzodari_at_[hidden])
Date: 2011-11-14 17:09:37

I'm trying to establish communications between two mpi processes using
MPI_Open_port / MPI_Publish_name / MPI_Comm_accept
in a server and
MPI_Lookup_name / MPI_Comm_connect
in a client.
The source code is in fortran, and the client fails with some sort of
"malloc error".
It seems that the different values for the MPI_MAX_PORT_NAME constants
between C (1024) and Fortran (255) is the reason for the problem.
Declaring the Port_name variable in Fortran with size 1023 solves this
problem, buy I'm not sure if this is the proper way to handle this issue,
and I'm not aware of the possible side-effects of changing
MPI_MAX_PORT_NAME in .../include/mpi/mpif-common.h
I'm using openmpi 1.4.2 (included in debian stable: 6.0.3) with gfortran
4.4.5 (also the version included in debian stable). Also tried with openmpi
1.4.4 and ifort 11.1

Enzo A. Dari
Instituto Balseiro / Centro Atomico Bariloche