Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to explicitly disable MKL checks. #372

Merged
merged 1 commit into from
Nov 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmake/FindLAPACKnames.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ foreach(MANGLING IN LISTS MANGLING_OPTIONS)
COMPILE_DEFINITIONS "-DLAPACK_${MANGLING}"
LINK_LIBRARIES "${LAPACK_LIBRARIES}" "${BLAS_LIBRARIES}"
OUTPUT_VARIABLE OUTPUT_MANGLING)
# message("Test output for LAPACK_${MANGLING}:")
# message(${OUTPUT_MANGLING})
#message("Test output for LAPACK_${MANGLING}:")
#message(${OUTPUT_MANGLING})
if(TRY_MANGLING)
set(LAPACK_NAMES "${MANGLING}")
break()
Expand Down
8 changes: 8 additions & 0 deletions cmake/FindMKL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@
# MKL_INCLUDE_DIRS ... MKL include directory paths
#
# The following variables will be checked by the function
# MKL_DISABLED ... if true, skip all checks for MKL.
# MKL_DIR ... if set, look for MKL in this directory.
# environment $MKLROOT ... if set, look for MKL in this directory.
#

set(MKL_FOUND FALSE)
if(MKL_DISABLED)
message(NOTICE "-- MKL disabled, skipping checks")
else(MKL_DISABLED)

# Set default value of MKL_DIR.

if(NOT MKL_DIR)
Expand Down Expand Up @@ -97,3 +103,5 @@ mark_as_advanced(
MKL_LIBRARIES
)

endif(MKL_DISABLED)

9 changes: 5 additions & 4 deletions platforms/cori-gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
opts="$@"

cmake \
-DCMAKE_C_COMPILER="${CRAYPE_DIR}/bin/cc" \
-DCMAKE_CXX_COMPILER="${CRAYPE_DIR}/bin/CC" \
-DCMAKE_C_COMPILER="gcc" \
-DCMAKE_CXX_COMPILER="g++" \
-DCMAKE_C_FLAGS="-O3 -g -fPIC -pthread" \
-DCMAKE_CXX_FLAGS="-O3 -g -fPIC -pthread" \
-DPYTHON_EXECUTABLE:FILEPATH=$(which python3) \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DBLAS_LIBRARIES=$CMBENV_AUX_ROOT/lib/libopenblas.a \
-DLAPACK_LIBRARIES=$CMBENV_AUX_ROOT/lib/libopenblas.a \
-DMKL_DISABLED=TRUE \
-DBLAS_LIBRARIES=$CMBENV_AUX_ROOT/lib/libopenblas.so \
-DLAPACK_LIBRARIES=$CMBENV_AUX_ROOT/lib/libopenblas.so \
-DFFTW_ROOT=$CMBENV_AUX_ROOT \
-DSUITESPARSE_INCLUDE_DIR_HINTS="${CMBENV_AUX_ROOT}/include" \
-DSUITESPARSE_LIBRARY_DIR_HINTS="${CMBENV_AUX_ROOT}/lib" \
Expand Down
7 changes: 2 additions & 5 deletions platforms/cori-intel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
opts="$@"

cmake \
-DCMAKE_C_COMPILER="${CRAYPE_DIR}/bin/cc" \
-DCMAKE_CXX_COMPILER="${CRAYPE_DIR}/bin/CC" \
-DCMAKE_C_COMPILER="icc" \
-DCMAKE_CXX_COMPILER="icpc" \
-DCMAKE_C_FLAGS="-O3 -g -fPIC -xcore-avx2 -axmic-avx512 -pthread" \
-DCMAKE_CXX_FLAGS="-O3 -g -fPIC -xcore-avx2 -axmic-avx512 -pthread" \
-DPYTHON_EXECUTABLE:FILEPATH=$(which python3) \
-DBLAS_LIBRARIES=$MKLROOT/lib/intel64/libmkl_rt.so \
-DLAPACK_LIBRARIES=$MKLROOT/lib/intel64/libmkl_rt.so \
-DFFTW_ROOT=$CMBENV_AUX_ROOT \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DSUITESPARSE_INCLUDE_DIR_HINTS="${CMBENV_AUX_ROOT}/include" \
-DSUITESPARSE_LIBRARY_DIR_HINTS="${CMBENV_AUX_ROOT}/lib" \
Expand Down
1 change: 1 addition & 0 deletions platforms/linux-gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ cmake \
-DCMAKE_CXX_COMPILER="g++" \
-DCMAKE_C_FLAGS="-O3 -g -fPIC -pthread" \
-DCMAKE_CXX_FLAGS="-O3 -g -fPIC -pthread" \
-DMKL_DISABLED=TRUE \
-DPYTHON_EXECUTABLE:FILEPATH=$(which python3) \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
${opts} \
Expand Down
2 changes: 0 additions & 2 deletions platforms/linux-intel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ cmake \
-DCMAKE_CXX_COMPILER="icpc" \
-DCMAKE_C_FLAGS="-O3 -g -fPIC -pthread" \
-DCMAKE_CXX_FLAGS="-O3 -g -fPIC -pthread" \
-DBLAS_LIBRARIES=${MKLROOT}/lib/intel64/libmkl_rt.so \
-DLAPACK_LIBRARIES=${MKLROOT}/lib/intel64/libmkl_rt.so \
-DPYTHON_EXECUTABLE:FILEPATH=$(which python3) \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
${opts} \
Expand Down