[cig-commits] [commit] devel, master: build: Automatically disable vectorization with debug. (7015fbf)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 6 08:30:24 PST 2014


Repository : https://github.com/geodynamics/specfem3d_globe

On branches: devel,master
Link       : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f

>---------------------------------------------------------------

commit 7015fbf0525f8a3f790eaa7c8624e5a3844cd33f
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date:   Sun Sep 7 22:16:06 2014 -0400

    build: Automatically disable vectorization with debug.


>---------------------------------------------------------------

7015fbf0525f8a3f790eaa7c8624e5a3844cd33f
 configure    | 69 +++++++++++++++++++++++++++++++++++-------------------------
 configure.ac | 33 +++++++++++++++++++----------
 2 files changed, 62 insertions(+), 40 deletions(-)

diff --git a/configure b/configure
index dae75a7..71415f0 100755
--- a/configure
+++ b/configure
@@ -682,8 +682,6 @@ FCFLAGS
 FC
 COND_CEM_FALSE
 COND_CEM_TRUE
-COND_VECTORIZATION_FALSE
-COND_VECTORIZATION_TRUE
 COND_ADIOS_FALSE
 COND_ADIOS_TRUE
 COND_VTK_FALSE
@@ -694,6 +692,8 @@ COND_CUDA5_FALSE
 COND_CUDA5_TRUE
 COND_CUDA_FALSE
 COND_CUDA_TRUE
+COND_VECTORIZATION_FALSE
+COND_VECTORIZATION_TRUE
 COND_DEBUG_FALSE
 COND_DEBUG_TRUE
 CUSTOM_MPI_TYPE
@@ -749,11 +749,11 @@ ac_user_opts='
 enable_option_checking
 enable_double_precision
 enable_debug
+enable_vectorization
 with_cuda
 with_opencl
 enable_vtk
 with_adios
-enable_vectorization
 with_cem
 with_vtk
 with_vtk_suffix
@@ -1405,9 +1405,9 @@ Optional Features:
   --enable-double-precision
                           solver in double precision [default=no]
   --enable-debug          build with debugging options enabled [default=no]
-  --enable-vtk            build VTK enabled version [default=no]
   --enable-vectorization  build FORCE_VECTORIZATION enabled version
-                          [default=yes]
+                          [default=auto]
+  --enable-vtk            build VTK enabled version [default=no]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -2763,6 +2763,37 @@ export COND_DEBUG_FALSE
 export COND_DEBUG_TRUE
 
 ###
+### FORCE_VECTORIZATION
+###
+
+# Check whether --enable-vectorization was given.
+if test "${enable_vectorization+set}" = set; then :
+  enableval=$enable_vectorization; want_vec="$enableval"
+else
+  want_vec=auto
+fi
+
+if test x"$want_vec" == xauto; then
+    if test x"$want_debug" != xno; then
+        want_vec=no
+    else
+        want_vec=yes
+    fi
+else
+    if test x"$want_vec" != xno && test x"$want_debug" != xno; then
+        as_fn_error $? "--enable-debug and --enable-vectorization cannot be specified simultaneously." "$LINENO" 5
+    fi
+fi
+ if test x"$want_vec" != xno; then
+  COND_VECTORIZATION_TRUE=
+  COND_VECTORIZATION_FALSE='#'
+else
+  COND_VECTORIZATION_TRUE='#'
+  COND_VECTORIZATION_FALSE=
+fi
+
+
+###
 ### GPU
 ###
 
@@ -2850,26 +2881,6 @@ fi
 
 
 ###
-### FORCE_VECTORIZATION
-###
-
-# Check whether --enable-vectorization was given.
-if test "${enable_vectorization+set}" = set; then :
-  enableval=$enable_vectorization; want_vec="$enableval"
-else
-  want_vec=yes
-fi
-
- if test x"$want_vec" != xno; then
-  COND_VECTORIZATION_TRUE=
-  COND_VECTORIZATION_FALSE='#'
-else
-  COND_VECTORIZATION_TRUE='#'
-  COND_VECTORIZATION_FALSE=
-fi
-
-
-###
 ### CEM
 ###
 
@@ -7685,6 +7696,10 @@ if test -z "${COND_DEBUG_TRUE}" && test -z "${COND_DEBUG_FALSE}"; then
   as_fn_error $? "conditional \"COND_DEBUG\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${COND_VECTORIZATION_TRUE}" && test -z "${COND_VECTORIZATION_FALSE}"; then
+  as_fn_error $? "conditional \"COND_VECTORIZATION\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${COND_CUDA_TRUE}" && test -z "${COND_CUDA_FALSE}"; then
   as_fn_error $? "conditional \"COND_CUDA\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -7705,10 +7720,6 @@ if test -z "${COND_ADIOS_TRUE}" && test -z "${COND_ADIOS_FALSE}"; then
   as_fn_error $? "conditional \"COND_ADIOS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${COND_VECTORIZATION_TRUE}" && test -z "${COND_VECTORIZATION_FALSE}"; then
-  as_fn_error $? "conditional \"COND_VECTORIZATION\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${COND_CEM_TRUE}" && test -z "${COND_CEM_FALSE}"; then
   as_fn_error $? "conditional \"COND_CEM\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/configure.ac b/configure.ac
index 8246575..8b3a182 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,6 +57,28 @@ export COND_DEBUG_FALSE
 export COND_DEBUG_TRUE
 
 ###
+### FORCE_VECTORIZATION
+###
+
+AC_ARG_ENABLE([vectorization],
+    [AC_HELP_STRING([--enable-vectorization],
+        [build FORCE_VECTORIZATION enabled version @<:@default=auto@:>@])],
+    [want_vec="$enableval"],
+    [want_vec=auto])
+if test x"$want_vec" == xauto; then
+    if test x"$want_debug" != xno; then
+        want_vec=no
+    else
+        want_vec=yes
+    fi
+else
+    if test x"$want_vec" != xno && test x"$want_debug" != xno; then
+        AC_MSG_ERROR([--enable-debug and --enable-vectorization cannot be specified simultaneously.])
+    fi
+fi
+AM_CONDITIONAL([COND_VECTORIZATION], [test x"$want_vec" != xno])
+
+###
 ### GPU
 ###
 
@@ -97,17 +119,6 @@ AC_ARG_WITH([adios],
 AM_CONDITIONAL([COND_ADIOS], [test x"$want_adios" != xno])
 
 ###
-### FORCE_VECTORIZATION
-###
-
-AC_ARG_ENABLE([vectorization],
-    [AC_HELP_STRING([--enable-vectorization],
-        [build FORCE_VECTORIZATION enabled version @<:@default=yes@:>@])],
-    [want_vec="$enableval"],
-    [want_vec=yes])
-AM_CONDITIONAL([COND_VECTORIZATION], [test x"$want_vec" != xno])
-
-###
 ### CEM
 ###
 



More information about the CIG-COMMITS mailing list