On Jan 31, 2005, at 5:15 PM, Jonathan Herriott wrote:
> As far as I can tell it's unsupported, which I've read on here just to
> specify your F90 compiler instead of a F77 compiler. I have seen in
> multiple places, however, that they have F90 and F77 both on a LAM/MPI
> implementation while trying to find a solution to one of my questions.
> I can't figure out for the life of me how to have both Fortran 77 and
> Fortran 90 set up for the same LAM/MPI setup, which I need to do for a
> benchmark I have to run. I also have a benchmark here, which is a
> Fortran 90 program, and it fails compilation on the USE MPI statement
> in the program section of the code. I've tried using the flags -L and
> -l to specify where the mpi library is, but it still does not work.
> Any suggestions on what I should do?
LAM/MPI does not have a Fortran 90 module, which is part of the MPI-2
standard. Because of this, we do not have a mpif90 wrapper compiler.
We do, however, have Fortran bindings for all of MPI-1 and MPI-2 that
LAM supports. You can, of course, call these bindings from either F77
or F90.
The "use mpi" statement is part of Fortran 90 - pulling in the Fortran
90 module. Since we do not have a F90 module, this is going to fail
for you (and there's no real workaround). It may be possible to change
the "use mpi" to a "#include <mpif.h>", but I would guess that would
not work.
As for compiling the F77 and F90 code with the same build of LAM, the
easiest way is to use the "-showme" argument to mpif77 to determine
what libraries and compiler flags we pass to the underlying Fortran
compiler and use them directly. This isn't a recommended way of using
LAM, but it is really the only option available for using LAM with a
mix of Fortran 77 and 90 at this time.
If you really need Fortran 90 support on OS X, you might want to look
at MPICH. They have support for Fortran 90. The Open MPI project (the
next generation of LAM/MPI) will have complete Fortran 90 support, once
it becomes available.
Hope this helps,
Brian
--
Brian Barrett
LAM/MPI developer and all around nice guy
Have an LAM/MPI day: http://www.lam-mpi.org/
|