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

detect cblas.h during cmake for openblas #4013

Merged
merged 2 commits into from
Dec 14, 2017

Conversation

vermashresth
Copy link
Contributor

resolves #3996
When Atlas is not detected, a further check is implemented to see if detected LAPACK API is OpenBLAS using search for an openBLAS specific function. If it is then cblas.h is checked otherwise all LAPACK flags are unset and error is shown.

@@ -91,6 +91,22 @@ IF (LAPACK_FOUND)
ENDIF()
ENDIF()

IF(FOUND_CBLAS_DGEMV AND NOT HAVE_ATLAS )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the whitespace after HAVE_ATLAS

@@ -91,6 +91,22 @@ IF (LAPACK_FOUND)
ENDIF()
ENDIF()

IF(FOUND_CBLAS_DGEMV AND NOT HAVE_ATLAS )
#check is detected BLAS/LAPACK is OpenBLAS by looking for an OpenBLAS specific function
check_library_exists("${LAPACK_LIBRARIES}" openblas_set_num_threads "" FOUND_OPENBLAS)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to follow the logic _FOUND please change this to OpenBLAS_FOUND

#check if cblas.h exists
FIND_PATH(CBLAS_INCLUDE_DIR cblas.h)
IF(NOT CBLAS_INCLUDE_DIR)
MESSAGE(STATUS "Found OPENBLAS, but not cblas.h. Make sure that cblas headers are available in order to use OPENBLAS as BLAS/Lapack backend")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure that cblas.h header is available within the header search path in order to use OpenBLAS as BLAS/Lapack backend

@vigsterkr vigsterkr merged commit 7e86262 into shogun-toolbox:develop Dec 14, 2017
ktiefe pushed a commit to ktiefe/shogun that referenced this pull request Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cmake does not check for openblas headers
2 participants