Hello, Placement of data in memory is highly implementation dependent. I assume you are running on Linux. This OS libc (glibc) provides two different methods for dynamic allocation of memory heap allocation and anonymous mappings. Heap allocation is used for small data up to MMAP_TRESHOLD bytes in length (128 KiB by default, controllable by calls to mallopt(3)). Such allocations end up at predictable memory addresses as long as all processes in your MPI job allocate memory following exactly the same pattern. For larger memory blocks malloc() uses private anonymous mappings which might end at different locations in the virtual address space depending on how it is being used.
What this has to do with your Fortran code? Fortran runtimes use malloc() behind the scenes to allocate automatic heap arrays as well as ALLOCATABLE ones. Small arrays are allocated on the stack usually and will mostly have the same addresses unless some stack placement randomisation is in effect. Hope that helps. Kind regards, Hristo > From: users-boun...@open-mpi.org [mailto:users-boun...@open-mpi.org] On Behalf Of Priyesh Srivastava > Sent: Saturday, July 21, 2012 10:00 PM > To: us...@open-mpi.org > Subject: [OMPI users] issue with addresses > > Hello > > I am working on a mpi program. I have been printing the addresses of different variables and arrays using the MPI_GET_ADDRESS command. What I have > noticed is that all the processors are giving the same address of a particular variable as long as the address is less than 2 GB size. When the address of a > variable/ array is more than 2GB size different processors are giving different addresses for the same variable. (I am working on a 64 bit system and am using > the new MPI Functions and MPI_ADDRESS_KIND integers for getting the addresses). > > my question is that should all the processors give the same address for same variables? If so then why is this not happening for variables with larger addresses. > > > thanks > priyesh -- Hristo Iliev, Ph.D. -- High Performance Computing RWTH Aachen University, Center for Computing and Communication Rechen- und Kommunikationszentrum der RWTH Aachen Seffenter Weg 23, D 52074 Aachen (Germany) Tel: +49 241 80 24367 -- Fax/UMS: +49 241 80 624367
smime.p7s
Description: S/MIME cryptographic signature