[Llvm-bgq-discuss] Using ESSL and other libraries compiled using IBM's OpenMP

Hal Finkel hfinkel at anl.gov
Mon Apr 13 12:12:02 CDT 2015


Hi everyone,

If you'd like to compile your application using bgclang, but use IBM's multi-threaded ESSL (libesslsmpbg.a), you need to work-around the following problem: To link with libesslsmpbg.a you need to link against IBM's OpenMP runtime library (libxlsmp.a). But both IBM's OpenMP runtime library and LLVM's OpenMP runtime library define the C-level OpenMP API functions (omp_get_thread_num, etc.) and linking both into your application directly will likely result in problems. Because ESSL does not use these functions directly (using the Fortran interface functions exported by libxlsmp.a instead), we can avoid incompatibilities by generating a version of libxlsmp.a with the C-level API functions renamed. This can be done using the objcopy utility, and I've posted a script to do this for you:

  https://trac.alcf.anl.gov/projects/llvm-bgq/attachment/wiki/WikiStart/make-xlsmp-nonconflicting.sh

And for those of you using ALCF's BG/Q systems, this has been done for you, and you can link to:

  /soft/compilers/bgclang/xlsmp-nonconflicting/ibmcmp-feb2015/libxlsmp.a

 -Hal

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory


More information about the llvm-bgq-discuss mailing list