Newsgroups: comp.parallel.mpi
From: colella@nimue.plk.af.mil (Shari Colella NumerEx)
Subject: Re: Dynamic memory allocation in Fortran
Organization: Air Force Phillips Lab.
Date: 17 Sep 1996 15:58:33 GMT
Message-ID: <51mhr9$56@pr1.plk.af.mil>

In article <323EAD37.41C6@watson.ibm.com>, Marc Snir <snir@watson.ibm.com> writes:
|> Current design for put/get in MPI2 assumes that some of the communication functions will be
|> available only on systems that support dynamic memory allocation.  This requires, in Fortran,
|> support for nonstandard C-like/Cray-like pointers (integer variables that hold an address).
|> The type of code that is assumed to be supported is as shown below
|> 
|> REAL A
|> POINTER (P, A(100,100))  ! P is an integer pointer variable, pointing to A
|> CALL MPI_MEM_ALLOC(400, COMM, P, IERR) ! allocates memory and returns in P address
|> ! Now array A can be used
|> 
|> Questions:
|> 
|> 1. Can somebody point me to a Fortran system that does not support such syntax?
|> 2. Can someobdy point me to a Fortran system that does not support at all this functionality,
|> i.e., does not allow to return an address in an integer variable, and have this address used
|> as the starting address for an array?  (These are not Fortran 90 pointers!) 
|> 3. What should be the type of the 3rd dummy argument of MPI_MEM_ALLOC, on 64 bit systems?
|> -- 
|> 
|> Marc Snir  
|> IBM T.J. Watson Research Center
|> P.O. Box 218, Yorktown Heights, NY 10598
|> email: snir@watson.ibm.com
|> phone: 914-945-3204
|> fax:   914-945-4425
|> URL:   http://www.research.ibm.com/people/s/snir

I think I can answer at least 1 and 2, as our parallel code uses these Cray-style pointers, and we
have to be very careful about what platforms we use.

1.  Any i86 Fortran compiler, including under Solaris for i86.  We have asked Sun to add the support,
     but they claim that there is not enough demand.  Also, any Linux Fortran compiler (see 2).

2.  Absoft claims that their Fortran compiler for Linux supports these pointers, but we have not been
     able to get it to work for all of our declarations, so we don't believe them.

3.  Sorry, I can't answer this.

This is by no means a complete list, it just includes those that I know about personally.  If anyone
thinks I'm wrong about 1 or 2, please, please let me know!  We really want to run on Pentium Pros...

Shari
colella@nimue.plk.af.mil

