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
# 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
# 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
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.
1. Is this a feature or a bug?
2. Does this restrict libmkl_core.a users to only the Open MPI flavor of MPI?
Thanks for your report. Are you using any cluster functionality in the MKL( for example, cluster FFT, cluster pardiso )? If you are using these functions, they depends on the MPI interfaces ( libmkl_blacs_openmpi_lp64.a , or other MPIs).
But if you are not using any cluster functions, it is not expected to depends on any MPI libraries.
For the symbols bellow:
(cpardiso_blacs_lp64.o): In function 'mkl_pds_lp64_cpardiso_mpi_ba
It is for the cluster pardiso functions, so it is no problem.
Let us know if you see any problem there.
Thanks for getting back to me.
1. When you say "depends on any MPI libraries" do you mean specifically Open MPI as I have reported (note the "ompi_request_null" symbol)?
2. Does this prevent using MKL and another MPI implementation (such as cluster FFT + Intel MPI)
3. Given that my application calls to MKL had not changed (only upgraded from Intel Composer 13.5.192 up to 15.2.164), does the link error I reported indicate that this dependency of cluster FFT on Open MPI is a new feature introduced in 2015 Intel Composer?
MKL support several MPI implementations, including the Intel MKL.
Please check the list in the MKL system requirements document:
MPI implementations that Intel® MKL for Linux* OS has been validated against:
Intel® MPI Library Version and 5.0 and 4.1.1 (http://www.intel.com/go/mpi)
MPICH2 version 1.5 and MPICH3 version 3.1 (http://www-unix.mcs.anl.gov/mpi/mpich)
Open MPI 1.6 and 1.7 (http://www.open-mpi.org)
If the MPI is not in the list, MKL 11.3 Beta introduced a new features. Users can build the MKL MPI wrapper code with the customised MPI, so they can use MKL with that MPI. Check this article for some details: