Subject: Request for information on Fortran systems that use MPI

From: Marc Snir/Watson/IBM Research <[email-masked]>
Date: 16 Sep 96 10:40:05

The current proposal for 1sided communication in MPI2 makes the use of some 
functions (lock/unlock, for shared memory emulation) 
contingent upon the availability of dynamic memory allocation and C-like 
pointers.  The type of code that is assumed to work in Fortran is shown below:

REAL A
POINTER (P, A(100,100))  ! declare P to be an (integer) pointer to array A
CALL MPI_MEM_ALLOC(400,comm,P,ierr)  ! allocate space for array A and returns 
in P address of allocated memory;  
! now array A can be used

This is not part of standard Fortran or Fortran 90 (Fortran 90 pointers cannot 
be used for this type of code), but is widely available in many Fortran 
environments.

Questions:

1. Are there Fortran systems that do not support (integer) pointers at all?
2. Are there systems that support such pointers, but require a syntax that is 
different than the one shown in the example above?
3. On 64 bit systems, what is the datatype used for (integer) pointers?  I.e., 
what should be the type of the 3rd formal argument of MPI_MEM_ALLOC?

If your pet Fortran has problems with this kind of code, please answer; 
otherwise you will be stuck with an MPI feature that you cannot use on your 
system.

---

From: James Cownie <[email-masked]>
Date: Tue, 17 Sep 1996 17:41:04 +0100

> 1. Are there Fortran systems that do not support (integer) pointers at all?

I believe that g77 is such a system.

    GNU F77 version 2.7.2 (sparc) compiled by GNU C version 2.7.2.
    GNU Fortran Front End version 0.5.16 compiled: May 30 1996 14:00:35

    jcownie@jim: g77 -o foo foo.f
    foo.f: In program `prof':
    foo.f:4: 
	     POINTER (P, A(100,100))   
	     ^
    Unimplemented or invalid form of statement at (^) -- statement ignored
    (this is a catchall diagnostic that currently applies to a wide
    variety of errors, including things like invalid ordering of
    statements)

-- Jim 

James Cownie 
Dolphin Interconnect Solutions
Phone : +44 117 9071438
E-Mail: [email-masked]