Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

From: Brian Barrett (bbarrett_at_[hidden])
Date: 2007-05-14 16:26:32


On May 14, 2007, at 10:21 AM, Nym wrote:

> I am trying to use MPI_TYPE_STRUCT in a 64 bit Fortran 90 program. I'm
> using the Intel Fortran Compiler 9.1.040 (and C/C++ compilers
> 9.1.045).
>
> If I try to call MPI_TYPE_STRUCT with the array of displacements that
> are of type INTEGER(KIND=MPI_ADDRESS_KIND), then I get a compilation
> error:
>
> fortcom: Error: ./test_basic.f90, line 34: There is no matching
> specific subroutine for this generic subroutine call.
> [MPI_TYPE_STRUCT]
> CALL MPI_TYPE_STRUCT(numTypes, blockLengths, displacements,
> oldTypes &
> -------^
> compilation aborted for ./test_basic.f90 (code 1)
>
> Attached is a small test program to demonstrate this. I thought
> according to the MPI specs that the displacement array should be of
> type MPI_ADDRESS_KIND. Am I wrong?

Have a look at the last paragraph of Section 10.2.2 of the MPI-2
standard. Functions from MPI-1 that take address-sized arguments use
INTEGER in Fortran. This was obviously a problem, which is why the
functions from MPI-1 that take an address-sized argument are
depricated in favor of new functions in MPI-2 that take proper
address kind arguments.

Two options:

   1) Use MPI_TYPE_STRUCT with INTEGER arguments
   2) Use MPI_TYPE_CREATE_STRUCT with ADDRESS_KIND arguments

Hope this helps,

Brian

-- 
   Brian W. Barrett
   Open MPI Team, CCS-1
   Los Alamos National Laboratory