I'm trying to use g++ 4.4.0 with several libraries compiled with XL and ESSL/MASS libraries on Power 7 system running 2.6.34.
At the link stage, some symbols are missing, e.g., __xl_exp
I'm using 64 bit for my object mode. What is the proper way of linking native libraries with g++?
Below is the link options I am currently using:
/opt/at3.0/bin/g++ -g -m64 -mcpu=power7 -mtune=power7 -mvsx -fopenmp -O3 -Drestrict=__restrict__ -finline-functions -fexpensive-optimizations -ffast-math -finline-limit=1000 -fstrict-aliasing -funroll-all-loops -ftemplate-depth-60 ..... -lessl -L/opt/ibmcmp/xlmass/6.1/lib64 -lmass_simdp7_64 -lmassvp7_64 -L/opt/ibmcmp/xlf/13.1/lib64 -lxlf90_r -L/opt/ibmcmp/vac/11.1/lib64 -lxl -lxlopt -L/opt/ibmcmp/xlsmp/2.1/lib64 -lxlsmp -Wl,-rpath,/opt/ibmcmp/vac/11.1/lib64 -lxml2 /home/jnkim/share/hdf5/lib/libhdf5.a -lz /opt/fftw-3.2.2/lib/libfftw3.so /home/jnkim/share/xlc11.01/lib/libeinspline.a -Wl,-rpath,/opt/fftw-3.2.2/lib
Thanks in advance,
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
2 replies Latest Post - 2010-08-31T21:55:49Z by jnkim
Pinned topic Linking with XL libraries
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2010-08-31T21:55:49Z at 2010-08-31T21:55:49Z by jnkim
bergner 100000QN0R3 PostsACCEPTED ANSWER
Re: Linking with XL libraries2010-08-31T19:35:30Z in response to jnkimMost of the XL libraries that are shipped are static archives and symbol resolution with static archives is very different than for dynamic libraries. I suggest you use the --start-group and --end-group linker options around your static archives so the linker will find the symbols. Like so:
... -Wl,--start-group -lessl ..... /home/jnkim/share/hdf5/lib/libhdf5.a -lz -Wl,--end-group ...
jnkim 270003F01N2 PostsACCEPTED ANSWER
Re: Linking with XL libraries2010-08-31T21:55:49Z in response to bergnerThank you for the suggestion.
It did work and serial jobs were successful.
Now, I'm trying to use OpenMP with g++ and it is not working yet.
Is there any tips on what libraries to link? I use MKL with gnu compilers and need to link different libraries depending upon the c++ compiler and threading library. I'm wondering if similar problems can arise with gnu + IBM libraries.
I would like to use essl (serial version) in an OpenMP region with only one thread for the essl library. Based on the error messages at the link stage, I linked these libraries. Do I need to set XL runtime environments?
-L/home/gbauer/lib64 -llapack -lessl
-L/opt/ibmcmp/xlmass/6.1/lib64 -lmass_simdp7_64 -lmassvp7_64
-L/opt/ibmcmp/vac/11.1/lib64 -lxl -lxlopt
Thanks in advance,