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
407c119b
Commit
407c119b
authored
11 months ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Enable alternative search of cudart and fix bug in MAGMA library search
parent
35d21dbc
Branches
Branches containing commit
Tags
Tags containing commit
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 @
407c119b
...
...
@@ -25366,6 +25366,7 @@ then :
fi # end of 64-bit decision tree
pkg-config --version > /dev/null
use_pkg_config=$?
if test "x${CUDAFLAGS}${CUDALDFLAGS}" = "x"; then
if test "x$use_pkg_config" = "x0"; then
# pkg-config is available
declare -a pkg_array=$(pkg-config --list-all | grep cudart)
...
...
@@ -25377,6 +25378,11 @@ then :
CUDAFLAGS=$(pkg-config --cflags ${cuda_pkg})
CUDALDFLAGS=$(pkg-config --libs ${cuda_pkg})
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
# pkg-config is not available
if test -f /usr/local/cuda/include/cuda.h; then
...
...
@@ -25390,9 +25396,10 @@ then :
CUDALDFLAGS="-L${CUDA_HOME}/lib64 -lcudart"
fi
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
# 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
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
...
...
@@ -25401,7 +25408,7 @@ then :
# MAGMA was found
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_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 MAGMALDFLAGS="$CUDALDFLAGS ${MAGMA_LIBS_DIR} -lmagma"
fi # end of MAGMA decision tree
...
...
@@ -25459,6 +25466,7 @@ else case e in #(
fi # end of 64-bit decision tree
pkg-config --version > /dev/null
use_pkg_config=$?
if test "x${CUDAFLAGS}${CUDALDFLAGS}" = "x"; then
if test "x$use_pkg_config" = "x0"; then
# pkg-config is available
declare -a pkg_array=$(pkg-config --list-all | grep cudart)
...
...
@@ -25470,6 +25478,11 @@ else case e in #(
CUDAFLAGS=$(pkg-config --cflags ${cuda_pkg})
CUDALDFLAGS=$(pkg-config --libs ${cuda_pkg})
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
# pkg-config is not available
if test -f /usr/local/cuda/include/cuda.h; then
...
...
@@ -25483,9 +25496,10 @@ else case e in #(
CUDALDFLAGS="-L${CUDA_HOME}/lib64 -lcudart"
fi
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
# 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
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
...
...
@@ -25494,7 +25508,7 @@ else case e in #(
# MAGMA was found
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_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 MAGMALDFLAGS="$CUDALDFLAGS ${MAGMA_LIBS_DIR} -lmagma"
fi # end of MAGMA decision tree
...
...
This diff is collapsed.
Click to expand it.
build/configure.ac
+
33
−
26
View file @
407c119b
...
...
@@ -160,6 +160,7 @@ m4_define(
fi # end of 64-bit decision tree
pkg-config --version > /dev/null
use_pkg_config=$?
if test "x${CUDAFLAGS}${CUDALDFLAGS}" = "x"; then
if test "x$use_pkg_config" = "x0"; then
# pkg-config is available
declare -a pkg_array=$(pkg-config --list-all | grep cudart)
...
...
@@ -171,6 +172,11 @@ m4_define(
CUDAFLAGS=$(pkg-config --cflags ${cuda_pkg})
CUDALDFLAGS=$(pkg-config --libs ${cuda_pkg})
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
# pkg-config is not available
if test -f /usr/local/cuda/include/cuda.h; then
...
...
@@ -184,9 +190,10 @@ m4_define(
CUDALDFLAGS="-L${CUDA_HOME}/lib64 -lcudart"
fi
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
# 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
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
...
...
@@ -195,7 +202,7 @@ m4_define(
# MAGMA was found
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_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 MAGMALDFLAGS="$CUDALDFLAGS ${MAGMA_LIBS_DIR} -lmagma"
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