[gmx-users] Re: gmx-users Digest, Vol 35, Issue 11

Erik Lindahl lindahl at cbr.su.se
Tue Mar 6 19:07:57 CET 2007

Hi Warner,

If it's a framework you _might_ actually be to do it automatically  
with CFLAGS="-O3 -framework XXX". Don't worry that this removes some  
of the fancy CFLAGS for gcc; those only contribute 1% or so anyway,  
since we use SSE assembly for the nonbonded kernels.

What the configure script actually tries to do is to compile & link a  
small program that uses a function from MKL (DftiComputeForward), so  
it will fail if:

1. It cannot find the actual library
2. It is not able to link - this could be caused e.g. by special  
dependency libs being required on OS X?
3. It cannot find the function in question in the library

If you search for "DftiComputeForward" in config.log you will find  
both the actual small program used for trying the linking (probably  
with a handful of defines/includes, then the command used, the  
resulting error, and a long listing of all the settings used for the  
failed test.

Copy-and-paste that program to a separate file, or try to compile any  
other small program that just makes a single simple MKL call, and  
find out exactly what command line flags you need. If you send me  
those I'll add them to the configuration files.

Alternatively, if you convince Intel to provide us with a free  
license of icc & MKL we can do it ourselves in the future and build  
the OS X packages with those; it's a bit hard for me to justify  
spending research grants on annual compiler updates on all platforms  
when it's not critical for the performance, though :-)

Oh, by the way: it is quite possible to compile a 64-bit gcc binary  
on OS X too, but at least on 10.4 it requires a mild amount of force/ 
compiler flags (gives you 5-10% extra performance)!

All the best,


On Mar 6, 2007, at 6:24 PM, Warner Yuen wrote:

> Hi Erik,
> Thanks for the tips, but I still can't get it to find MKL. Although  
> I did get the CPPFLAGS to work once I realized that I had  
> inadvertantly used a "-L" in the line instead of the "-I".
> Anyway, it still can't seem to find the MKL libraries, I've tried  
> all of the following:
> export LDFLAGS=-L/Library/Frameworks/Intel_MKL.framework/Libraries/ 
> universal/lib
> export LDFLAGS=-L/Library/Frameworks/Intel_MKL.framework/Libraries/ 
> em64t/lib
> export LDFLAGS=-L/Library/Frameworks/Intel_MKL.framework/Libraries/ 
> 32/lib
> but I get the following:
> configure: Using built-in math library with intel compiler
> checking for mkl_dfti.h... yes
> checking for DftiComputeForward in -lmkl... no
> configure: error: Cannot find Intel Math Kernel Library >= 6.0
> Where is it looking for MKL by default? Maybe I can just create  
> symlinks to that location?
> Warner Yuen
> Scientific Computing Consultant
> Apple Computer
> email: wyuen at apple.com
> Tel: 408.718.2859
> Fax: 408.715.0133
> On Mar 6, 2007, at 1:53 AM, gmx-users-request at gromacs.org wrote:
>> Message: 4
>> Date: Tue, 6 Mar 2007 09:09:00 +0100
>> From: Erik Lindahl <lindahl at cbr.su.se>
>> Subject: Re: [gmx-users] Mac OS X with MKL
>> To: Discussion list for GROMACS users <gmx-users at gromacs.org>
>> Message-ID: <AE25986A-2F84-4E5D-9907-91088C34ABC8 at cbr.su.se>
>> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>> Hi Warner,
>> On Mar 6, 2007, at 8:04 AM, Warner Yuen wrote:
>>> Hi Gromacs folks,
>>> I'm trying to build Gromacs with MKL on Mac OS X. I am running the
>>> configuration with:
>>> ./configure --prefix=/Users/wyuen/west/gromacs/gromacs_icc64 --
>>> enable-mpi --enable-float --with-fft=mkl
>>> But I am getting the following error:
>>> checking for mkl_dfti.h... yes
>>> checking for DftiComputeForward in -lmkl... no
>>> configure: error: Cannot find Intel Math Kernel Library >= 6.0
>>> Does anyone know where or how to set things so it'll know where to
>>> find the libraries? BTW, it only found "mkl_dfti.h" because I
>>> altered the configure file.
>> That is a very bad idea - configure is autogenerated and should never
>> be touched :-)
>> configure simply searches in the default include and library paths
>> set up for the compiler/system, so what you need to do (for any
>> external library) is to tell it where to find the header file before
>> running configure:
>> export CPPFLAGS=-I/opt/intel/.../include
>> and then the library to link with:
>> export LDFLAGS=-L/opt/intel/.../lib
>> If you have multiple library/include locations to search they should
>> be separated with ":".
>> Cheers,
>> Erik
> _______________________________________________
> gmx-users mailing list    gmx-users at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-users
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at gromacs.org.
> Can't post? Read http://www.gromacs.org/mailing_lists/users.php

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20070306/1d65d7fa/attachment.html>

More information about the gromacs.org_gmx-users mailing list