Re: [AMBER-Developers] MKL in updated configure scripts etc.

From: Scott Brozell <>
Date: Mon, 1 Mar 2010 19:16:38 -0500


On Mon, Mar 01, 2010 at 02:32:00PM -0800, Ross Walker wrote:
> I am trying to work out how MKL works these days with building sander. We
> used to have -DMKL specified which would control the ifdef around veclib.f
> but now it looks like we do not do this anymore. Thus from what I can see we
> have:

Based on browsing the configure* logs, my guess is that the loss of -DMKL
is an oversight.
Note also that we HAVE_MKL which appears to be redundant:

./lib/veclib.f:11:#ifndef MKL
./sander/xray_utils.f:213:#ifdef HAVE_MKL
./pmemd.amba/src/veclib.fpp:3:#ifndef MKL

> sander$(SFX): $(NETCDF) $(MMOBJ) $(QMOBJ) $(FULLPIMDOBJ) \
> $(LSCIVROBJ) force.o syslib \
> nxtsec netlib configured_serial \
> $(FC) -o sander$(SFX) $(MMOBJ) $(QMOBJ) \
> $(FULLPIMDOBJ) $(LSCIVROBJ) force.o $(LIBDIR)/libsqm.a \
> $(FLIBSF) ../lib/nxtsec.o ../lib/sys.a $(NETCDFLIB)
> Where FLIBSF would point to the MKL libs if MKL_HOME is set. However,
> lib/sys.a still contains veclib which still has the vector functions
> defined. E.g.
> [14:13][caffeine:8.09][rcw:lib]$ nm sys.a | grep vdinvsqrt
> 000000000000013d T vdinvsqrt_
> Which is also in libmkl_intel_lp64.a included from FLIBSF:
> FLIBSF= $(LIBDIR)/arpack.a -L/opt/intel/mkl/
> -Wl,--start-group /opt/intel/mkl/
> /opt/intel/mkl/
> /opt/intel/mkl/ -Wl,--end-group -lpthread
> [14:25][caffeine:8.69][rcw:em64t]$ nm libmkl_intel_lp64.a | grep -i
> vdinvsqrt
> 0000000000000000 T vdinvsqrt_
> 00000000000009f8 T vdInvSqrt
> 00000000000004fc T VDINVSQRT_
> So why do we not get errors about duplicate symbols here? Is it just that we
> link in sys.a AFTER the mkl libs and thus it takes the first instance? Are
> we sure it always takes the first instance and actually uses the MKL
> routines? Inserting a print statement into the veclib routines suggests this
> is the case but I wanted to make sure.

The duplicate symbols are in libraries.


AMBER-Developers mailing list
Received on Mon Mar 01 2010 - 16:30:02 PST
Custom Search