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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
460fb347
Commit
460fb347
authored
8 months ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Enable MAGMA optional configuration
parent
d2ed5fde
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/Makefile.am
+1
-1
1 addition, 1 deletion
build/Makefile.am
build/configure.ac
+76
-27
76 additions, 27 deletions
build/configure.ac
with
77 additions
and
28 deletions
build/Makefile.am
+
1
−
1
View file @
460fb347
AUTOMAKE_OPTIONS
=
subdir-objects
LDADD
=
libnptm/libnptm.la
-L
/usr/lib64
${
HDF5_LDFLAGS
}
${
LAPACK
_
LDFLAGS
}
LDADD
=
libnptm/libnptm.la
-L
/usr/lib64
${
HDF5_LDFLAGS
}
${
LAPACK
LDFLAGS
}
${
MAGMA
LDFLAGS
}
lib_LTLIBRARIES
=
libnptm/libnptm.la
libnptm_libnptm_la_SOURCES
=
../src/libnptm/algebraic.cpp ../src/libnptm/clu_subs.cpp ../src/libnptm/Commons.cpp ../src/libnptm/Configuration.cpp ../src/libnptm/file_io.cpp ../src/libnptm/lapack_calls.cpp ../src/libnptm/logging.cpp ../src/libnptm/magma_calls.cpp ../src/libnptm/Parsers.cpp ../src/libnptm/sph_subs.cpp ../src/libnptm/tfrfme.cpp ../src/libnptm/TransitionMatrix.cpp ../src/libnptm/tra_subs.cpp ../src/libnptm/types.cpp
bin_PROGRAMS
=
cluster/edfb_clu cluster/clu cluster/np_cluster sphere/edfb_sph sphere/sph sphere/np_sphere trapping/frfme trapping/lffft trapping/np_trapping
...
...
This diff is collapsed.
Click to expand it.
build/configure.ac
+
76
−
27
View file @
460fb347
...
...
@@ -22,15 +22,52 @@ EOF
m4_define(
[M4_DETECT_LAPACK],
[
LAPACK_ROOT=$MKLROOT
if test "x$LAPACK_ROOT" != "x"; then
export LAPACK_INCLUDE=$(MKLROOT)/include
export LAPACK
_LIB=$(MKLROOT)/lib
export LAPACK
_LIBRARY="
-Wl,--no-as-needed -lmkl_intel_ilp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl"
export -p | grep MKL
MKL_DEF=$?
if test "x$MKL_DEF" = "x0"; then
export LAPACK
FLAGS="-DUSE_LAPACK -DLAPACK_ILP64 -DUSE_ILP64 -I{MKLROOT}/include"
export LAPACK
LDFLAGS="-L${MKLROOT}/lib
-Wl,--no-as-needed -lmkl_intel_ilp64 -lmkl_gnu_thread -lmkl_core -lgomp -lpthread -lm -ldl"
else
export LAPACK_INCLUDE=/usr/include
export LAPACK_LIB=/lib/x86_64-linux-gnu
export LAPACK_LIBRARY="-llapacke64"
if test -f /usr/include/lapacke.h; then
export LAPACKFLAGS="-DUSE_LAPACK -DLAPACK_ILP64 -DUSE_ILP64"
export LAPACKLDFLAGS="-llapacke64"
fi
fi
]
)
m4_define(
[M4_DETECT_MAGMA],
[
if test "x$CUDA_LIB" = "x"; then
export -p | grep CUDA
CUDA_DEF=$?
if test "x$CUDA_DEF" = "x0"; then
CUDA_LIB=${CUDA_HOME}/targets/x86_64-linux/lib
else
CUDA_LIB=/usr/local/cuda/targets/x86_64-linux/lib
fi
fi
export -p | grep MAGMA
MAGMA_DEF=$?
if test "x$MAGMA_DEF" = "x0"; then
export MAGMAFLAGS="-DUSE_MAGMA -DMAGMA_ILP64 -I${MAGMA_INCLUDE}"
export MAGMALDFLAGS="-L${CUDA_LIB} -lcudart -L${MAGMA_LIB} -lmagma"
else
if test "x$MAGMA_INCLUDE" != "x"; then
export MAGMAFLAGS="-DUSE_MAGMA -DMAGMA_ILP64 -I${MAGMA_INCLUDE}"
else
if test -f /usr/include/magma_v2.h; then
export MAGMAFLAGS="-DUSE_MAGMA -DMAGMA_ILP64"
fi
fi
if test "x$MAGMA_LIB" != "x"; then
export MAGMALDFLAGS="-L${CUDA_LIB} -lcudart -L${MAGMA_LIB} -lmagma"
else
if test -f /usr/include/magma_v2.h; then
export MAGMALDFLAGS="-L${CUDA_LIB} -lcudart -lmagma"
fi
fi
fi
]
)
...
...
@@ -184,9 +221,16 @@ AS_IF(
# Configure the optional features
M4_DETECT_LAPACK
AS_IF(
[test "x$LAPACK_LIBRARY" != "x"],
[AC_MSG_NOTICE([LAPACK detected])],
[AC_MSG_NOTICE([No LAPACK found])]
[test "x$LAPACKLDFLAGS" != "x"],
[AC_MSG_NOTICE([LAPACK detected. Activating by default (use --without-lapack to disable).])],
[AC_MSG_NOTICE([No LAPACK found.])]
)
M4_DETECT_MAGMA
AS_IF(
[test "x$MAGMALDFLAGS" != "x"],
[AC_MSG_NOTICE([MAGMA detected. Activating by default (use --without-magma to disable).])],
[AC_MSG_NOTICE([MAGMA not found.])]
)
AC_ARG_ENABLE(
...
...
@@ -207,34 +251,39 @@ AC_ARG_WITH(
[AS_HELP_STRING([--with-lapack], [use LAPACK @<:@default=check@:>@])],
[
if test "x$withval" = "xno"; then
AC_SUBST([LAPACK_FLAGS], [""])
AC_SUBST([LAPACK_LDFLAGS], [""])
AC_SUBST([LAPACKFLAGS], [""])
AC_SUBST([LAPACKLDFLAGS], [""])
else
AC_SUBST([LAPACKFLAGS], [${LAPACKFLAGS}])
AC_SUBST([LAPACKLDFLAGS], [${LAPACKLDFLAGS}])
fi
],
[
if test "x$LAPACK_INCLUDE" != "x"; then
AC_SUBST([LAPACK_FLAGS], ["-DUSE_LAPACK -DLAPACK_ILP64 -DUSE_ILP64 -I${LAPACK_INCLUDE}"])
AC_SUBST([LAPACK_LDFLAGS], ["-L${LAPACK_LIB} ${LAPACK_LIBRARY}"])
fi
AC_SUBST([LAPACKFLAGS], [${LAPACKFLAGS}])
AC_SUBST([LAPACKLDFLAGS], [${LAPACKLDFLAGS}])
]
)
AC_ARG_WITH(
[magma],
[AS_HELP_STRING([--with-magma], [use MAGMA @<:@default=check@:>@])],
[],
[]
)
AC_ARG_ENABLE(
[ilp64],
[AS_HELP_STRING([--enable-ilp64], [use MAGMA @<:@default=check@:>@])],
[],
[]
[
if test "x$withval" = "xno"; then
AC_SUBST([MAGMAFLAGS], [""])
AC_SUBST([MAGMALDFLAGS], [""])
else
AC_SUBST([MAGMAFLAGS], [${MAGMAFLAGS}])
AC_SUBST([MAGMALDFLAGS], [${MAGMALDFLAGS}])
fi
],
[
AC_SUBST([MAGMAFLAGS], [${MAGMAFLAGS}])
AC_SUBST([MAGMALDFLAGS], [${MAGMALDFLAGS}])
]
)
FFLAGS="-std=legacy -O3"
CXXFLAGS="-O3 -ggdb -Wno-format-contains-nul -I$HDF5_INCLUDE $OMPFLAGS $LAPACK
_
FLAGS"
CXXFLAGS="-O3 -ggdb -Wno-format-contains-nul -I$HDF5_INCLUDE $OMPFLAGS $LAPACK
FLAGS $MAGMA
FLAGS"
SUBDIRS="cluster libnptm sphere testing trapping"
# Send output to Makefiles
...
...
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