<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div><span>Is the linker ld compitable with Intel compilers?</span></div><div><span></span> </div><div><span>If I use --download-hypre=1, will it download the 32-bit Hypre lib that is consistent with my MPI lib and my PETSc lib built with Intel compilers?</span></div><div><span></span> </div><div><span>Thanks,</span></div><div><span>Qin</span></div><div style="display: block;" class="yahoo_quoted"> <br> <br> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> On Thursday, January 9, 2014 11:43 AM, Satish Balay <balay@mcs.anl.gov> wrote:<br>
</font> </div> <div class="y_msg_container">Well the compiler [ld] doesn't appear to like the hypre library you built.<br clear="none"><br clear="none">What do you have for:<br clear="none"><br clear="none">file /d/dev01/qlu/Lib/hypre-2.8.0b/LINUX_32/lib/libHYPRE.a<br clear="none"><br clear="none">Why not use --download-hypre=1 ?<br clear="none"><br clear="none">Satish<br clear="none"><div id="yqtfd00833" class="yqt0311021957"><br clear="none">On Thu, 9 Jan 2014, Qin Lu wrote:<br clear="none"><br clear="none">> Now it got new problem later in configure: it does not like the Hypre lib :"Possible ERROR while running linker: ld: skipping incompatible /d/dev01/qlu/Lib/hypre-2.8.0b/LINUX_32/lib/libHYPRE.a when searching for -lHYPRE". Please see the attached log file for details.<br clear="none">> <br clear="none">> I built the Hypre-2.8.0b using the same Intel compilers as PETSc.<br clear="none">> <br clear="none">> Thanks
for any ideas,<br clear="none">> Qin<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> On Thursday, January 9, 2014 9:25 AM, Qin Lu <<a href="mailto:lu_qin_2000@yahoo.com" shape="rect" ymailto="mailto:lu_qin_2000@yahoo.com">lu_qin_2000@yahoo.com</a>> wrote:<br clear="none">> <br clear="none">> Thanks a lot for pointing out the problem. Configure passed it after I set the path of libirc.so.<br clear="none">> <br clear="none">> Regards,<br clear="none">> Qin<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> On Wednesday, January 8, 2014 4:25 PM, Satish Balay <<a href="mailto:balay@mcs.anl.gov" shape="rect" ymailto="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br clear="none">> <br clear="none">> > ('Linux', 'houhpclc01', '2.6.18-308.4.1.el5', '#1 SMP Tue Apr 17 17:08:10 EDT 2012', 'i686', 'i686')<br
clear="none">> <br clear="none">> the machine appears to to be running 32bit linux - so I'm not sure why it has a 64bit libirc.so<br clear="none">> <br clear="none">> [and the paths linker is referencing to are 32bit library paths]<br clear="none">> <br clear="none">> The workarround to try [for intel compilers] is:<br clear="none">> <br clear="none">> --with-clib-autodetect=0 --with-fortranlib-autodetect=0 --with-cxxlib-autodetect=0 LIBS="-Bstatic -lifcore -Bdynamic"<br clear="none">> <br clear="none">> Satish<br clear="none">> <br clear="none">> <br clear="none">> The On Wed, 8 Jan 2014, Barry Smith wrote:<br clear="none">> <br clear="none">> > <br clear="none">> > Here is how icc is linking a C main program:<br clear="none">> > <br clear="none">> > ld --eh-frame-hdr -dynamic-linker /lib/ld-linux.so.2 -m elf_i386 -o /tmp/petsc-3SW45q/config.compilers/conftest
-L/apps/compilers/intel/Compiler/11.1/056/lib/ia32<br clear="none">> -L/usr/lib/gcc/i386-redhat-linux/4.1.2/ -L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../ -L/lib/ -L/usr/lib /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crt1.o /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbegin.o /tmp/petsc-3SW45q/config.compilers/conftest.o -ldl -Bstatic -limf -lsvml -Bdynamic -lm -Bstatic -lipgo -ldecimal -Bdynamic -lgcc_s -lgcc -Bstatic -lirc -Bdynamic -lc -lgcc_s -lgcc -Bstatic -lirc_s -Bdynamic -ldl -lc /usr/lib/gcc/i386-redhat-linux/4.1.2/crtend.o /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crtn.o<br clear="none">> > <br clear="none">> > Since PETSc uses C if you use Fortran it needs to link against this same stuff with the intel Fortran linker. We try to rationalize the above list and get <br clear="none">> > <br clear="none">> > Libraries needed to link C code with
another linker: ['-ldl', '-L/apps/compilers/intel/Compiler/11.1/056/lib/ia32',<br clear="none">> '-L/usr/lib/gcc/i386-redhat-linux/4.1.2', '-limf', '-lsvml', '-lipgo', '-ldecimal', '-lgcc_s', '-lirc', '-lirc_s', '-L/apps/compilers/intel/Compiler/11.1/056/lib/ia32', '-L/usr/lib/gcc/i386-redhat-linux/4.1.2’]<br clear="none">> > <br clear="none">> > So when it uses ifort to link something it uses<br clear="none">> > <br clear="none">> > /apps/compilers/intel/Compiler/11.1/056/bin/ia32/ifort -o /tmp/petsc-3SW45q/config.setCompilers/conftest -O3 /tmp/petsc-3SW45q/config.setCompilers/conftest.o -ldl -L/apps/compilers/intel/Compiler/11.1/056/lib/ia32 -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -limf -lsvml -lipgo -ldecimal -lgcc_s -lirc -lirc_s -L/apps/compilers/intel/Compiler/11.1/056/lib/ia32 -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -ldl <br clear="none">> > <br clear="none">> > which when running
the code results in <br clear="none">> > <br clear="none">> > ERROR while running executable: Could not execute<br clear="none">> "/tmp/petsc-3SW45q/config.setCompilers/conftest":<br clear="none">> > /tmp/petsc-3SW45q/config.setCompilers/conftest: error while loading shared libraries: libirc.so: wrong ELF class: ELFCLASS64<br clear="none">> > <br clear="none">> > Because the -Bstatic are stripped from the link line the wrong libirc.so gets picked up by the linker resulting in the runtime error.<br clear="none">> > <br clear="none">> > I’ve seen these perverse icc link lines mess things up before but don’t remember a solution. Satish must remember!<br clear="none">> > <br clear="none">> > Is there a reason to use the 32bit version? Have you tried using the 64 bit compilers ? Generally I don’t think there is a reason to use 32bit now a days.<br clear="none">> > <br
clear="none">> > Barry<br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > <br clear="none">> > On Jan 8, 2014, at 3:21<br clear="none">> PM, Qin Lu <<a href="mailto:lu_qin_2000@yahoo.com" shape="rect" ymailto="mailto:lu_qin_2000@yahoo.com">lu_qin_2000@yahoo.com</a>> wrote:<br clear="none">> > <br clear="none">> > > Hello,<br clear="none">> > > <br clear="none">> > > I am trying to build a Linux 32-bit PETSc lib. I first built python-2.7.5 in a 32-bit Linux workstation without problem, then used this python to configure PETSc-3.4.2 with Intel C/C++/Fortran compilers, it got the following error:<br clear="none">> > > <br clear="none">> > > ===============================================================================
TESTING: checkCLibraries from<br clear="none">> config.compilers(config/BuildSystem/config/compilers.py:161) *******************************************************************************<br clear="none">> > > UNABLE to EXECUTE BINARIES for ./configure<br clear="none">> > > -------------------------------------------------------------------------------<br clear="none">> >
> Cannot run executables created with FC. If this machine uses a batch system<br clear="none">> > > to submit jobs you will need to configure using ./configure with the additional option --with-batch.<br clear="none">> > > Otherwise there is problem with the compilers. Can you compile and run code<br clear="none">> with your C/C++ (and maybe Fortran) compilers?<br clear="none">> > > See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#libimf" shape="rect" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html#libimf</a><br clear="none">> > > *******************************************************************************<br clear="none">> > > <br clear="none">> > > It seems that a test program built with the given Intel ifort does not run. But I have built another program using ifort in the same workstation and it runs fine.<br clear="none">>
> > <br clear="none">> > > Please see the attached configure.log file for details.<br clear="none">> > > <br clear="none">> > > Thanks for your suggestions!<br clear="none">> > > <br clear="none">> > > Regards,<br clear="none">> > > Qin<br clear="none">> > > <br clear="none">> > > <br clear="none">> > ><br clear="none">> <configure.log><br clear="none">> > <br clear="none">> ><br clear="none">> <br clear="none"></div><br><br></div> </div> </div> </div> </div></body></html>