[mvapich-discuss] recompile with -fPIC

Jonathan Perkins perkinjo at cse.ohio-state.edu
Fri Aug 24 09:47:51 EDT 2012


Hello Scott.

Try building mvapich2 with the following configure...
    ./configure --with-slurm=../slurm/usr/local/ --enable-shared

Then make sure OpenFOAM links against the libmpich.so instead of
libmpich.a.

On Thu, Aug 23, 2012 at 04:58:10PM -0700, Haynes, Scott wrote:
> Hello List,
> 
>  
> 
> I have been trying to build OpenFOAM 2.1 with mvapich2-1.8-r5609.  The
> error I am receiving is pasted below.  "
> 
>  
> 
> ===== (Error)======
> 
> /users/p20558/apps/binutils/bin/ld:
> /users/p20558/apps/mvapich2-1.8-gcc/lib/libmpich.a(setbotf.o):
> relocation R_X86_64_32 against `mpifcmb2_' can not be used when making a
> shared object; recompile with -fPIC
> 
> /users/p20558/apps/mvapich2-1.8-gcc/lib/libmpich.a: could not read
> symbols: Bad value
> 
> collect2: ld returned 1 exit status
> 
> =================
> 
>  
> 
> I am using gcc 4.6 to compile both mvapich2 & OpenFOAM with the -fPIC
> flag (position independent code). I think the error above is the linker
> telling me that mvapich2 is not PIC & I need to recompile libmpich.a  .
> I have tried rebuilding mvapich2 using several different configurations
> each time libmpich.a is not PIC & I have been unsuccessful changing
> that.  My best guess at a configure line is below:
> 
>  
> 
> ./configure --with-slurm=../slurm/usr/local/ --enable-shared=gcc
> CFLAGS=-fPIC CXXFLAGS=-fPIC CPPFLAGS=-fPIC
> 
>  
> 
> I assume it is possible to compile mvapich2 as PIC? Is there something
> obvious I could add or delete from the configure statement above?  Any
> other debugging information I could provide?
> 
>  
> 
> Thanks & Best Regards
> 
>  
> 
> Scott 
> 
>  
> 
>  
> 
> Scott Haynes
> Senior Meteorologist
> Wind Development
> Iberdrola Renewables
> 
> 1320 Pearl St., Suite 330, Boulder, CO, 80302
> Telephone (303) 245-8156, Mobile (503) 841-8524, Fax (303) 245-8155
> 
> scott.haynes at iberdrolaren.com
> P  In the interests of the environment, please print only if necessary
> and recycle
> 
>  
> 
>  
> 
> 
> This message is intended for the exclusive attention of the recipient(s) indicated.  Any information contained herein is strictly confidential and privileged.  If you are not the intended recipient, please notify us by return e-mail and delete this message from your computer system. Any unauthorized use, reproduction, alteration, filing or sending of this message and/or any attached files may lead to legal action being taken against the party(ies) responsible for said unauthorized use. Any opinion expressed herein is solely that of the author(s) and does not necessarily represent the opinion of the Company. The sender does not guarantee the integrity, speed or safety of this message, and does not accept responsibility for any possible damage arising from the interception, incorporation of viruses, or any other damage as a result of manipulation.
> 
> 



> _______________________________________________
> mvapich-discuss mailing list
> mvapich-discuss at cse.ohio-state.edu
> http://mail.cse.ohio-state.edu/mailman/listinfo/mvapich-discuss


-- 
Jonathan Perkins
http://www.cse.ohio-state.edu/~perkinjo


More information about the mvapich-discuss mailing list