Sigh - the original message didn’t get in there, I think. See below: Paul - it looks to me like we are adding the required libraries, but perhaps not to the wrapper compilers. Jeff is on travel today, but I’ll check with him next week.
Ralph > Dear Open MPI developer, > > we have both Open MPI 1.6(.5) and 1.8(.3) in our cluster, configured to be > used with Platform LSF. > > One of our users run into an issue when trying to link his code (combination > of lex/C and Fortran) with v.1.8, whereby with OpenMPI/1.6er the code can be > linked OK. > > > $ make > > mpif90 -c main.f90 > > yacc -d example4.y > > mpicc -c y.tab.c > > mpicc -c mymain.c > > lex example4.l > > mpicc -c lex.yy.c > > mpif90 -o example main.o y.tab.o mymain.o lex.yy.o > > ld: y.tab.o(.text+0xd9): unresolvable R_X86_64_PC32 relocation against > > symbol `yylval' > > ld: y.tab.o(.text+0x16f): unresolvable R_X86_64_PC32 relocation against > > symbol `yyval' > > ....... > > looking into "mpif90 --show-me" let us see that the link line and possibly > the philosophy behind it has been changed, there is also a note on it: > > # Note that per https://svn.open-mpi.org/trac/ompi/ticket/3422 > <https://svn.open-mpi.org/trac/ompi/ticket/3422>, we > # intentionally only link in the MPI libraries (ORTE, OPAL, etc. are > # pulled in implicitly) because we intend MPI applications to only use > # the MPI API. > > > > > Well, by now we know two workarounds: > a) add "-lbat -llsf" to the link line > b) add " -Wl,--as-needed" to the link line > > What would be better? Maybe one of this should be added to linker_flags=..." > in the .../share/openmpi/mpif90-wrapper-data.txt file? As of the note above, > (b) would be better? > > Best > > Paul Kapinos > > P.S. $ mpif90 --show-me > > 1.6.5 > ifort -nofor-main -I/opt/MPI/openmpi-1.6.5/linux/intel/include -fexceptions > -I/opt/MPI/openmpi-1.6.5/linux/intel/lib > -L/opt/lsf/9.1/linux2.6-glibc2.3-x86_64/lib > -L/opt/MPI/openmpi-1.6.5/linux/intel/lib -lmpi_f90 -lmpi_f77 -lmpi -losmcomp > -lrdmacm -libverbs -lrt -lnsl -lutil -lpsm_infinipath -lbat -llsf -ldl -lm > -lnuma -lrt -lnsl -lutil > > 1.8.3 > ifort -I/opt/MPI/openmpi-1.8.3/linux/intel/include -fexceptions > -I/opt/MPI/openmpi-1.8.3/linux/intel/lib > -L/opt/lsf/9.1/linux2.6-glibc2.3-x86_64/lib -Wl,-rpath > -Wl,/opt/lsf/9.1/linux2.6-glibc2.3-x86_64/lib -Wl,-rpath > -Wl,/opt/MPI/openmpi-1.8.3/linux/intel/lib -Wl,--enable-new-dtags > -L/opt/MPI/openmpi-1.8.3/linux/intel/lib -lmpi_usempif08 > -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi > > P.S.2 $ man ld > .... > --as-needed > --no-as-needed > This option affects ELF DT_NEEDED tags for dynamic libraries > mentioned on the command line after the --as-needed option. > Normally the linker will add a DT_NEEDED tag for each dynamic > library mentioned on the command line, regardless of whether the > library is actually needed or not. --as-needed causes a DT_NEEDED > tag to only be emitted for a library that satisfies an undefined > symbol reference from a regular object file or, if the library is > not found in the DT_NEEDED lists of other libraries linked up to > that point, an undefined symbol reference from another dynamic > library. --no-as-needed restores the default behaviour. > > .... > > -- > Dipl.-Inform. Paul Kapinos - High Performance Computing, > RWTH Aachen University, IT Center > Seffenter Weg 23, D 52074 Aachen (Germany) > Tel: +49 241/80-24915 > > On Oct 17, 2014, at 7:49 AM, Ralph Castain <r...@open-mpi.org> wrote: > > Hi Paul > > You should probably update your email address to the list so you can respond > to the comments. I’ll forward this for you in the meantime. > > FWIW: we did do some fixes to the LSF linkage (provided by IBM) for the 1.8 > series. I’ll check and see if they made it to 1.8.3 (in which case, it sounds > like we may need to revisit the patch) or are sitting in the branch waiting > for release. > > >> On Oct 17, 2014, at 6:38 AM, Paul Kapinos <kapi...@itc.rwth-aachen.de> wrote: >> >> Jeff, Ralph, >> sorry for this - but it seem I'm not allowed to post anything, maybe because >> my mail has been changed from <kapi...@rz.rwth-aachen.de> to >> <kapi...@itc.rwth-aachen.de>. Could you please forward my question to the >> developer? Thank! >> >> Paul >> >> >> -------- Original Message -------- >> Subject: Open MPI 1.8: link problem when Fortran+C+Platform LSF >> Date: Fri, 17 Oct 2014 09:35:36 -0400 >> From: <users-ow...@open-mpi.org> >> To: <kapi...@itc.rwth-aachen.de> >> >> You are not allowed to post to this mailing list, and your message has >> been automatically rejected. If you think that your messages are >> being rejected in error, contact the mailing list owner at >> users-ow...@open-mpi.org. >> >> >> >> >> <ForwardedMessage.eml> >