[Mpi-comments] Comments on MPI 3.0 draft 2
Rajeev Thakur
thakur at mcs.anl.gov
Thu Aug 23 21:45:31 CDT 2012
>>> On page 95, why does MPI_TYPE_CREATE_SUBARRAY use zero-based indexing for Fortran; I believe many other places in MPI use one-based array indices when called from Fortran, even if they use zero-based indices from C.
>>
>> I can't find any text that correspond to this remark.
>
> See page 96 lines 7-9 -- why is the function defined that way (requiring the n-1 modification to calls) for Fortran?
It is so that the Fortran binding can simply pass the array_of_starts to the C interface without having to allocate an array and copy over everything while subtracting by 1. For the user, the array_of_starts is often filled as a calculation. He can easily subtract 1 in the calculation.
It has been like that since MPI-2 (1997).
Rajeev
More information about the mpi-comments
mailing list