Re: [AMBER-Developers] AmberTools17, intel, -mkl vs setting MKL_HOME

From: Scott Brozell <>
Date: Fri, 31 Mar 2017 16:18:54 -0400


1. This is a relatively recent change since i frequently configure with
-mkl and various forms of python without this problem. So probably the
best to investigate are those that have made recent python building changes.

2. For this build ./configure -mkl intel
I get a lot of hits grepping for getenv and then only 1 for grepping that for mkl:
Binary file ./miniconda/pkgs/scipy-0.19.0-np112py27_nomkl_0/lib/python2.7/site-packages/scipy/sparse/_ matches

IMO we should be encouraging use the -mkl compiler flag.
The -mkl approach is far superior to MKL_HOME because the former follows
the principle of information hiding and the latter typically forces at least
someone to decrypt the mess of details of mkl .a's and .so's.

Worth more than $0.02

On Fri, Mar 31, 2017 at 11:24:43AM -0400, David Case wrote:
> Hoping someone might recognize this symptom, and know what to do:
> Using Intel compilers (any recent version) there is a difference in
> AmberTools between passing the "-mkl" flag to configure, and setting
> the MKL_HOME environment variable. The former option is relatively new,
> whereas the latter is what we have used for some time.
> As Scott and others have found, using "-mkl" breaks the sanderapi:
> python cannot find mkl_serv_getenv, which is in
> libraries, which are apparently not getting properly linked in to
> If one instead sets MKL_HOME, things work fine, presumably because
> configure2 creates a config.h file that explicitly links to libmkl_core.a.
> I've tried adding -lmkl_core to the config.h file created by configure2,
> but without success.
> Minor point: using -mkl rather than setting MKL_HOME leads to roundoff
> differences in many of the sqm tests. But users of the intel compilers
> can probably recognize these for what they are.
> If anyone can figure out how to get the pysander API to find mkl_serv_getenv
> when the -mkl flag is set, that would be a big help.

AMBER-Developers mailing list
Received on Fri Mar 31 2017 - 13:30:03 PDT
Custom Search