aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@5c1b1641-b641-47ec-b3d9-0f93d4c445ee>2009-11-22 04:53:09 +0000
committerschnetter <schnetter@5c1b1641-b641-47ec-b3d9-0f93d4c445ee>2009-11-22 04:53:09 +0000
commit0973a99607f9934137b3efe152c7cd9817a45cae (patch)
tree8ebc95fcc991355443833c7705b5fcd79bac6fa0
parentf1cb5f673659a33b72560c44ec4095a71455d67a (diff)
Add LORENE
git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/LORENE/trunk@2 5c1b1641-b641-47ec-b3d9-0f93d4c445ee
-rw-r--r--LORENE.sh106
-rw-r--r--README15
-rw-r--r--configuration.ccl9
-rw-r--r--dist/LORENE.tar.gzbin0 -> 2277938 bytes
-rw-r--r--dist/README10
-rw-r--r--dist/darwin.patch30
-rw-r--r--interface.ccl3
-rw-r--r--param.ccl1
-rw-r--r--schedule.ccl1
-rw-r--r--src/make.code.defn7
10 files changed, 182 insertions, 0 deletions
diff --git a/LORENE.sh b/LORENE.sh
new file mode 100644
index 0000000..6afd6c3
--- /dev/null
+++ b/LORENE.sh
@@ -0,0 +1,106 @@
+#! /bin/bash
+
+################################################################################
+# Prepare
+################################################################################
+
+# Set up shell
+set -x # Output commands
+set -e # Abort on errors
+
+# Set locations
+NAME=LORENE
+SRCDIR=$(dirname $0)
+INSTALL_DIR=${SCRATCH_BUILD}
+LORENE_DIR=${INSTALL_DIR}/build-${NAME}/${NAME}
+
+# Clean up environment
+unset LIBS
+unset MAKEFLAGS
+
+
+
+################################################################################
+# Build
+################################################################################
+
+(
+ exec >&2 # Redirect stdout to stderr
+ set -x # Output commands
+ set -e # Abort on errors
+ cd ${INSTALL_DIR}
+ if [ -e done-${NAME} -a done-${NAME} -nt ${SRCDIR}/dist/${NAME}.tar.gz ]; then
+ echo "LORENE: The enclosed LORENE library has already been built; doing nothing"
+ else
+ echo "LORENE: Building enclosed LORENE library"
+
+ echo "LORENE: Unpacking archive..."
+ rm -rf build-${NAME}
+ mkdir build-${NAME}
+ pushd build-${NAME}
+ # Should we use gtar or tar?
+ TAR=$(gtar --help > /dev/null 2> /dev/null && echo gtar || echo tar)
+ ${TAR} xzf ${SRCDIR}/dist/${NAME}.tar.gz
+ patch -p0 < ${SRCDIR}/dist/darwin.patch
+ popd
+
+ echo "LORENE: Configuring..."
+ pushd build-${NAME}/${NAME}
+ cat > local_settings <<EOF
+CXX = ${CXX}
+CXXFLAGS ${CXXFLAGS}
+CXXFLAGS_G = ${CXXFLAGS}
+F77 = ${F77}
+F77FLAGS = ${F77FLAGS}
+F77FLAGS_G = ${F77FLAGS}
+INC = -I\$(HOME_LORENE)/C++/Include -I\$(HOME_LORENE)/C++/Include_extra
+RANLIB = ${RANLIB}
+MAKEDEPEND = ${CPP} \$(INC) -M >> \$(df).d \$<
+DEPDIR = .deps
+FFT_DIR = FFT991
+LIB_CXX = ${LIBS}
+LIB_LAPACK = ${LAPACK_LIBS} ${BLAS_LIBS}
+LIB_PGPLOT =
+LIB_GSL = ${GSL_LIBS}
+EOF
+
+ echo "LORENE: Building..."
+ export HOME_LORENE=${LORENE_DIR}
+ # Note that this builds two versions of the library, a
+ # "regular" version and a "debug" version. Both are identical
+ # (since we specified identical build options above), and we
+ # ignore the "debug" version.
+ make cpp fortran export
+ popd
+
+ echo 'done' > done-${NAME}
+ echo "LORENE: Done."
+ fi
+)
+
+# TODO: check $?
+
+
+
+################################################################################
+# Configure Cactus
+################################################################################
+
+# Set options
+LORENE_INC_DIRS="${LORENE_DIR}/Export/C++/Include ${LORENE_DIR}/C++/Include"
+LORENE_LIB_DIRS="${LORENE_DIR}/Lib"
+LORENE_LIBS='lorene_export lorene lorenef77'
+
+# Pass options to Cactus
+echo "BEGIN MAKE_DEFINITION"
+echo "HAVE_LORENE = 1"
+echo "LORENE_DIR = ${LORENE_DIR}"
+echo "LORENE_INC_DIRS = ${LORENE_INC_DIRS}"
+echo "LORENE_LIB_DIRS = ${LORENE_LIB_DIRS}"
+echo "LORENE_LIBS = ${LORENE_LIBS}"
+echo 'HOME_LORENE = $(LORENE_DIR)'
+echo "END MAKE_DEFINITION"
+
+echo 'INCLUDE_DIRECTORY $(LORENE_INC_DIRS)'
+echo 'LIBRARY_DIRECTORY $(LORENE_LIB_DIRS)'
+echo 'LIBRARY $(LORENE_LIBS)'
diff --git a/README b/README
new file mode 100644
index 0000000..23cfea3
--- /dev/null
+++ b/README
@@ -0,0 +1,15 @@
+Cactus Code Thorn LORENE
+Author(s) : Erik Schnetter
+Maintainer(s): Cactus team
+Licence : GPL
+--------------------------------------------------------------------------
+
+1. Purpose
+
+Distribute the LORENE library; see <http://www.lorene.obspm.fr/>.
+
+
+
+From the web site:
+
+LORENE is ###TODO###
diff --git a/configuration.ccl b/configuration.ccl
new file mode 100644
index 0000000..b62db6d
--- /dev/null
+++ b/configuration.ccl
@@ -0,0 +1,9 @@
+# Configuration definitions for thorn LORENE
+
+PROVIDES LORENE
+{
+ SCRIPT LORENE.sh
+ LANG bash
+}
+
+REQUIRES LAPACK BLAS GSL
diff --git a/dist/LORENE.tar.gz b/dist/LORENE.tar.gz
new file mode 100644
index 0000000..ab27be6
--- /dev/null
+++ b/dist/LORENE.tar.gz
Binary files differ
diff --git a/dist/README b/dist/README
new file mode 100644
index 0000000..bbb10bb
--- /dev/null
+++ b/dist/README
@@ -0,0 +1,10 @@
+This tarball LORENE.tar.gz is created in the following way:
+
+1. Check out LORENE from CVS into a directory LORENE.
+
+2. Do not begin to build LORENE in this directory, as this would
+ modify the source tree. (It would add additional files.)
+
+3. Create the tarball from this source tree.
+
+4. Test whether the patches apply cleanly.
diff --git a/dist/darwin.patch b/dist/darwin.patch
new file mode 100644
index 0000000..66573ff
--- /dev/null
+++ b/dist/darwin.patch
@@ -0,0 +1,30 @@
+diff -ru /Users/eschnett/src/LORENE/C++/Include/nbr_spx.h LORENE/C++/Include/nbr_spx.h
+--- /Users/eschnett/src/LORENE/C++/Include/nbr_spx.h 2007-06-16 17:19:23.000000000 -0500
++++ LORENE/C++/Include/nbr_spx.h 2009-11-21 17:46:49.000000000 -0600
+@@ -151,6 +151,10 @@
+ #include <math.h>
+ #define __infinity INFINITY
+ #else
++#ifdef __x86_64__
++#include <math.h>
++#define __infinity INFINITY
++#else
+ extern double __infinity ;
+ #endif
+ #endif
+@@ -158,5 +162,6 @@
+ #endif
+ #endif
+ #endif
++#endif
+
+ #endif
+diff -ru /Users/eschnett/src/LORENE/Makefile LORENE/Makefile
+--- /Users/eschnett/src/LORENE/Makefile 2004-03-26 08:00:21.000000000 -0600
++++ LORENE/Makefile 2009-11-21 17:43:37.000000000 -0600
+@@ -29,4 +29,4 @@
+ test:
+ cd Test; $(MAKE)
+
+-
++.PHONY: all install doc cpp fortran export uninstall test
diff --git a/interface.ccl b/interface.ccl
new file mode 100644
index 0000000..3dfaaf8
--- /dev/null
+++ b/interface.ccl
@@ -0,0 +1,3 @@
+# Interface definition for thorn LORENE
+
+IMPLEMENTS: LORENE
diff --git a/param.ccl b/param.ccl
new file mode 100644
index 0000000..5501a88
--- /dev/null
+++ b/param.ccl
@@ -0,0 +1 @@
+# Parameter definitions for thorn LORENE
diff --git a/schedule.ccl b/schedule.ccl
new file mode 100644
index 0000000..26d1be7
--- /dev/null
+++ b/schedule.ccl
@@ -0,0 +1 @@
+# Schedule definitions for thorn LORENE
diff --git a/src/make.code.defn b/src/make.code.defn
new file mode 100644
index 0000000..c108fdb
--- /dev/null
+++ b/src/make.code.defn
@@ -0,0 +1,7 @@
+# Main make.code.defn file for thorn LORENE
+
+# Source files in this directory
+SRCS =
+
+# Subdirectories containing source files
+SUBDIRS =