A few points to add to this discussion...
1. In the new (proposed) MPI-3 Fortran bindings (i.e., the "use mpi_f08"
module), array subsections will be handled properly by MPI. However, we'll
have to wait for the Fortran compilers to support F08 features first (i.e.,
both the MPI Forum and the F
Thanks all for your converging point of view about my problem.
Portability is also an important point for this code so there is only one
solution: using user defined data type.
In my mind, this was more for C or C++ code without the fortran subarray
behavior but I was in error.
The problem is
When it comes to intrinsic Fortran-90 functions, or to libraries provided by
the compiler vendor
[e.g. MKL in the case of Intel], I do agree that they *should* be able to parse
the array-section
notation and use the correct memory layout.
However, for libraries that are not part of Fortran-90, s
Actually, sub array passing is part of the F90 standard (at least
according to every document I can find), and not an Intel extension. So
if it doesn't work you should complain to the compiler company. One of
the reasons for using it is that the compiler should be optimized for
whatever method
Hi Patrick
>From my mere MPI and Fortran-90 user point of view,
I think that the solution offered by the MPI standard [at least up to MPI-2]
to address the problem of non-contiguous memory layouts is to use MPI
user-defined types,
as I pointed out in my previous email.
I like this solution becaus
Thanks all for your anwers. yes, I understand well that it is a non contiguous
memory access problem as the MPI_BCAST should wait for a pointer on a valid
memory zone. But I'm surprised that with the MPI module usage Fortran does not
hide this discontinuity in a contiguous temporary copy of the
The interface to MPI_Bcast does not specify a assumed-shape-array dummy
first argument. Consequently, as David points out, the compiler makes a
contiguous temporary copy of the array section to pass to the routine. If
using ifort, try the "-check arg_temp_created" compiler option to verify
creation
What FORTRAN compiler are you using? This should not really be an issue
with the MPI implementation, but with the FORTRAN. This is legitimate
usage in FORTRAN 90 and the compiler should deal with it. I do similar
things using ifort and it creates temporary arrays when necessary and it
all works
Hi Patrick
I think tab(i,:) is not contiguous in memory, but has a stride of nbcpus.
Since the MPI type you are passing is just the barebones MPI_INTEGER,
MPI_BCAST expects the four integers to be contiguous in memory, I guess.
The MPI calls don't have any idea of the Fortran90 memory layout,
and
I've got a strange problem with Fortran90 and MPI_BCAST call on a large
application. I've isolated the problem in this short program samples.
With fortran we can use subarrays in functions calls. Example, with passing a
subarray to the "change" procedure:
MODULE mymod
IMPLICIT NONE
CONTAINS
S
10 matches
Mail list logo