Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NP_TMcode
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
56cda368
Commit
56cda368
authored
10 months ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Implement fall-back search for cudart
parent
f0f6d979
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/configure
+66
-52
66 additions, 52 deletions
build/configure
build/configure.ac
+33
-26
33 additions, 26 deletions
build/configure.ac
with
99 additions
and
78 deletions
build/configure
+
66
−
52
View file @
56cda368
...
@@ -25366,6 +25366,7 @@ then :
...
@@ -25366,6 +25366,7 @@ then :
fi # end of 64-bit decision tree
fi # end of 64-bit decision tree
pkg-config --version > /dev/null
pkg-config --version > /dev/null
use_pkg_config=$?
use_pkg_config=$?
if test "x${CUDAFLAGS}${CUDALDFLAGS}" = "x"; then
if test "x$use_pkg_config" = "x0"; then
if test "x$use_pkg_config" = "x0"; then
# pkg-config is available
# pkg-config is available
declare -a pkg_array=$(pkg-config --list-all | grep cudart)
declare -a pkg_array=$(pkg-config --list-all | grep cudart)
...
@@ -25377,6 +25378,11 @@ then :
...
@@ -25377,6 +25378,11 @@ then :
CUDAFLAGS=$(pkg-config --cflags ${cuda_pkg})
CUDAFLAGS=$(pkg-config --cflags ${cuda_pkg})
CUDALDFLAGS=$(pkg-config --libs ${cuda_pkg})
CUDALDFLAGS=$(pkg-config --libs ${cuda_pkg})
fi # end of CUDA runtime decision tree
fi # end of CUDA runtime decision tree
echo $CUDALDFLAGS | grep cudart > /dev/null
cudart_check=$?
if test "x${cudart_check}" != "x0"; then
CUDALDFLAGS="$CUDALDFLAGS -lcudart"
fi
else
else
# pkg-config is not available
# pkg-config is not available
if test -f /usr/local/cuda/include/cuda.h; then
if test -f /usr/local/cuda/include/cuda.h; then
...
@@ -25390,9 +25396,10 @@ then :
...
@@ -25390,9 +25396,10 @@ then :
CUDALDFLAGS="-L${CUDA_HOME}/lib64 -lcudart"
CUDALDFLAGS="-L${CUDA_HOME}/lib64 -lcudart"
fi
fi
fi # end of pkg-config decision tree
fi # end of pkg-config decision tree
fi # end of CUDAFLAGS user override protection
if test "x${MAGMA_ROOT}${MAGMA_HOME}${MAGMA_DIR}" = "x"; then
if test "x${MAGMA_ROOT}${MAGMA_HOME}${MAGMA_DIR}" = "x"; then
# MAGMA environment is not defined
# MAGMA environment is not defined
if "x$use_pkg_config" = "x0"; then
if
test
"x$use_pkg_config" = "x0"; then
# use pkg-config to search for MAGMA
# use pkg-config to search for MAGMA
declare -a pkg_array=$(pkg-config --list-all | grep magma)
declare -a pkg_array=$(pkg-config --list-all | grep magma)
for i in "${pkg_array[@]}"; do echo "$i" | cut --delimiter=" " -f1; done | grep magma > /dev/null
for i in "${pkg_array[@]}"; do echo "$i" | cut --delimiter=" " -f1; done | grep magma > /dev/null
...
@@ -25401,7 +25408,7 @@ then :
...
@@ -25401,7 +25408,7 @@ then :
# MAGMA was found
# MAGMA was found
magma_pkg=$(for i in "${pkg_array[@]}"; do echo "$i" | cut --delimiter=" " -f1; done | grep magma)
magma_pkg=$(for i in "${pkg_array[@]}"; do echo "$i" | cut --delimiter=" " -f1; done | grep magma)
MAGMA_INCLUDE=$(pkg-config --cflags-only-I ${magma_pkg})
MAGMA_INCLUDE=$(pkg-config --cflags-only-I ${magma_pkg})
MAGMA_LIBS_DIR=$(pkg-config --
cflag
s-only-L ${magma_pkg})
MAGMA_LIBS_DIR=$(pkg-config --
lib
s-only-L ${magma_pkg})
export MAGMAFLAGS="-DUSE_MAGMA ${MAGMA_ILP64_FLAG} $CUDAFLAGS ${MAGMA_INCLUDE}"
export MAGMAFLAGS="-DUSE_MAGMA ${MAGMA_ILP64_FLAG} $CUDAFLAGS ${MAGMA_INCLUDE}"
export MAGMALDFLAGS="$CUDALDFLAGS ${MAGMA_LIBS_DIR} -lmagma"
export MAGMALDFLAGS="$CUDALDFLAGS ${MAGMA_LIBS_DIR} -lmagma"
fi # end of MAGMA decision tree
fi # end of MAGMA decision tree
...
@@ -25459,6 +25466,7 @@ else case e in #(
...
@@ -25459,6 +25466,7 @@ else case e in #(
fi # end of 64-bit decision tree
fi # end of 64-bit decision tree
pkg-config --version > /dev/null
pkg-config --version > /dev/null
use_pkg_config=$?
use_pkg_config=$?
if test "x${CUDAFLAGS}${CUDALDFLAGS}" = "x"; then
if test "x$use_pkg_config" = "x0"; then
if test "x$use_pkg_config" = "x0"; then
# pkg-config is available
# pkg-config is available
declare -a pkg_array=$(pkg-config --list-all | grep cudart)
declare -a pkg_array=$(pkg-config --list-all | grep cudart)
...
@@ -25470,6 +25478,11 @@ else case e in #(
...
@@ -25470,6 +25478,11 @@ else case e in #(
CUDAFLAGS=$(pkg-config --cflags ${cuda_pkg})
CUDAFLAGS=$(pkg-config --cflags ${cuda_pkg})
CUDALDFLAGS=$(pkg-config --libs ${cuda_pkg})
CUDALDFLAGS=$(pkg-config --libs ${cuda_pkg})
fi # end of CUDA runtime decision tree
fi # end of CUDA runtime decision tree
echo $CUDALDFLAGS | grep cudart > /dev/null
cudart_check=$?
if test "x${cudart_check}" != "x0"; then
CUDALDFLAGS="$CUDALDFLAGS -lcudart"
fi
else
else
# pkg-config is not available
# pkg-config is not available
if test -f /usr/local/cuda/include/cuda.h; then
if test -f /usr/local/cuda/include/cuda.h; then
...
@@ -25483,9 +25496,10 @@ else case e in #(
...
@@ -25483,9 +25496,10 @@ else case e in #(
CUDALDFLAGS="-L${CUDA_HOME}/lib64 -lcudart"
CUDALDFLAGS="-L${CUDA_HOME}/lib64 -lcudart"
fi
fi
fi # end of pkg-config decision tree
fi # end of pkg-config decision tree
fi # end of CUDAFLAGS user override protection
if test "x${MAGMA_ROOT}${MAGMA_HOME}${MAGMA_DIR}" = "x"; then
if test "x${MAGMA_ROOT}${MAGMA_HOME}${MAGMA_DIR}" = "x"; then
# MAGMA environment is not defined
# MAGMA environment is not defined
if "x$use_pkg_config" = "x0"; then
if
test
"x$use_pkg_config" = "x0"; then
# use pkg-config to search for MAGMA
# use pkg-config to search for MAGMA
declare -a pkg_array=$(pkg-config --list-all | grep magma)
declare -a pkg_array=$(pkg-config --list-all | grep magma)
for i in "${pkg_array[@]}"; do echo "$i" | cut --delimiter=" " -f1; done | grep magma > /dev/null
for i in "${pkg_array[@]}"; do echo "$i" | cut --delimiter=" " -f1; done | grep magma > /dev/null
...
@@ -25494,7 +25508,7 @@ else case e in #(
...
@@ -25494,7 +25508,7 @@ else case e in #(
# MAGMA was found
# MAGMA was found
magma_pkg=$(for i in "${pkg_array[@]}"; do echo "$i" | cut --delimiter=" " -f1; done | grep magma)
magma_pkg=$(for i in "${pkg_array[@]}"; do echo "$i" | cut --delimiter=" " -f1; done | grep magma)
MAGMA_INCLUDE=$(pkg-config --cflags-only-I ${magma_pkg})
MAGMA_INCLUDE=$(pkg-config --cflags-only-I ${magma_pkg})
MAGMA_LIBS_DIR=$(pkg-config --
cflag
s-only-L ${magma_pkg})
MAGMA_LIBS_DIR=$(pkg-config --
lib
s-only-L ${magma_pkg})
export MAGMAFLAGS="-DUSE_MAGMA ${MAGMA_ILP64_FLAG} $CUDAFLAGS ${MAGMA_INCLUDE}"
export MAGMAFLAGS="-DUSE_MAGMA ${MAGMA_ILP64_FLAG} $CUDAFLAGS ${MAGMA_INCLUDE}"
export MAGMALDFLAGS="$CUDALDFLAGS ${MAGMA_LIBS_DIR} -lmagma"
export MAGMALDFLAGS="$CUDALDFLAGS ${MAGMA_LIBS_DIR} -lmagma"
fi # end of MAGMA decision tree
fi # end of MAGMA decision tree
...
...
This diff is collapsed.
Click to expand it.
build/configure.ac
+
33
−
26
View file @
56cda368
...
@@ -160,6 +160,7 @@ m4_define(
...
@@ -160,6 +160,7 @@ m4_define(
fi # end of 64-bit decision tree
fi # end of 64-bit decision tree
pkg-config --version > /dev/null
pkg-config --version > /dev/null
use_pkg_config=$?
use_pkg_config=$?
if test "x${CUDAFLAGS}${CUDALDFLAGS}" = "x"; then
if test "x$use_pkg_config" = "x0"; then
if test "x$use_pkg_config" = "x0"; then
# pkg-config is available
# pkg-config is available
declare -a pkg_array=$(pkg-config --list-all | grep cudart)
declare -a pkg_array=$(pkg-config --list-all | grep cudart)
...
@@ -171,6 +172,11 @@ m4_define(
...
@@ -171,6 +172,11 @@ m4_define(
CUDAFLAGS=$(pkg-config --cflags ${cuda_pkg})
CUDAFLAGS=$(pkg-config --cflags ${cuda_pkg})
CUDALDFLAGS=$(pkg-config --libs ${cuda_pkg})
CUDALDFLAGS=$(pkg-config --libs ${cuda_pkg})
fi # end of CUDA runtime decision tree
fi # end of CUDA runtime decision tree
echo $CUDALDFLAGS | grep cudart > /dev/null
cudart_check=$?
if test "x${cudart_check}" != "x0"; then
CUDALDFLAGS="$CUDALDFLAGS -lcudart"
fi
else
else
# pkg-config is not available
# pkg-config is not available
if test -f /usr/local/cuda/include/cuda.h; then
if test -f /usr/local/cuda/include/cuda.h; then
...
@@ -184,9 +190,10 @@ m4_define(
...
@@ -184,9 +190,10 @@ m4_define(
CUDALDFLAGS="-L${CUDA_HOME}/lib64 -lcudart"
CUDALDFLAGS="-L${CUDA_HOME}/lib64 -lcudart"
fi
fi
fi # end of pkg-config decision tree
fi # end of pkg-config decision tree
fi # end of CUDAFLAGS user override protection
if test "x${MAGMA_ROOT}${MAGMA_HOME}${MAGMA_DIR}" = "x"; then
if test "x${MAGMA_ROOT}${MAGMA_HOME}${MAGMA_DIR}" = "x"; then
# MAGMA environment is not defined
# MAGMA environment is not defined
if "x$use_pkg_config" = "x0"; then
if
test
"x$use_pkg_config" = "x0"; then
# use pkg-config to search for MAGMA
# use pkg-config to search for MAGMA
declare -a pkg_array=$(pkg-config --list-all | grep magma)
declare -a pkg_array=$(pkg-config --list-all | grep magma)
for i in "${pkg_array[[@]]}"; do echo "$i" | cut --delimiter=" " -f1; done | grep magma > /dev/null
for i in "${pkg_array[[@]]}"; do echo "$i" | cut --delimiter=" " -f1; done | grep magma > /dev/null
...
@@ -195,7 +202,7 @@ m4_define(
...
@@ -195,7 +202,7 @@ m4_define(
# MAGMA was found
# MAGMA was found
magma_pkg=$(for i in "${pkg_array[[@]]}"; do echo "$i" | cut --delimiter=" " -f1; done | grep magma)
magma_pkg=$(for i in "${pkg_array[[@]]}"; do echo "$i" | cut --delimiter=" " -f1; done | grep magma)
MAGMA_INCLUDE=$(pkg-config --cflags-only-I ${magma_pkg})
MAGMA_INCLUDE=$(pkg-config --cflags-only-I ${magma_pkg})
MAGMA_LIBS_DIR=$(pkg-config --
cflag
s-only-L ${magma_pkg})
MAGMA_LIBS_DIR=$(pkg-config --
lib
s-only-L ${magma_pkg})
export MAGMAFLAGS="-DUSE_MAGMA ${MAGMA_ILP64_FLAG} $CUDAFLAGS ${MAGMA_INCLUDE}"
export MAGMAFLAGS="-DUSE_MAGMA ${MAGMA_ILP64_FLAG} $CUDAFLAGS ${MAGMA_INCLUDE}"
export MAGMALDFLAGS="$CUDALDFLAGS ${MAGMA_LIBS_DIR} -lmagma"
export MAGMALDFLAGS="$CUDALDFLAGS ${MAGMA_LIBS_DIR} -lmagma"
fi # end of MAGMA decision tree
fi # end of MAGMA decision tree
...
...
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