include("../../include/msg-header.inc"); ?>
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