[cig-commits] r18027 - in seismo/2D/SPECFEM2D/trunk: . src/meshfem2D

danielpeter at geodynamics.org danielpeter at geodynamics.org
Thu Mar 3 16:29:45 PST 2011


Author: danielpeter
Date: 2011-03-03 16:29:45 -0800 (Thu, 03 Mar 2011)
New Revision: 18027

Added:
   seismo/2D/SPECFEM2D/trunk/src/meshfem2D/scotch_5.1.11/
Removed:
   seismo/2D/SPECFEM2D/trunk/scotch_5.1.11/
Modified:
   seismo/2D/SPECFEM2D/trunk/configure
   seismo/2D/SPECFEM2D/trunk/configure.ac
   seismo/2D/SPECFEM2D/trunk/src/meshfem2D/Makefile.in
Log:
moves scotch_5.1.11 to src/meshfem2D/; updates configure and Makefile

Modified: seismo/2D/SPECFEM2D/trunk/configure
===================================================================
--- seismo/2D/SPECFEM2D/trunk/configure	2011-03-03 22:25:32 UTC (rev 18026)
+++ seismo/2D/SPECFEM2D/trunk/configure	2011-03-04 00:29:45 UTC (rev 18027)
@@ -4759,13 +4759,17 @@
 
 if test "${USE_BUNDLED_SCOTCH}" != "1"; then
 
-   if test -z "${ac_scotch_lib_dir}"; then
-      if test -n "${ac_scotch_dir}"; then
-         ac_scotch_lib_dir="${ac_scotch_dir}/lib";
-      else
-        ac_scotch_lib_dir="/usr/lib";
-      fi
-   fi
+#daniel: scotch will be needed in directory src/meshfem2D/
+  builddir=`pwd`
+  cd src/meshfem2D/
+  
+  if test -z "${ac_scotch_lib_dir}"; then
+    if test -n "${ac_scotch_dir}"; then
+      ac_scotch_lib_dir="${ac_scotch_dir}/lib";
+    else
+      ac_scotch_lib_dir="/usr/lib";
+    fi
+  fi
 
   if test -z "${ac_scotch_include_dir}"; then
     if test -n "${ac_scotch_dir}"; then
@@ -4782,43 +4786,46 @@
   fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for scotchfarchinit  in -lscotch" >&5
 $as_echo_n "checking for scotchfarchinit  in -lscotch... " >&6; }
-if test "${ac_cv_lib_scotch_scotchfarchinit_+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lscotch -lscotcherr $LIBS"
-cat > conftest.$ac_ext <<_ACEOF
+  if test "${ac_cv_lib_scotch_scotchfarchinit_+set}" = set; then :
+    $as_echo_n "(cached) " >&6
+  else
+    ac_check_lib_save_LIBS=$LIBS
+    LIBS="-lscotch -lscotcherr $LIBS"
+    cat > conftest.$ac_ext <<_ACEOF
       program main
       call scotchfarchinit
       end
 _ACEOF
-if ac_fn_fc_try_link "$LINENO"; then :
-  ac_cv_lib_scotch_scotchfarchinit_=yes
-else
-  ac_cv_lib_scotch_scotchfarchinit_=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
+    if ac_fn_fc_try_link "$LINENO"; then :
+      ac_cv_lib_scotch_scotchfarchinit_=yes
+    else
+      ac_cv_lib_scotch_scotchfarchinit_=no
+    fi
+    rm -f core conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+    LIBS=$ac_check_lib_save_LIBS
+  fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_scotch_scotchfarchinit_" >&5
 $as_echo "$ac_cv_lib_scotch_scotchfarchinit_" >&6; }
-if test "x$ac_cv_lib_scotch_scotchfarchinit_" = x""yes; then :
-  scotch_lib="yes";
-else
-  scotch_lib="no";LDFLAGS=${ac_save_ldflags}
-fi
+  if test "x$ac_cv_lib_scotch_scotchfarchinit_" = x""yes; then :
+    scotch_lib="yes";
+  else
+    scotch_lib="no";LDFLAGS=${ac_save_ldflags}
+  fi
 
 
   scotch_include=""
   ac_save_cppflags=${CPPFLAGS}
-  if test -n "${ac_scotch_include_dir}"; then
-    CPPFLAGS="${CPPFLAGS} -I${ac_scotch_include_dir}";
-  fi
+  # scotch only needed for fortran code
+  #if test -n "${ac_scotch_include_dir}"; then
+  #  CPPFLAGS="${CPPFLAGS} -I${ac_scotch_include_dir}";
+  #fi
 
-
   scotch_usable="${scotch_lib}"
 
+  # back to root directory
+  cd $builddir
+
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Scotch is usable" >&5
@@ -5051,7 +5058,7 @@
  # uses bundled scotch: current version 5.1.11
  USE_BUNDLED_SCOTCH=1
 
- SCOTCH_DIR="scotch_5.1.11"
+ SCOTCH_DIR="scotch_5.1.11" 
  SCOTCH_LIBDIR="${SCOTCH_DIR}/lib"
  SCOTCH_INCLUDEDIR="${SCOTCH_DIR}/include"
 
@@ -5059,7 +5066,8 @@
  # will only be compiled once (no recompilation) when calling make
  #
  builddir=`pwd`
-
+ cd src/meshfem2D/
+ 
  if test ! -f "${SCOTCH_DIR}/src/scotch/Makefile.org"; then
 
   # no Makefile backup files yet
@@ -5541,7 +5549,7 @@
 # Checks for library functions.
 
 
-ac_config_files="$ac_config_files Makefile src/specfem2D/Makefile src/meshfem2D/Makefile DATA/Par_file DATA/SOURCE setup/constants.h setup/precision_mpi.h scotch_5.1.11/src/Makefile.inc"
+ac_config_files="$ac_config_files Makefile src/specfem2D/Makefile src/meshfem2D/Makefile DATA/Par_file DATA/SOURCE setup/constants.h setup/precision_mpi.h src/meshfem2D/scotch_5.1.11/src/Makefile.inc"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -6248,7 +6256,7 @@
     "DATA/SOURCE") CONFIG_FILES="$CONFIG_FILES DATA/SOURCE" ;;
     "setup/constants.h") CONFIG_FILES="$CONFIG_FILES setup/constants.h" ;;
     "setup/precision_mpi.h") CONFIG_FILES="$CONFIG_FILES setup/precision_mpi.h" ;;
-    "scotch_5.1.11/src/Makefile.inc") CONFIG_FILES="$CONFIG_FILES scotch_5.1.11/src/Makefile.inc" ;;
+    "src/meshfem2D/scotch_5.1.11/src/Makefile.inc") CONFIG_FILES="$CONFIG_FILES src/meshfem2D/scotch_5.1.11/src/Makefile.inc" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
   esac

Modified: seismo/2D/SPECFEM2D/trunk/configure.ac
===================================================================
--- seismo/2D/SPECFEM2D/trunk/configure.ac	2011-03-03 22:25:32 UTC (rev 18026)
+++ seismo/2D/SPECFEM2D/trunk/configure.ac	2011-03-04 00:29:45 UTC (rev 18027)
@@ -112,13 +112,17 @@
 
 if test "${USE_BUNDLED_SCOTCH}" != "1"; then
 
-   if test -z "${ac_scotch_lib_dir}"; then
-      if test -n "${ac_scotch_dir}"; then
-         ac_scotch_lib_dir="${ac_scotch_dir}/lib";
-      else
+#daniel: scotch will be needed in directory src/meshfem2D/
+  builddir=`pwd`
+  cd src/meshfem2D/
+
+  if test -z "${ac_scotch_lib_dir}"; then
+    if test -n "${ac_scotch_dir}"; then
+        ac_scotch_lib_dir="${ac_scotch_dir}/lib";
+    else
         ac_scotch_lib_dir="/usr/lib";
-      fi
-   fi
+    fi
+  fi
 
   if test -z "${ac_scotch_include_dir}"; then
     if test -n "${ac_scotch_dir}"; then
@@ -137,9 +141,10 @@
 
   scotch_include=""
   ac_save_cppflags=${CPPFLAGS}
-  if test -n "${ac_scotch_include_dir}"; then
-    CPPFLAGS="${CPPFLAGS} -I${ac_scotch_include_dir}";
-  fi
+  # scotch only needed for fortran code  
+  #if test -n "${ac_scotch_include_dir}"; then
+  #  CPPFLAGS="${CPPFLAGS} -I${ac_scotch_include_dir}";
+  #fi
 
 dnl This does not work because we are in Fortran mode, which does not
 dnl handle headers.
@@ -148,6 +153,9 @@
 
   scotch_usable="${scotch_lib}"
 
+  # back to root directory
+  cd $builddir
+
 fi
 
 AC_MSG_CHECKING([whether Scotch is usable])
@@ -185,6 +193,7 @@
  # will only be compiled once (no recompilation) when calling make
  #
  builddir=`pwd`
+ cd src/meshfem2D/
 
  if test ! -f "${SCOTCH_DIR}/src/scotch/Makefile.org"; then
 
@@ -426,7 +435,7 @@
 # Checks for library functions.
 
 
-AC_CONFIG_FILES([Makefile DATA/Par_file DATA/SOURCE src/meshfem2D/Makefile src/specfem2D/Makefile setup/constants.h setup/precision_mpi.h scotch_5.1.11/src/Makefile.inc])
+AC_CONFIG_FILES([Makefile DATA/Par_file DATA/SOURCE src/meshfem2D/Makefile src/specfem2D/Makefile setup/constants.h setup/precision_mpi.h src/meshfem2D/scotch_5.1.11/src/Makefile.inc])
 AC_OUTPUT
 
 

Modified: seismo/2D/SPECFEM2D/trunk/src/meshfem2D/Makefile.in
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/meshfem2D/Makefile.in	2011-03-03 22:25:32 UTC (rev 18026)
+++ seismo/2D/SPECFEM2D/trunk/src/meshfem2D/Makefile.in	2011-03-04 00:29:45 UTC (rev 18027)
@@ -58,11 +58,11 @@
 CFLAGS = @CFLAGS@ $(CPPFLAGS) -I../../setup
 
 ## serial or parallel
- at COND_MPI_TRUE@F90 = $(MPIFC) $(FCFLAGS) -DUSE_MPI -DUSE_SCOTCH -I"../../@SCOTCH_INCLUDEDIR@" $(MPILIBS)
+ at COND_MPI_TRUE@F90 = $(MPIFC) $(FCFLAGS) -DUSE_MPI -DUSE_SCOTCH -I"@SCOTCH_INCLUDEDIR@" $(MPILIBS)
 @COND_MPI_FALSE at F90 = $(FC) $(FCFLAGS)
 
 ## scotch libraries
- at COND_MPI_TRUE@LIB = -L"../../@SCOTCH_LIBDIR@" -lscotch -lscotcherr
+ at COND_MPI_TRUE@LIB = -L"@SCOTCH_LIBDIR@" -lscotch -lscotcherr
 @COND_MPI_FALSE at LIB =
 
 # optional: uncomment this to use more than one processor core, in which case the SCOTCH graph partitioner is needed
@@ -124,7 +124,7 @@
 scotch:
 ifeq (@USE_BUNDLED_SCOTCH@,1)
 	(echo "Using bundled Scotch")
-	(cd "../../@SCOTCH_DIR@/src"; make)
+	(cd "@SCOTCH_DIR@/src"; make)
 else
 	(echo "Not using bundled Scotch")
 endif

Copied: seismo/2D/SPECFEM2D/trunk/src/meshfem2D/scotch_5.1.11 (from rev 18026, seismo/2D/SPECFEM2D/trunk/scotch_5.1.11)



More information about the CIG-COMMITS mailing list