[gmx-users] Building using FFTW3 for FFT and MKL for BLAS/LAPACK

Will Furnass w.furnass at sheffield.ac.uk
Thu Dec 8 14:20:27 CET 2016


Hi all,

I understand that FFTW3 is considered preferable to MKL for FFTs in Gromacs
but am having difficulty getting Gromacs to compile so that it uses a
self-built single-precision FFTW but uses the MKL for BLAS/LAPACK linear
algebra routines.

Is there a recommended way of doing this?

FYI I'm wanting to build Gromacs 2016.1 using
 - FFTW 3.3.5 (built by Gromacs)
 - MKL 2017
 - GCC 4.9.2
 - No CUDA/MPI support (for now)

I tried passing the following to cmake:

    -DGMX_EXTERNAL_BLAS=ON
    -DGMX_BLAS_USER=$MKLROOT/lib/intel64/libmkl_intel_lp64.a

to cmake but got the following errors:

-- Checking that user BLAS library
/usr/local/packages6/compilers/intel-ps-xe-ce/2017.0/binary/compilers_and_libraries_2017.0.098/linux/mkl/lib/intel64/libmkl_intel_lp64.a
works
-- Looking for dgemm_
-- Looking for dgemm_ - not found
CMake Warning at cmake/gmxManageLinearAlgebraLibraries.cmake:78 (message):
  GMX_BLAS_USER library

/usr/local/packages6/compilers/intel-ps-xe-ce/2017.0/binary/compilers_and_libraries_2017.0.098/linux/mkl/lib/intel64/libmkl_intel_lp64.a
  was specified, but it may not provide BLAS.  We are proceeding by assuming
  you know what you are doing and that linking F77-style to this library
will
  work.
Call Stack (most recent call first):
  cmake/gmxManageLinearAlgebraLibraries.cmake:194
(manage_linear_algebra_library)
  cmake/gmxManageLinearAlgebraLibraries.cmake:202
(gmxManageLinearAlgebraLibraries)
  CMakeLists.txt:693 (include)
-- MKL and GMX_BLAS_USER were both specified. Using the latter for BLAS.
...
[100%] Linking CXX executable ../../bin/gmx
../../lib/libgromacs.so.2.1.0: undefined reference to `mkl_lapack_dlacpy'
../../lib/libgromacs.so.2.1.0: undefined reference to `mkl_blas_dcopy'
...


Regards,

Will

-- 
Dr Will Furnass | Research Computing Support Officer
CiCS | University of Sheffield | +44 (0)114 22 23130
http://www.sheffield.ac.uk/cics/research | http://docs.hpc.sheffield.ac.uk


More information about the gromacs.org_gmx-users mailing list