LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Anthony J. Ciani (aciani1_at_[hidden])
Date: 2005-02-01 15:56:52


On Mon, 31 Jan 2005, Brian Barrett wrote:
> On Jan 31, 2005, at 5:15 PM, Jonathan Herriott wrote:
>
Umm, if you are using XLF, than just specify XLF as your FORTRAN compiler.
The command mpif77 will then be a wrapper for XLF, which will compile all
F77, F90, and F95 codes (possibly requiring some different flags for the
different types of sources).

This is also true if you are on Intel or AMD machines using ifort
(formally ifc). I believe that even pgf90 will compile F77 code.

If you want to have mixed compilers (g77 for F77 and something else for
F90), then use a Makefile which compiles all the F77 code, then sets
LAMHF77 to the F90 compiler and compiles those sources. You will almost
certainly need to link with the F90 compiler, as they will usually include
the GNU libraries, but GCC won't include the other compiler's stuff.

I can't really think of any reason to do this, because g77 is worse for
F77 than any of the F90 compilers, apart from pgf90 (which has
interroperability problems with g77, making one use pgf90 anyway).

>> 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?

Just make certain that whatever software package you are trying to compile
doesn't create its own mpi.mod, and that the object which creates it
simply wasn't being compiled. I have seen a few packages which do have
their own MPI wrappers (because some MPI calls didn't work efficiently in
the past, such as collectives).

> 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/
>
>
>

------------------------------------------------------------
               Anthony Ciani (aciani1_at_[hidden])
            Computational Condensed Matter Physics
    Department of Physics, University of Illinois, Chicago
               http://ciani.phy.uic.edu/~tony
------------------------------------------------------------