Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

link error: libmkl_core.a depends on Open MPI (via libmkl_blacs_openmpi_lp64.a)

$
0
0

While invoking 2015.2.164 Intel icpc compiler, I have encountered a link error while linking against libmkl_core.a:

/opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/libmkl_core.a(cpardiso_blacs_lp64.o): In function 'mkl_pds_lp64_cpardiso_mpi_barrier':

__work/lnx32e/_cpardiso/kernel/mpi_wrapper/cpardiso_blacs_lp64_h.f:(.text+0x6): undefined referece to 'MKL_Barrier'

# Then, to verify that libmkl_core.a references MKL_Barrier I ran the linux "nm" utility as follows:
]$ nm /opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/libmkl_core.a | grep MKL_Barrier
U MKL_Barrier
U MKL_Barrier
]$

# same results when I tried the same on an older Intel Composer version 2015.0.090
]$ nm /opt/intel/composer_xe_2015.0.090/mkl/lib/intel64/libmkl_core.a | grep MKL_Barrier
U MKL_Barrier
U MKL_Barrier
]$

# however, no reference found in a 2-yr old Intel Composer version 2013.5.192
]$ nm /opt/intel/composer_xe_2013.5.192/mkl/lib/intel64/libmkl_core.a | grep MKL_Barrier
]$

It appears that somewhere between versions 2013.5.192 and 2015.0.90 of the Intel Composer, a dependency on libmkl_blacs_openmpi_lp64.a (which

defines MKL_Barrier) was introduced.

Next, I added -lmkl_blacs_openmpi_lp64.a to my link line, but ecountered the following error:

/opt/intel/composer_xe_2015.2.164/mkl/lib/intel64/libmkl_blacs_openmpi_lp64.a(blacs_extended.o):(.data+0x0): undefined reference to

'ompi_request_null'

After learning that 'ompi_request_null' is an Open MPI symbol, I downloaded Open MPI, installed and added the following to my link line:

"-lmpi_cxx -lmpi -lopen-rte -lopen-pal -Wl,--export-dynamic -lnsl -lutil -lm -ldl"

That did the trick and my application linked successfully.

What this tells me is that (unlike 2013) 2015 versions of libmkl_core.a have an *indirect* dependency on Open MPI.

Questions:

1. Is this a feature or a bug?
2. Does this restrict libmkl_core.a users to only the Open MPI flavor of MPI?

 


Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>