Fortran 90 and BeoMPI
Robert G. Brown
rgb at phy.duke.edu
Wed Mar 14 11:08:26 PST 2001
On Wed, 14 Mar 2001, Martin Siegert wrote:
> The problem is g77 and libraries built to work with g77:
> g77 has the "unfortunate" (to put it mildly) property to append two
> underscores to a function name, if the function name already contains
> an underscore. E.g., if your fortran program calls MPI_Comm_rank g77
> calls mpi_comm_rank__ and looks for that reference in the MPI library.
> Hence a library built to work with g77 contains mpi_comm_rank__ and not
> mpi_comm_rank_. Sigh. All other compilers I have worked with so far
> just append a single underscore (e.g., mpi_comm_rank_) regardless of
> whether the function name already contains an underscore.
> Solution? As a workaround you could call mpi_comm_rank_ from your program...
> Which makes your program non portable, etc. Very ugly.
> Otherwise you need a new library. I wish that all libraries that support
> fortran would be built by appending a single underscore to function
> names by default (and thus breaking compatability with g77). Only if
> support for g77 is explicitely required should a wrapper for g77 be
> included as well. Performance wise that should be irrelevant: g77 is
> the slowest compiler around anyway so an additional wrapper doesn't
> matter much.
Thanks! This explains something that puzzled the hell out of me when I
sought (unsuccessfully) to integrate a single timer object module with
both the C and Fortran version of stream on the dual athlon tests.
my_second() wasn't such a great name, then.
I just don't use Fortran (if I can possibly help it, and I nearly
always can:-) these days...
rgb
--
Robert G. Brown http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567 Fax: 919-660-2525 email:rgb at phy.duke.edu
More information about the Beowulf
mailing list