Blas/LapackOn any platform, vendor provided numerical libraries should be used. Other factor to consider in selecting Blas/Lapack is the compilers.When a toolchain file is used, the proper links to Blas/Lapack should be provided in the toolchain file. For example, JaguarGNU.cmake contains set(ACML_HOME /opt/acml/4.3.0/gfortran64) set(ACML_LIBRARIES ${ACML_HOME}/lib/libacml.a ${ACML_HOME}/lib/libacml_mv.a) link_libraries(${ACML_LIBRARIES}) CMake/FindLAPACK.cmake is the responsible module and tries to figure out what to use. QMCPACK uses only serial Blas/Lapack and one should set the number of threads that control numerical libraries to one or link the serial libraries. Note that some libraries still require a link to a fortran library. Environment variables on LINUX to guide cmake
MKL="-LMKLPATH -lmkl_intel_lp64 -lmkl_sequential -lmkl_core" It is important to select sequential MKL library.
MKL="-L$MKLPATH
-Wl,--start-group -lmkl_intel_lp64
-lmkl_sequential -lmkl_core -Wl,--end-group -lpthread"
MKL="-L$MKLPATH -lmkl_intel -lmkl_sequential -lmkl_core -lpthread"
This was the primary method to set MKL libraries but with recent changes (and more changes to come with upgrades), the automatic detection is rather unreliable.
LAPACK="-L/usr/lib64 -llapack -lblas" LAPACK can be set to ACML specific links or ATLAS links. Consult the documentation for these libraries. To be absolutely sure to use serial MKL routines for the runs, set these environments in your login or batch script.MKL_DOMAIN_NUM_THREADS=MKL_ALL=1MKL_DYNAMIC=FALSEMKL_SERIAL=YESEnvironment variables on Mac OS |