OK, I think I may be able to answer my own question. But if anyone can
confirm my understanding or offer some deeper insight, I would appreciate
it.
A short answer is: One should not worry about this (i.e. different numbers
of underscores in the function names) if he uses the compiler consistently.
That is, if he used gcc to build LAM and used gcc as the underlying compiler
for mpicc, that's OK, even though the number of underscores in the name of
the functions in the library is different from that when he used Sun's cc to
build LAM. And similarly, if one used Sun cc to build LAM, he should use
Sun cc to be the underlying compiler, and needs not worry about the
different number of underscores appearing in the function names than when he
used gcc to build LAM.
Also, I was able to use a small MPI application to "prove" my theory.
Thanks.
>I have LAM 6.3.1 and LAM 6.5.9 installed. My 6.3.1 is based on Sun cc and
>f77. My 6.5.9 is based on gcc and g77.
>In lib/libmpi.a in 6.3.1, I have a function called mpi_isend_ (one single
>underscore at the end), for example. In lib/liblamf77mpi.a in 6.5.9 I have
>mpi_isend__ (two underscores at the end); there is no mpi_isend_ (one
>single underscore at the end) in any of the files in /lib.
>Does this create any compatibility problem? I did not try to actually run
>any application to test it. My friend advised me that I need to make sure
>I have the same mpi_isend_ (one single underscore at the end) in 6.5.9;
>otherwise my code for 6.3.1 may not run on 6.5.9, and that I may need to
>compile 6.5.9 using some flag like -no-underscoring so that the function in
>its libraray would have only one underscore. Is this true? Thank you very
>much.
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
|