Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lib4neuro
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MolDyn
lib4neuro
Commits
f9cd7c58
Commit
f9cd7c58
authored
6 years ago
by
Martin Beseda
Browse files
Options
Downloads
Patches
Plain Diff
FIX: Trying to fix OpenBlass download
parent
710242a3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+2
-1
2 additions, 1 deletion
CMakeLists.txt
DownloadOpenBLAS.cmake
+18
-18
18 additions, 18 deletions
DownloadOpenBLAS.cmake
FindOpenBLAS.cmake
+18
-34
18 additions, 34 deletions
FindOpenBLAS.cmake
with
38 additions
and
53 deletions
CMakeLists.txt
+
2
−
1
View file @
f9cd7c58
...
@@ -146,7 +146,8 @@ endif()
...
@@ -146,7 +146,8 @@ endif()
message
(
"Checking Armadillo dependencies"
)
message
(
"Checking Armadillo dependencies"
)
find_package
(
LAPACK
)
find_package
(
LAPACK
)
find_package
(
BLAS
)
find_package
(
BLAS
)
if
(
NOT LAPACK_FOUND AND NOT BLAS_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD
)
find_package
(
OpenBLAS
)
if
(
NOT LAPACK_FOUND AND NOT BLAS_FOUND AND NOT OpenBLAS_FOUND AND ALLOW_DEPENDENCIES_DOWNLOAD
)
# Download and build OpenBLAS locally
# Download and build OpenBLAS locally
message
(
"LAPACK nor BLAS were found - OpenBLAS will be downloaded and built."
)
message
(
"LAPACK nor BLAS were found - OpenBLAS will be downloaded and built."
)
include
(
DownloadOpenBLAS
)
include
(
DownloadOpenBLAS
)
...
...
This diff is collapsed.
Click to expand it.
DownloadOpenBLAS.cmake
+
18
−
18
View file @
f9cd7c58
...
@@ -20,23 +20,23 @@ FetchContent_Populate(OpenBLAS)
...
@@ -20,23 +20,23 @@ FetchContent_Populate(OpenBLAS)
##################
##################
# Build OpenBLAS #
# Build OpenBLAS #
##################
##################
execute_process
(
#
execute_process(
COMMAND cmake -j
${
N_CORES
}
.
#
COMMAND cmake -j ${N_CORES} .
WORKING_DIRECTORY
${
OPENBLAS_LOCAL_PATH
}
#
WORKING_DIRECTORY ${OPENBLAS_LOCAL_PATH}
RESULT_VARIABLE rv
#
RESULT_VARIABLE rv
)
#
)
if
(
NOT rv STREQUAL
"0"
)
#
if(NOT rv STREQUAL "0")
message
(
"OpenBLAS build: cmake .:
${
rv
}
"
)
#
message("OpenBLAS build: cmake .: ${rv}")
endif
()
#
endif()
#
execute_process
(
#
execute_process(
COMMAND cmake --build . -j
${
N_CORES
}
--config Release
#
COMMAND cmake --build . -j ${N_CORES} --config Release
WORKING_DIRECTORY
${
OPENBLAS_LOCAL_PATH
}
#
WORKING_DIRECTORY ${OPENBLAS_LOCAL_PATH}
RESULT_VARIABLE rv
#
RESULT_VARIABLE rv
)
#
)
if
(
NOT rv STREQUAL
"0"
)
#
if(NOT rv STREQUAL "0")
message
(
"OpenBLAS build: cmake --build . -j
${
N_CORES
}
:
${
rv
}
"
)
#
message("OpenBLAS build: cmake --build . -j ${N_CORES}: ${rv}")
endif
()
#
endif()
set
(
OpenBLAS_DIR
${
CMAKE_CURRENT_LIST_DIR
}
/external_dependencies/OpenBLAS
)
set
(
OpenBLAS_DIR
${
CMAKE_CURRENT_LIST_DIR
}
/external_dependencies/OpenBLAS
)
find_package
(
OpenBLAS
)
find_package
(
OpenBLAS
)
...
@@ -44,6 +44,6 @@ find_package(OpenBLAS)
...
@@ -44,6 +44,6 @@ find_package(OpenBLAS)
if
(
NOT BLAS_FOUND
)
if
(
NOT BLAS_FOUND
)
message
(
FATAL_ERROR
"OpenBLAS was not downloaded successfully!"
)
message
(
FATAL_ERROR
"OpenBLAS was not downloaded successfully!"
)
else
()
else
()
message
(
"OpenBLAS libraries: "
${
BLAS_LIBRARIES
}
)
message
(
"OpenBLAS libraries: "
${
BLAS_LIBRARIES
}
)
endif
()
endif
()
This diff is collapsed.
Click to expand it.
FindOpenBLAS.cmake
+
18
−
34
View file @
f9cd7c58
message
(
"FindOpenBLAS starting..."
)
message
(
"FindOpenBLAS starting..."
)
SET
(
Open_BLAS_INCLUDE_SEARCH_PATHS
set
(
OpenBLAS_ROOT external_dependencies/OpenBLAS
)
${
OpenBLAS_INCLUDE_DIRECTORY
}
$ENV{OpenBLAS_INCLUDE_DIRECTORY}
/usr/include
/usr/include/openblas
/usr/include/openblas-base
/usr/local/include
/usr/local/include/openblas
/usr/local/include/openblas-base
/opt/OpenBLAS/include
${
CMAKE_CURRENT_LIST_DIR
}
/external_dependencies/OpenBLAS
)
SET
(
Open_BLAS_LIB_SEARCH_PATHS
FIND_PATH
(
${
OpenBLAS_LIBRARY_DIRECTORY
}
OpenBLAS_INCLUDE_DIR
$ENV{OpenBLAS_LIBRARY_DIRECTORY}
/lib/
/lib/openblas-base
/lib64/
/usr/lib
/usr/lib/openblas-base
/usr/lib64
/usr/local/lib
/usr/local/lib64
/opt/OpenBLAS/lib
${
CMAKE_CURRENT_LIST_DIR
}
/external_dependencies/OpenBLAS/lib
)
FIND_PATH
(
OpenBLAS_INCLUDE_DIR
NAMES
NAMES
cblas.h
cblas.h
PATHS
HINTS
${
Open_BLAS_INCLUDE_SEARCH_PATHS
}
${
OpenBLAS_INCLUDE_DIRECTORY
}
$ENV{OpenBLAS_INCLUDE_DIRECTORY}
/usr/include/
/usr/include/x86_64-linux-gnu
external_dependencies/OpenBLAS
)
)
FIND_LIBRARY
(
OpenBLAS_LIBRARIES
FIND_LIBRARY
(
OpenBLAS_LIBRARIES
NAMES
NAMES
openblas
${
LIB_PREFIX
}
openblas.
${
LIB_SUFFIX
}
PATHS
HINTS
${
Open_BLAS_LIB_SEARCH_PATHS
}
${
OpenBLAS_LIBRARY_DIRECTORY
}
$ENV{OpenBLAS_LIBRARY_DIRECTORY}
/usr/lib
/usr/lib/x86_64-linux-gnu
external_dependencies/OpenBLAS/lib
)
)
# Set OpenBLAS_Found
# Set OpenBLAS_Found
...
@@ -54,7 +38,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(
...
@@ -54,7 +38,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(
REQUIRED_VARS
REQUIRED_VARS
OpenBLAS_INCLUDE_DIR
OpenBLAS_INCLUDE_DIR
OpenBLAS_LIBRAR
Y_DIR
OpenBLAS_LIBRAR
IES
)
)
IF
(
OpenBLAS_FOUND
)
IF
(
OpenBLAS_FOUND
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment