Jeff:
Thanks a lot. I will see how I can use
your suggestions.
-Lei pan_at_[hidden]
2:52:38 PM Thursday, October 30, 2003
Attachments:
-------------
<none>
Jeff Squyres wrote:
------------------------------------
JS> On Thu, 30 Oct 2003, Lei Pan wrote:
>> I would like to build the MPI libraries such that they have both, say
>> MPI_Send and mpi_send_, in them. In this way, I may choose to use the
>> f90 option -B108 (append a single underscore to the names). I need this
>> because I am parallelizing legacy code for which the Makefile uses
>> -B108.
JS> We don't actually have a mechanism to do this. :-(
JS> The reason that this is not supported natively is that some
JS> compilers/linkers do not support multiple weak symbols for a single
JS> back-end strong symbol. The faults of some destroy it for the rest of us.
JS> :-(
JS> However, you might be able to do a somewhat-ugly workaround to get what
JS> you need (I'm assuming that you're working with LAM/MPI 7.0.2):
JS> - configure, build, and install with one of the Fortran options.
JS> - rename the resulting $prefix/lib/liblamf77mpi.a to liblamf77mpi2.a (or
JS> whatever you want -- as long as it's not liblamf77mpi.a)
JS> - configure, build, and install with the other fortran option
JS> You can now use "mpif77 -lliblamf77mpi2 ..." and you get both ways of
JS> fortran linking. That's not elegant, but it should work fine.
JS> If you want to be a bit more clever, after you do those three steps,
JS> you could deconstruct the liblamf77mpi.a and liblamf77mpi2.a into
JS> their respective .o files and then re-combine them into huge, mondo,
JS> combined liblamf77mpi.a that contains both symbol types. The exact
JS> commands to do this will depend on your back-end compiler, but it
JS> would result in you being able to do "mpif77 ..." and get both symbol
JS> types.
JS> Now -- with all that said -- I'm providing this information with the
JS> BIG DISCLAIMER that those switcher you mentioned *ONLY* change the
JS> symbol linking style. If they change other things in how the
JS> generated code works, you may run into problems (simple example: if
JS> different types are supported and/or are different sizes), and I would
JS> *NOT* recommend either of the methods that I mentioned above -- you'll
JS> need to have two LAM installations in that case. Sorry! :-(
|