Skip to content
Snippets Groups Projects
Commit 6b32a864 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Add default options to argument parser

parent a0a06219
No related branches found
No related tags found
No related merge requests found
......@@ -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 "--enable-openmp Enable OpenMP multi-threading (DEFAULT). "
echo "--disable-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--enable-openmp" ]; then
OMPMODE="yes"
elif [ "x$cut_arg" = "x--disable-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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment