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
6b32a864
Commit
6b32a864
authored
3 months ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Add default options to argument parser
parent
a0a06219
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
build/configure.sh
+70
-49
70 additions, 49 deletions
build/configure.sh
with
70 additions
and
49 deletions
build/configure.sh
+
70
−
49
View file @
6b32a864
...
...
@@ -73,18 +73,25 @@ function print_help {
echo
"Use this script to detect the proper build configuration for your system. "
echo
"Valid options are: "
echo
" "
echo
"--enable-fortran Enable FORTRAN compilation (DEFAULT). "
echo
"--disable-fortran Disable FORTRAN compilation. "
echo
"--enable-gdb Enable GNU debugger (DEFAULT). "
echo
"--disable-gdb Disable GNU debugger. "
echo
"--enable-ilp64 Enable 64-bit integers (DEFAULT). "
echo
"--disable-ilp64 Disable 64-bit integers. "
echo
"--enable-offload Enable GPU offloading (DEFAULT). "
echo
"--disable-offload Disable GPU offloading. "
echo
"--enable-openmp Enable OpenMP multi-threading (DEFAULT). "
echo
"--disable-openmp Disable OpenMP multi-threading. "
echo
"--enable-debug=FEATURE Enable debug output of specified feature. "
echo
"--enable-fortran Enable FORTRAN compilation (DEFAULT). "
echo
"--enable-nvtx Enable NVTX profiling tools. "
echo
"--
en
able-
openmp
Enable OpenMP multi-threading
(DEFAULT). "
echo
"--
dis
able-
nvtx
Disable NVTX profiling tools
(DEFAULT). "
echo
"--enable-optimize=OPT Use OPT-level compiler optimization. "
echo
"--enable-refinement Use iterative refinement of matrix inversion. "
echo
"--disable-refinement Do not iterate refinement of matrix inversion "
echo
" (DEFAULT). "
echo
"--enable-shared Use shared libraries (default is static). "
echo
"--disable-shared Use static libraries (DEFAULT). "
echo
"--help Print this help and exit. "
echo
"--with-cublas Use cuBLAS (DEFAULT). "
echo
"--without-cublas Disable cuBLAS. "
...
...
@@ -95,11 +102,12 @@ function print_help {
echo
" than once). "
echo
"--with-lapack Use LAPACK (DEFAULT). "
echo
"--without-lapack Disable LAPACK. "
echo
"--with-ldflags=[PATH] Use additional linker LDFLAGS (can be given
more
"
echo
" than once).
"
echo
"--with-ldflags=[PATH]
Use additional linker LDFLAGS (can be given
"
echo
"
more
than once). "
echo
"--with-magma=[MAGMA] Use specified MAGMA distribution (DEFAULT). "
echo
"--without-magma Disable MAGMA. "
echo
"--enable-magma-invert=OPTION Use specified MAGMA matrix inversion function (options = auto|getri|gesv|rbt, default getri). "
echo
"--enable-magma-invert=OPTION Use specified MAGMA matrix inversion function "
echo
" (options = auto|getri|gesv|rbt, default getri)."
echo
" "
echo
"Some influential environment variables are: "
echo
" "
...
...
@@ -143,16 +151,27 @@ do
if
[
"x
$cut_arg
"
=
"x--help"
]
;
then
print_help | less
exit
0
elif
[
"x
$cut_arg
"
=
"x--enable-gdb"
]
;
then
FC_DBG
=
" -ggdb"
CXX_DBG
=
" -ggdb"
elif
[
"x
$cut_arg
"
=
"x--disable-gdb"
]
;
then
FC_DBG
=
""
CXX_DBG
=
""
elif
[
"x
$cut_arg
"
=
"x--enable-ilp64"
]
;
then
ENABLE_ILP64
=
"yes"
elif
[
"x
$cut_arg
"
=
"x--disable-ilp64"
]
;
then
ENABLE_ILP64
=
"no"
elif
[
"x
$cut_arg
"
=
"x--enable-fortran"
]
;
then
BUILDFORTRAN
=
"yes"
elif
[
"x
$cut_arg
"
=
"x--disable-fortran"
]
;
then
FC
=
"none"
BUILDFORTRAN
=
"no"
elif
[
"x
$cut_arg
"
=
"x--enable-offload"
]
;
then
OFFLOAD
=
"auto"
elif
[
"x
$cut_arg
"
=
"x--disable-offload"
]
;
then
OFFLOAD
=
"no"
elif
[
"x
$cut_arg
"
=
"x--enable-openmp"
]
;
then
OMPMODE
=
"yes"
elif
[
"x
$cut_arg
"
=
"x--disable-openmp"
]
;
then
OMPMODE
=
"no"
elif
[
"x
$cut_arg
"
=
"x--enable-debug"
]
;
then
...
...
@@ -167,12 +186,10 @@ do
DEBUGFLAGS
=
"
${
DEBUGFLAGS
}
-DDEBUG_
${
dbg_feature
}
"
fi
fi
elif
[
"x
$cut_arg
"
=
"x--enable-fortran"
]
;
then
BUILDFORTRAN
=
"yes"
elif
[
"x
$cut_arg
"
=
"x--enable-nvtx"
]
;
then
NVTXFLAGS
=
" -DUSE_NVTX"
elif
[
"x
$cut_arg
"
=
"x--
en
able-
openmp
"
]
;
then
OMPMODE
=
"yes
"
elif
[
"x
$cut_arg
"
=
"x--
dis
able-
nvtx
"
]
;
then
NVTXFLAGS
=
"
"
elif
[
"x
$cut_arg
"
=
"x--enable-optimize"
]
;
then
opt_level
=
$(
echo
$arg
|
cut
-d
'='
-f2
)
if
[
$opt_level
-lt
0
-o
$opt_level
-gt
3
]
;
then
...
...
@@ -183,8 +200,12 @@ do
CXX_OPT
=
$opt_level
elif
[
"x
$cut_arg
"
=
"x--enable-refinement"
]
;
then
REFINEFLAGS
=
" -DUSE_REFINEMENT"
elif
[
"x
$cut_arg
"
=
"x--disable-refinement"
]
;
then
REFINEFLAGS
=
""
elif
[
"x
$cut_arg
"
=
"x--enable-shared"
]
;
then
LIBMODE
=
"shared"
elif
[
"x
$cut_arg
"
=
"x--disable-shared"
]
;
then
LIBMODE
=
"static"
elif
[
"x
$cut_arg
"
=
"x--with-cublas"
]
;
then
CUBLAS
=
"yes"
elif
[
"x
$cut_arg
"
=
"x--without-cublas"
]
;
then
...
...
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