[MPI3 Fortran] Proposing changes to Fortran 2008
    Jeff Squyres 
    jsquyres at cisco.com
       
    Tue Mar 18 20:16:23 CDT 2008
    
    
  
On Mar 18, 2008, at 11:02 AM, Craig Rasmussen wrote:
>> No.
>
> Yes!  (sorry, couldn't resist Jeff :-)
>
> What you say below is as I expected.  If you have an array of foo,
> then foo must be contiguous in order for you to be able to stride
> though it to get at each (noncontiguous) char c.  I don't think we
> disagree here.  In Fortran, you can take a slice of an array so that
> the sliced elements aren't contiguous anymore.  The compiler handles
> this by modifying the array meta-data (stride information), or if
> necessary when going to C, make a copy.  So in Fortran we have to be
> a little more careful what we mean by contiguous (and I'm sure I
> don't fully understand it yet).
There is absolutely no requirement for contiguousness of user buffers  
in the C bindings for MPI.
Indeed, you can construct an MPI datatype (map) based off an arbitrary  
reference point in memory (e.g., NULL) and use relative memory offsets  
to describe the layout of the data that you want to access.  Hence,  
the pointer that you pass to MPI_SEND may actually have a memory map  
that spans all over actual memory.
-- 
Jeff Squyres
Cisco Systems
    
    
More information about the mpiwg-fortran
mailing list