[AMBER-Developers] Amber11 problems building with latest version of intel MKL (10.2)

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Wed, 12 Aug 2009 16:52:57 +0100

Hi All,

This is just a heads up - I don't think it will be a problem yet but it may
be down the road.

I just downloaded the latest version of intel's free compiler suite for
linux, which comes with the latest version of MKL (10.2). Currently the
configure_at script in amber11 does not deal with this version correctly,
resulting in linking failures. After some poking around in the MKL manual (
http://software.intel.com/sites/products/documentation/hpc/mkl/lin/index.htm)
it seems the correct way to link should be:

32 bit:
flibs_mkl="-L\$(MKL_HOME)/lib/32 -I\$(MKL_HOME)/include -Wl,--start-group
\$(MKL_HOME)/lib/32/libmkl_intel.a \$(MKL_HOME)/lib/32/libmkl_intel_thread.a
\$(MKL_HOME)/lib/32/libmkl_core.a -Wl,--end-group -liomp5 -lpthread"

64 bit (works for em64t, not sure about ia64 - may just need to use the /64
subdirectory if present):
flibs_mkl="-L\$(MKL_HOME)/lib/em64t -I\$(MKL_HOME)/include -Wl,--start-group
\$(MKL_HOME)/lib/em64t/libmkl_intel_lp64.a
\$(MKL_HOME)/lib/em64t/libmkl_intel_thread.a
\$(MKL_HOME)/lib/em64t/libmkl_core.a -Wl,--end-group -liomp5 -lpthread"

I have tested this and icc and gcc both build without complaints. However,
some of the tests fail compared to previous compiler/MKL combos (MKL 10.0) -
in some cases pretty badly (like in the ptraj covariance matrix test where
the signs are all flipped!), so either the above line is not linking
correctly or there are some deeper seeded problems with this version of MKL.

Also, the MKL detection in configure_amber fails with 10.2 since
libmkl_lapack.a does not exist anymore (and so the script ends up thinking
it has version 9.x). I think the functionality of libmkl_lapack is in
libmkl_core now. Changing the MKL version detection lines after the grep
from
if [ $? != 0 ];
to
if [[ $? != 0 && -e $mkll/libmkl_lapack.a ]] ;
seems to do the trick, but it seems there should be a more reliable way to
detect the MKL version than existing/missing files.

Again, this is just a heads up for the future.

-Dan

-- 
Daniel R. Roe, Ph.D.
Research Chemist
National Institute of Standards and Technology
100 Bureau Drive, Stop 8443
Gaithersburg, MD 20899-8443
(301) 975-8741
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Wed Aug 19 2009 - 22:14:57 PDT
Custom Search