[cig-commits] [commit] devel: updates configuration files and m4/ version for CUDA compilation (fba8797)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Thu Sep 11 10:23:54 PDT 2014
Repository : https://github.com/geodynamics/specfem3d
On branch : devel
Link : https://github.com/geodynamics/specfem3d/compare/3704c888212d30d103ff64ed797e3904be39dd35...e84e7ba6f8959cb80449833335af69c684b5a5ee
>---------------------------------------------------------------
commit fba8797a37d345092b37cd1fc31e286cf04c7d4c
Author: daniel peter <peterda at ethz.ch>
Date: Wed Sep 10 20:23:35 2014 +0200
updates configuration files and m4/ version for CUDA compilation
>---------------------------------------------------------------
fba8797a37d345092b37cd1fc31e286cf04c7d4c
EXAMPLES/README | 0
configure | 106 +++++---------------------------------------------------
configure.ac | 41 ++--------------------
m4 | 2 +-
4 files changed, 11 insertions(+), 138 deletions(-)
diff --git a/EXAMPLES/README b/EXAMPLES/README
old mode 100755
new mode 100644
diff --git a/configure b/configure
index 8addc43..42298d5 100755
--- a/configure
+++ b/configure
@@ -2071,52 +2071,6 @@ fi
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_cxx_check_header_mongrel
-
-# ac_fn_cxx_try_link LINENO
-# -------------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_cxx_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- test -x conftest$ac_exeext
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_link
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -6648,9 +6602,6 @@ if test "$want_mpi" = yes; then
$as_echo "## --- ##
## MPI ##
## --- ##"
-# CIT_FC_MPI_MODULE([mpif.h], [$MPIFC], [$FLAGS_CHECK], [:], [
-# AC_MSG_FAILURE([cannot compile a trivial MPI program using $MPIFC])
-# ])
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7128,7 +7079,7 @@ if test "$want_adios" = yes; then
## ADIOS ##
## ----- ##"
if test "$want_mpi" != yes; then
- as_fn_error $? "Cannot compile with ADIOS but without MPI." "$LINENO" 5
+ as_fn_error $? "Cannot compile with ADIOS without MPI." "$LINENO" 5
fi
@@ -7313,11 +7264,11 @@ fi
as_fn_error $? "cannot find 'nvcc' program." "$LINENO" 5
fi
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
CPPFLAGS_save="$CPPFLAGS"
@@ -7328,7 +7279,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
CUDA_CPPFLAGS="-I$CUDA_INC"
CPPFLAGS="$CUDA_CPPFLAGS $CPPFLAGS"
fi
- ac_fn_cxx_check_header_mongrel "$LINENO" "cuda_runtime.h" "ac_cv_header_cuda_runtime_h" "$ac_includes_default"
+ ac_fn_c_check_header_mongrel "$LINENO" "cuda_runtime.h" "ac_cv_header_cuda_runtime_h" "$ac_includes_default"
if test "x$ac_cv_header_cuda_runtime_h" = xyes; then :
else
@@ -7367,7 +7318,7 @@ void* ptr = 0;
return 0;
}
_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
@@ -7392,47 +7343,6 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu
-
-
- ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
- CPPFLAGS_save="$CPPFLAGS"
-
- if test "x$MPI_INC" = "x"; then
- MPI_INC=`$MPIFC -showme:incdirs`
- fi
- if test "x$MPI_INC" != "x"; then
- for i in $MPI_INC
- do
- MPI_INCLUDES="$MPI_INCLUDES -I$i"
- done
- CPPFLAGS="$MPI_INCLUDES $CPPFLAGS"
- fi
- ac_fn_cxx_check_header_mongrel "$LINENO" "mpi.h" "ac_cv_header_mpi_h" "$ac_includes_default"
-if test "x$ac_cv_header_mpi_h" = xyes; then :
-
-else
-
- as_fn_error $? "MPI header not found; try setting MPI_INC." "$LINENO" 5
-
-fi
-
-
-
- CPPFLAGS="$CPPFLAGS_save"
- ac_ext=${ac_fc_srcext-f}
-ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
-ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_fc_compiler_gnu
-
-
-
-
fi
diff --git a/configure.ac b/configure.ac
index ec274f3..7e9d279 100644
--- a/configure.ac
+++ b/configure.ac
@@ -287,9 +287,6 @@ AC_SUBST([FC_MODDIR])
if test "$want_mpi" = yes; then
AS_BOX([MPI])
-# CIT_FC_MPI_MODULE([mpif.h], [$MPIFC], [$FLAGS_CHECK], [:], [
-# AC_MSG_FAILURE([cannot compile a trivial MPI program using $MPIFC])
-# ])
CIT_MPI_INCDIR([$MPIFC])
fi
@@ -301,7 +298,7 @@ fi
if test "$want_adios" = yes; then
AS_BOX([ADIOS])
if test "$want_mpi" != yes; then
- AC_MSG_ERROR([Cannot compile with ADIOS but without MPI.])
+ AC_MSG_ERROR([Cannot compile with ADIOS without MPI.])
fi
CIT_ADIOS_CONFIG
fi
@@ -314,41 +311,7 @@ fi
if test "$want_cuda" != no; then
AS_BOX([CUDA])
AC_ARG_VAR(CUDA_FLAGS, [Cuda compiler flags])
- if test "$want_mpi" = yes; then
- CIT_CUDA_CONFIG
- CIT_MPI_INCDIR([$MPIFC])
- else
- # note: CUDA could be run without mpi, however CIT_CUDA_CONFIG is not working without it...
- # checks for compiler
- AC_PATH_PROG(NVCC, nvcc)
- if test -z "$NVCC" ; then
- AC_MSG_ERROR([cannot find 'nvcc' program.])
- fi
- # checks for CUDA headers
- if test "x$CUDA_INC" != "x"; then
- CUDA_CPPFLAGS="-I$CUDA_INC"
- CPPFLAGS="$CUDA_CPPFLAGS $CPPFLAGS"
- fi
- AC_CHECK_HEADER([cuda_runtime.h], [], [
- AC_MSG_ERROR([CUDA runtime header not found; try setting CUDA_INC.])
- ])
- # checks for CUDA libraries
- if test "x$CUDA_LIB" != "x"; then
- CUDA_LDFLAGS="-L$CUDA_LIB"
- LDFLAGS="$CUDA_LDFLAGS $LDFLAGS"
- fi
- CUDA_LIBS="-lcudart"
- LIBS="$CUDA_LIBS $LIBS"
- AC_MSG_CHECKING([for cudaMalloc in -lcudart])
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[#include <cuda_runtime.h>]],
- [[void* ptr = 0;]]
- [[cudaMalloc(&ptr, 1);]])],
- [AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)
- AC_MSG_ERROR([CUDA library not found; try setting CUDA_LIB.])
- ])
- fi
+ CIT_CUDA_CONFIG
fi
diff --git a/m4 b/m4
index 09ca47b..c851339 160000
--- a/m4
+++ b/m4
@@ -1 +1 @@
-Subproject commit 09ca47be4e87a6133563b7e8e32974a6da7c5d58
+Subproject commit c851339a3cece6a757b1f1daaab45ac0a348c47d
More information about the CIG-COMMITS
mailing list