Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: Neil Storer (Neil.Storer_at_[hidden])
Date: 2005-03-17 07:29:22


Greg,

Be careful when you say:

> The Fortrans are compatible enough that a single MPI library can deal
> with all. The calling convention stuff happens to work because MPI
> doesn't happen to have any calls that hit the "f2c abi" issue. The
> underscore thing can be handled with multiple symbols for each entry
> point. -- greg
>
We've just spent several days of debugging a large scientific code
eventually to find that calling a routine with LOGICAL parameters that
was compiled with *pathf90*, from a routine compiled with *pgf90* *does
not work*.

It transpires that the machine representation for fortran logicals are
different between the two compilers, as shown below

            TRUE FALSE
pathf90 1 0
pgf90 -1 0

(Note that using pgf90 options -Munixlogical -Mnounixlogical does not
change the value stored by pgf90 logicals)

*This is an example where you have to be very careful coding and using
an ABI.*

Regards
       Neil

-- 
+-----------------+---------------------------------+------------------+
| Neil Storer     |    Head: Systems S/W Section    | Operations Dept. |
+-----------------+---------------------------------+------------------+
| ECMWF,          | email: neil.storer_at_[hidden]    |    //=\\  //=\\  |
| Shinfield Park, | Tel:   (+44 118) 9499353        |   //   \\//   \\ |
| Reading,        |        (+44 118) 9499000 x 2353 | ECMWF            |
| Berkshire,      | Fax:   (+44 118) 9869450        | ECMWF            |
| RG2 9AX,        |                                 |   \\   //\\   // |
| UK              | URL:   http://www.ecmwf.int/    |    \\=//  \\=//  |
+--+--------------+---------------------------------+----------------+-+
   | ECMWF is the European Centre for Medium-Range Weather Forecasts |
   +-----------------------------------------------------------------+