[MPI3 Fortran] Variable length argument lists

Jeff Squyres jsquyres at cisco.com
Tue Oct 21 06:22:35 CDT 2008


Fortran experts --

The MPI 2.1 spec lists some Fortran callback signatures as having  
variable arguments.  I do believe that this is a holdover from a long,  
long time ago, and I believe that whoever wrote this section simply  
copied the C prototypes.  If the spec is wrong, I'd like to get it  
fixed during the ongoing MPI-2.1 process.  See MPI-2.1 p266 line 29,  
or http://www.mpi-forum.org/docs/mpi21-report-bw/node183.htm#Node183.

The Fortran callback signature is expressed as:

SUBROUTINE COMM_ERRHANDLER_FN(COMM, ERROR_CODE, ...)
INTEGER COMM, ERROR_CODE

1. Does Fortran have variable length argument lists (akin to C  
varargs)?  If so, was it introduced in a specific version of Fortran?   
(I realize that F77 compilers do no checking and you can pass as many/ 
few arguments as you want)

2. If Fortran has variable length argument lists, what is the correct  
syntax to express them?  Is "..." correct?  Or is there a different way?

Thanks.

-- 
Jeff Squyres
Cisco Systems




More information about the mpiwg-fortran mailing list