Open MPI logo

Open MPI User's Mailing List Archives

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

From: Brian Barrett (brbarret_at_[hidden])
Date: 2006-01-30 16:27:55


On Jan 30, 2006, at 10:32 AM, Michael Kluskens wrote:

> Question regarding f90 compiling
>
> Using:
>
> USE MPI
>
> instead of
>
> include 'mpif.h'
>
> makes the compilation take an extra two minutes using g95 under OS X
> 10.4.4 (simple test program 115 seconds versus 0.2 seconds)
>
> Is this normal?

Unfortunately, yes. The difference is that "include 'mpif.h'" will
bring in a simple Fortran 77 header, declaring just the MPI
parameters needed (like declaring MPI_COMM_WORLD as an integer with
value 0, for Open MPI). Using "USE MPI" will bring in the Fortran 90
module, which includes a huge number of interface declarations to
cover all the possible type combinations available for the rather
large number of functions in MPI. This leads to a module file that
is over 50,000 lines long.

Right now, we include up to 4 array dimensions for each type (so you
can pass a 4 dimension array of INTEGER, for example). If you never
use that many array dimensions, you can reconfigure Open MPI with the
configure option --with-f90-max-array-dim=<NUM>, where <NUM> is the
maximum array dimensions you will ever use in your Fortran
application. The code inside Open MPI doesn't depend on this value -
the only place it is used is figuring out how far to go with
generating the function declarations for the Fortran 90 module file.

Hope this helps,

Brian

-- 
   Brian Barrett
   Open MPI developer
   http://www.open-mpi.org/