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

From: Ross Walker <ross.rosswalker.co.uk>
Date: Mon, 1 Mar 2010 14:32:00 -0800

Hi All,

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:

sander$(SFX): $(NETCDF) $(MMOBJ) $(QMOBJ) $(FULLPIMDOBJ) \
              $(LSCIVROBJ) force.o syslib \
              nxtsec netlib configured_serial \
              $(NCSU_OBJECTS) $(XRAY_OBJS) libsqm
        $(FC) -o sander$(SFX) $(MMOBJ) $(QMOBJ) \
        $(FULLPIMDOBJ) $(LSCIVROBJ) force.o $(LIBDIR)/libsqm.a \
                $(NCSU_OBJECTS) $(XRAY_OBJS) \
                $(FLIBSF) ../lib/nxtsec.o ../lib/sys.a $(NETCDFLIB)
$(LDFLAGS)

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/10.1.1.019//lib/em64t
-Wl,--start-group /opt/intel/mkl/10.1.1.019//lib/em64t/libmkl_intel_lp64.a
/opt/intel/mkl/10.1.1.019//lib/em64t/libmkl_sequential.a
/opt/intel/mkl/10.1.1.019//lib/em64t/libmkl_core.a -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.

All the best
Ross

/\
\/
|\oss Walker

| Assistant Research Professor |
| San Diego Supercomputer Center |
| Tel: +1 858 822 0854 | EMail:- ross.rosswalker.co.uk |
| http://www.rosswalker.co.uk | http://www.wmd-lab.org/ |

Note: Electronic Mail is not secure, has no guarantee of delivery, may not
be read every day, and should not be used for urgent or sensitive issues.





_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Mon Mar 01 2010 - 15:00:03 PST
Custom Search