[AMBER-Developers] possible fix for failures with compiling amber using Intel MKL

From: Jason Swails <jason.swails.gmail.com>
Date: Thu, 1 Oct 2009 20:37:33 -0400


There have been some difficulties compiling amber using the intel MKL. It's
due to a duplicate declaration of the function "second" found in sys.f.
However, this is in an #ifndef HASSECOND block in sys.f. The MKL already
has that function defined, so that is the reason for the obvious conflict.
The error message thrown during compilation is

_sys.f:(.text+0x1c): multiple definition of `second_'
first defined here
make[1]: *** [sander] Error 1
make[1]: Leaving directory
make: *** [serial] Error 2

Adding -DHASSECOND to FPP in config.h and making clean (to force it to
preprocess the files again) allows the compilation to finish. I'm not sure
how to go about making this change in the configure script, since i
hardwired it into the config.h file after it was created.

ifort (IFORT) 11.0 20090318
icc (ICC) 11.0 20090318
/opt/intel/mkl/ (that's the only way I know how to get my MKL

This is also the only instance of HASSECOND in the entire src directory (at
the bottom of src/lib/sys.f). Any thoughts or more thorough knowledge of

Jason Swails
AMBER-Developers mailing list
Received on Thu Oct 01 2009 - 18:00:02 PDT
Custom Search