[Commits] [svn:einsteintoolkit] incoming/ (Rev. 49)

yosef at astro.rit.edu yosef at astro.rit.edu
Thu Jun 30 16:31:41 CDT 2011


User: zlochower
Date: 2011/06/30 04:31 PM

Added:
 /PITTNullCode/FFTW3/
  FFTW3.sh, README, configuration.ccl, interface.ccl, param.ccl, schedule.ccl
 /PITTNullCode/FFTW3/dist/
  fftw-3.2.2.tar.gz
 /PITTNullCode/FFTW3/src/
  make.code.defn

Log:
 A thorn that provides the FFTW3 library.

Directory Changes:

Directory: /svn:mime-type/
==========================

   + application/octet-stream

File Changes:

Directory: /PITTNullCode/FFTW3/
===============================

File [added]: FFTW3.sh
Delta lines: +155 -0
===================================================================
--- PITTNullCode/FFTW3/FFTW3.sh	                        (rev 0)
+++ PITTNullCode/FFTW3/FFTW3.sh	2011-06-30 21:31:41 UTC (rev 49)
@@ -0,0 +1,155 @@
+#! /bin/bash
+
+################################################################################
+# Prepare
+################################################################################
+
+# Set up shell
+set -x                          # Output commands
+set -e                          # Abort on errors
+
+
+
+################################################################################
+# Search
+################################################################################
+
+if [ -z "${FFTW3_DIR}" ]; then
+    echo "BEGIN MESSAGE"
+    echo "FFTW3 selected, but FFTW3_DIR not set.  Checking some places..."
+    echo "END MESSAGE"
+    
+    FILES="include/fftw3.h"
+    DIRS="/usr /usr/local /usr/local/fftw3 /usr/local/packages/fftw3 /usr/local/apps/fftw3 ${HOME} c:/packages/fftw3"
+    for dir in $DIRS; do
+        FFTW3_DIR="$dir"
+        for file in $FILES; do
+            if [ ! -r "$dir/$file" ]; then
+                unset FFTW3_DIR
+                break
+            fi
+        done
+        if [ -n "$FFTW3_DIR" ]; then
+            break
+        fi
+    done
+    
+    if [ -z "$FFTW3_DIR" ]; then
+        echo "BEGIN MESSAGE"
+        echo "FFTW3 not found"
+        echo "END MESSAGE"
+    else
+        echo "BEGIN MESSAGE"
+        echo "Found FFTW3 in ${FFTW3_DIR}"
+        echo "END MESSAGE"
+    fi
+fi
+
+
+
+################################################################################
+# Build
+################################################################################
+
+if [ -z "${FFTW3_DIR}" -o "${FFTW3_DIR}" = 'BUILD' ]; then
+    echo "BEGIN MESSAGE"
+    echo "Building FFTW3..."
+    echo "END MESSAGE"
+    
+    # Set locations
+    THORN=FFTW3
+    NAME=fftw-3.2.2
+    SRCDIR=$(dirname $0)
+    BUILD_DIR=${SCRATCH_BUILD}/build/${THORN}
+    INSTALL_DIR=${SCRATCH_BUILD}/external/${THORN}
+    DONE_FILE=${SCRATCH_BUILD}/done/${THORN}
+    FFTW3_DIR=${INSTALL_DIR}
+    
+(
+    exec >&2                    # Redirect stdout to stderr
+    set -x                      # Output commands
+    set -e                      # Abort on errors
+    cd ${SCRATCH_BUILD}
+    if [ -e ${DONE_FILE} -a ${DONE_FILE} -nt ${SRCDIR}/dist/${NAME}.tar.gz \
+                         -a ${DONE_FILE} -nt ${SRCDIR}/FFTW3.sh ]
+    then
+        echo "FFTW3: The enclosed FFTW3 library has already been built; doing nothing"
+    else
+        echo "FFTW3: Building enclosed FFTW3 library"
+        
+        # Should we use gmake or make?
+        MAKE=$(gmake --help > /dev/null 2>&1 && echo gmake || echo make)
+        # Should we use gtar or tar?
+        TAR=$(gtar --help > /dev/null 2> /dev/null && echo gtar || echo tar)
+        
+        # Set up environment
+        unset LIBS
+        if echo '' ${ARFLAGS} | grep 64 > /dev/null 2>&1; then
+            export OBJECT_MODE=64
+        fi
+        
+        echo "FFTW3: Preparing directory structure..."
+        mkdir build external done 2> /dev/null || true
+        rm -rf ${BUILD_DIR} ${INSTALL_DIR}
+        mkdir ${BUILD_DIR} ${INSTALL_DIR}
+        
+        echo "FFTW3: Unpacking archive..."
+        pushd ${BUILD_DIR}
+        ${TAR} xzf ${SRCDIR}/dist/${NAME}.tar.gz
+        
+        echo "FFTW3: Configuring..."
+        cd ${NAME}
+        ./configure --prefix=${FFTW3_DIR}
+        
+        echo "FFTW3: Building..."
+        ${MAKE}
+        
+        echo "FFTW3: Installing..."
+        ${MAKE} install
+        popd
+        
+        echo "FFTW3: Cleaning up..."
+        rm -rf ${BUILD_DIR}
+        
+        date > ${DONE_FILE}
+        echo "FFTW3: Done."
+    fi
+)
+
+    if (( $? )); then
+        echo 'BEGIN ERROR'
+        echo 'Error while building FFTW3. Aborting.'
+        echo 'END ERROR'
+        exit 1
+    fi
+
+fi
+
+
+
+################################################################################
+# Configure Cactus
+################################################################################
+
+# Set options
+if [ "${FFTW3_DIR}" = '/usr' -o "${FFTW3_DIR}" = '/usr/local' ]; then
+    FFTW3_INC_DIRS=''
+    FFTW3_LIB_DIRS=''
+else
+    FFTW3_INC_DIRS="${FFTW3_DIR}/include"
+    FFTW3_LIB_DIRS="${FFTW3_DIR}/lib"
+fi
+FFTW3_LIBS='fftw3'
+
+# Pass options to Cactus
+echo "BEGIN MAKE_DEFINITION"
+echo "HAVE_FFTW3     = 1"
+echo "FFTW3_DIR      = ${FFTW3_DIR}"
+echo "FFTW3_INC_DIRS = ${FFTW3_INC_DIRS}"
+echo "FFTW3_LIB_DIRS = ${FFTW3_LIB_DIRS}"
+echo "FFTW3_LIBS     = ${FFTW3_LIBS}"
+echo "END MAKE_DEFINITION"
+
+echo 'INCLUDE_DIRECTORY $(FFTW3_INC_DIRS)'
+echo 'LIBRARY_DIRECTORY $(FFTW3_LIB_DIRS)'
+echo 'LIBRARY           $(FFTW3_LIBS)'

File [added]: README
Delta lines: +30 -0
===================================================================
--- PITTNullCode/FFTW3/README	                        (rev 0)
+++ PITTNullCode/FFTW3/README	2011-06-30 21:31:41 UTC (rev 49)
@@ -0,0 +1,30 @@
+Cactus Code Thorn FFTW3
+Author(s)    : 
+Maintainer(s): 
+Licence      : GPL
+--------------------------------------------------------------------------
+
+1. Purpose
+
+Distribute the FFTW Library; see
+<http://www.fftw.org>
+
+
+
+From the web site: FFTW is a C subroutine library for computing the
+discrete Fourier transform (DFT) in one or more dimensions, of
+arbitrary input size, and of both real and complex data (as well as of
+even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).
+We believe that FFTW, which is free software, should become the FFT
+library of choice for most applications.
+
+Our benchmarks, performed on on a variety of platforms, show that
+FFTW's performance is typically superior to that of other publicly
+available FFT software, and is even competitive with vendor-tuned
+codes. In contrast to vendor-tuned codes, however, FFTW's performance
+is portable: the same program will perform well on most architectures
+without modification. Hence the name, "FFTW," which stands for the
+somewhat whimsical title of "Fastest Fourier Transform in the West."
+
+The FFTW package was developed at MIT by Matteo Frigo and Steven G.
+Johnson

File [added]: configuration.ccl
Delta lines: +8 -0
===================================================================
--- PITTNullCode/FFTW3/configuration.ccl	                        (rev 0)
+++ PITTNullCode/FFTW3/configuration.ccl	2011-06-30 21:31:41 UTC (rev 49)
@@ -0,0 +1,8 @@
+# Configuration definitions for thorn FFTW3
+
+PROVIDES FFTW3
+{
+  SCRIPT FFTW3.sh
+  LANG bash
+  OPTIONS FFTW3_DIR FFTW3_LIBS
+}

File [added]: interface.ccl
Delta lines: +3 -0
===================================================================
--- PITTNullCode/FFTW3/interface.ccl	                        (rev 0)
+++ PITTNullCode/FFTW3/interface.ccl	2011-06-30 21:31:41 UTC (rev 49)
@@ -0,0 +1,3 @@
+# Interface definition for thorn FFTW3
+
+IMPLEMENTS: FFTW3

File [added]: param.ccl
Delta lines: +1 -0
===================================================================
--- PITTNullCode/FFTW3/param.ccl	                        (rev 0)
+++ PITTNullCode/FFTW3/param.ccl	2011-06-30 21:31:41 UTC (rev 49)
@@ -0,0 +1 @@
+# Parameter definitions for thorn FFTW3

File [added]: schedule.ccl
Delta lines: +1 -0
===================================================================
--- PITTNullCode/FFTW3/schedule.ccl	                        (rev 0)
+++ PITTNullCode/FFTW3/schedule.ccl	2011-06-30 21:31:41 UTC (rev 49)
@@ -0,0 +1 @@
+# Schedule definitions for thorn FFTW3

Directory: /PITTNullCode/FFTW3/dist/
====================================

File [added]: fftw-3.2.2.tar.gz
Delta lines: +0 -0
===================================================================
(Binary files differ)



Property changes on: PITTNullCode/FFTW3/dist/fftw-3.2.2.tar.gz
___________________________________________________________________

Directory: /PITTNullCode/FFTW3/src/
===================================

File [added]: make.code.defn
Delta lines: +7 -0
===================================================================
--- PITTNullCode/FFTW3/src/make.code.defn	                        (rev 0)
+++ PITTNullCode/FFTW3/src/make.code.defn	2011-06-30 21:31:41 UTC (rev 49)
@@ -0,0 +1,7 @@
+# Main make.code.defn file for thorn FFTW3
+
+# Source files in this directory
+SRCS = 
+
+# Subdirectories containing source files
+SUBDIRS = 



More information about the Commits mailing list