[FLASH-USERS] Re: "undefined reference" errors with MPICH.

From: Mark Weber <mweber@head-cfa.cfa.harvard.edu>
Date: Wed Jan 08 2003 - 16:03:28 CST

JB,

Thanks for the prompt response!

> What fortran compiler are you using? The problem you are having is due
> to how mpich's configure selected how to mangle fortran function
> names, they can either be a single under score or a double underscore.
> You should see this error if you try to build the examples in the
> mpich installation directory under examples as well. If you are using
> intel's fortran compiler, first off, use version 6.0, and second you
> need to set some environment variables to help configure get the name
> mangling right. The following should work starting with a clean mpich
> distribution:

I will have ask the systems guy which fortran compiler was used on MPICH.
We are setting <mpif90> in the Makefile.h for FLASH.

Regarding the underscore issue, I have mixed indicators. As shown by the
error fragment I had appended, the variable names show single underscores.
One reference I found suggested the following command:

"nm /mpich/installation/path/on/your/system/libmpich.a | grep mpi_init"

which is supposed to tell one "how many underscores your library assumes."
Our result on Press is

press$ nm libmpich.a | grep mpi_init
00000000 W mpi_init__
00000000 T pmpi_init__
00000000 W mpi_initialized__
00000000 T pmpi_initialized__

which indicates *two* underscores, which agrees with your theory. However,
we have already tried the MPICH example programs, and they compiled and
ran without a hiccup.

I will contact our system guy about the fortran compiler for MPICH, and
show him your recommendations for the MPICH configure. Hopefully, this
will be worked out in short order.

> Also, I've added the following e-mail address to flash-users:
> mweber@head-cfa.cfa.harvard.edu , is this the e-mail address you be
> sending message to the flash-users list from always? The list is
> restricted so you'll need to come from the address in order for the
> message to make through to the list.

Yes, the email address you quote for me is my regular address, and will be
the one I send to the list from. I guess on my registration form, I put
"mweber@cfa.harvard.edu" because they are the same account, and I
automatically use the shorter version.

Thanks,
Mark
Received on Wed Jan 8 16:07:04 2003

This archive was generated by hypermail 2.1.8 : Thu Aug 31 2006 - 21:20:48 CDT