[Commits] [svn:einsteintoolkit] WeylScal4/trunk/m/ (Rev. 89)

schnetter at cct.lsu.edu schnetter at cct.lsu.edu
Mon Dec 12 14:12:15 CST 2011


User: eschnett
Date: 2011/12/12 02:12 PM

Modified:
 /trunk/m/
  Makefile, WeylScal4.m, runmath.sh

Log:
 Call Mathematica via Kranc/Bin/kranc

File Changes:

Directory: /trunk/m/
====================

File [modified]: Makefile
Delta lines: +2 -6
===================================================================
--- trunk/m/Makefile	2011-10-25 18:44:56 UTC (rev 88)
+++ trunk/m/Makefile	2011-12-12 20:12:15 UTC (rev 89)
@@ -9,12 +9,8 @@
 	rm -rf WeylScal4
 	./runmath.sh $^
 	grep --silent 'Thorn ./WeylScal4 created successfully' WeylScal4.out
-	for thorn in WeylScal4; do								  \
-		./copy-if-changed.sh $$thorn/configuration.ccl ../../$$thorn/configuration.ccl && \
-		./copy-if-changed.sh $$thorn/interface.ccl     ../../$$thorn/interface.ccl     && \
-		./copy-if-changed.sh $$thorn/param.ccl         ../../$$thorn/param.ccl         && \
-		./copy-if-changed.sh $$thorn/schedule.ccl      ../../$$thorn/schedule.ccl      && \
-		./copy-if-changed.sh $$thorn/src               ../../$$thorn/src;		  \
+	for file in $$(ls WeylScal4); do				\
+		./copy-if-changed.sh WeylScal4/$$file ../$$file;	\
 	done
 
 clean:

File [modified]: WeylScal4.m
Delta lines: +0 -8
===================================================================
--- trunk/m/WeylScal4.m	2011-10-25 18:44:56 UTC (rev 88)
+++ trunk/m/WeylScal4.m	2011-12-12 20:12:15 UTC (rev 89)
@@ -1,11 +1,3 @@
-$Path = Join[$Path, Map[ToString, ReadList[StringToStream[Environment["MATHPATH"]], Word, WordSeparators->{":"}]]];
-
-$RecursionLimit = 1000;
-
-Get["KrancThorn`"];
-
-(*SetDebugLevel[InfoFull];*)
-
 SetEnhancedTimes[False];
 SetSourceLanguage["C"];
 

File [modified]: runmath.sh
Delta lines: +3 -58
===================================================================
--- trunk/m/runmath.sh	2011-10-25 18:44:56 UTC (rev 88)
+++ trunk/m/runmath.sh	2011-12-12 20:12:15 UTC (rev 89)
@@ -2,11 +2,7 @@
 
 # Abort on errors
 set -e
-# null-expand non-matching globs
-set -u
 
-MATHEMATICA="math"
-
 script=$1
 
 if test -z "$script"; then
@@ -15,64 +11,13 @@
     exit 2
 fi
 
-KRANCPATH="${KRANCPATH:+$KRANCPATH}"
-if [ -z "$KRANCPATH" ] ; then
-    KRANCPATHS=(. ../../../../arrangements/../repos ../../../arrangements/../repos $HOME)
-    # look for Kranc in a number of likely locations
-    # choice 2 and 3 are $CCTK_HOME if the thorn resides in arrangements or
-    # git-repos
-    for i in ${KRANCPATHS[@]} ; do
-        if [ -d $i/kranc/Tools ] ; then
-            KRANCPATH=$i/kranc
-            break
-        elif [ -d $i/Kranc/Tools ] ; then
-            KRANCPATH=$i/Kranc
-            break
-        fi
-    done
-fi
-if [ -z "$KRANCPATH" ] ; then # try some more clever things...
-    KRANCBIN="$(which kranc || true)"
-    if [ -h "$KRANCBIN" ] ; then
-        KRANCBIN=$(readlink "$KRANCBIN")
-    fi
-    if [ -d "$(dirname "$KRANCBIN")/../Tools" ] ; then
-        KRANCPATH="$(dirname "$KRANCBIN")/.."
-    fi
-fi
-if [ -n "$KRANCPATH" ] ; then
-    LOCALKRANCPATH="$KRANCPATH/Tools/CodeGen:$KRANCPATH/Tools/MathematicaMisc"
-    
-    if [ -z "${MATHPATH:+}" ]
-    then
-        MATHPATH=$LOCALKRANCPATH
-    else
-        MATHPATH=$LOCALKRANCPATH:$MATHPATH
-    fi
-    
-    export MATHPATH
-else
-    echo -e "Could not find Kranc. Expect trouble unless you have made sure Mathematica\nwill find Kranc. You might also consider setting \$KRANCPATH."
-fi
-
-echo "MATHPATH = $MATHPATH"
-
 error=$(basename $script .m).err
 output=$(basename $script .m).out
 
 rm -f $output
 
-# Run Mathematica to regenerate the code
-< $script "$MATHEMATICA" | tee $error
+# Run Kranc to regenerate the code
+../../../../repos/Kranc/Bin/kranc $script | tee $error
+[ $PIPESTATUS -eq 0 ] || exit $PIPESTATUS
 
-if grep 'KrancError' $error; then
-    echo
-    echo "There was an error when running Kranc on $script."
-    echo "The file $error contains details."
-    echo
-    echo "*** The Cactus thorns have NOT been updated. ***"
-    echo
-    exit 1
-fi
-
 mv $error $output



More information about the Commits mailing list