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

Mark Abraham mark.j.abraham at gmail.com
Thu Dec 8 17:00:43 CET 2016


Hi,

On Fri, Dec 9, 2016 at 12:20 AM Will Furnass <w.furnass at sheffield.ac.uk>
wrote:

> 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?
>

Not really. There's only a tiny fraction of GROMACS runs that use both FFT
and linear algebra, and I'd want to see some evidence that such a hybrid
ought to run faster before going to the trouble (e.g. compare relevant
component timings for all-MKL vs FFTW+whatever builds)


> 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:
>

Per
http://manual.gromacs.org/documentation/2016/install-guide/index.html#using-mkl
there
are some further options, but your main friend is the Intel documentation
for finding out what you need for your setup - it's generally more complex
than a single static library.


>
> -- 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
>

Looking at the CMakeError.log and CMakeOutput.log may prove instructive,
after you've checked the Intel docs.

Mark


> 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
> --
> Gromacs Users mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
> send a mail to gmx-users-request at gromacs.org.
>


More information about the gromacs.org_gmx-users mailing list