Index: /issm/trunk-jpl/cron/nightlyrun.sh
===================================================================
--- /issm/trunk-jpl/cron/nightlyrun.sh	(revision 12195)
+++ /issm/trunk-jpl/cron/nightlyrun.sh	(revision 12196)
@@ -65,5 +65,4 @@
 #Export ISSM_* variables{{{1
 export ISSM_DIR
-export ISSM_TIER
 export ISSM_ARCH
 #}}}
@@ -90,5 +89,5 @@
 
 	#only update ISSM
-	cd $ISSM_TIER
+	cd $ISSM_DIR
 	svn update
 
@@ -109,9 +108,9 @@
 #Create cluster's settings{{{1
 #create simpler  cluster.rc file, with only the cluster we are interested in.
-cd $ISSM_TIER/test/NightlyRun/
+cd $ISSM_DIR/test/NightlyRun/
 if [ "$MACHINE" = "win7" ]; then
 	cat << END > $HOST_NAME"_settings.m"
 cluster.login='$USER';
-cluster.codepath='`cygpath -m $ISSM_TIER/bin`';
+cluster.codepath='`cygpath -m $ISSM_DIR/bin`';
 cluster.executionpath='`cygpath -m $EXECUTION_PATH`';
 END
@@ -119,8 +118,8 @@
 	cat << END > $HOST_NAME"_settings.m"
 cluster.login='$USER';
-cluster.codepath='$ISSM_TIER/bin';
+cluster.codepath='$ISSM_DIR/bin';
 cluster.executionpath='$EXECUTION_PATH';
 END
-   cat << END > $ISSM_TIER/externalpackages/matlab/install.sh
+   cat << END > $ISSM_DIR/externalpackages/matlab/install.sh
 #!/bin/bash
 rm -rf install
@@ -131,5 +130,5 @@
 #}}}
 #Source environment variables with new matlab path {{{1
-cd $ISSM_TIER/etc
+cd $ISSM_DIR/etc
 source environment.sh MATLAB_DIR=$MATLAB_PATH
 #}}}
@@ -138,5 +137,5 @@
 then
 	
-	cd $ISSM_TIER/externalpackages
+	cd $ISSM_DIR/externalpackages
 	#number of packages: 
 	numpackages=`echo $EXTERNALPACKAGES | wc -w`
@@ -156,5 +155,5 @@
 
 	#erase externapackages, and link with externalpackages_dir
-	cd $ISSM_TIER
+	cd $ISSM_DIR
 	rm -rf externalpackages
 	cp -Rf $EXTERNALPACKAGESDIR ./
@@ -164,5 +163,5 @@
 
 	#erase externapackages, and link with externalpackages_dir
-	cd $ISSM_TIER
+	cd $ISSM_DIR
 	rm -rf externalpackages
 	ln -s  $EXTERNALPACKAGESDIR  .
@@ -186,5 +185,5 @@
 then
 
-	cd $ISSM_TIER
+	cd $ISSM_DIR
 	make clean
 	make distclean
@@ -214,7 +213,7 @@
 #Prepare run
 #create softlink to startup {{{1
-cd $ISSM_TIER/test/NightlyRun/
+cd $ISSM_DIR/test/NightlyRun/
 rm startup.m #in case it alreade exists
-cp $ISSM_TIER/startup.m .
+cp $ISSM_DIR/startup.m .
 #}}}
 #Create nightlylog directory and info.log {{{1
@@ -222,7 +221,7 @@
 INSTALL_TIME=$(timer)
 ELAPSED_INSTALL=$(timer $START_TIME)
-rm -rf $ISSM_TIER/nightlylog
-mkdir  $ISSM_TIER/nightlylog
-cat << END > $ISSM_TIER/nightlylog/info.log
+rm -rf $ISSM_DIR/nightlylog
+mkdir  $ISSM_DIR/nightlylog
+cat << END > $ISSM_DIR/nightlylog/info.log
 today:     $(echo $TODAY)
 user:      $(echo $USER)
@@ -245,7 +244,7 @@
 #on Matlab and windows machines, we'll need a windows style path:  {{{
 if [ "$MACHINE" = "win7" ]; then
-	MATLAB_TIER=`cygpath -m $ISSM_TIER`
+	MATLAB_TIER=`cygpath -m $ISSM_DIR`
 else 
-	MATLAB_TIER=$ISSM_TIER
+	MATLAB_TIER=$ISSM_DIR
 fi
 #}}}
@@ -254,5 +253,5 @@
 do
 	#Launch matlab and the nightly run script
-	cat > $ISSM_TIER/nightlylog/matlab_run$i.m << EOF
+	cat > $ISSM_DIR/nightlylog/matlab_run$i.m << EOF
 	warning off %necessary to avoid a info.log of several Go for parallel runs
 	try,
@@ -263,5 +262,4 @@
 		echo "runme('output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);"
 	else
-		#echo "runme('id',[101 102]);" 
 		echo "runme($NROPTIONS,'output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);"
 	fi
@@ -271,5 +269,5 @@
 		message=getReport(me)
 		directory=strsplit(pwd,'/');
-		fid=fopen([ISSM_TIER '/nightlylog/matlaberror.log'], 'at');
+		fid=fopen([issmdir '/nightlylog/matlaberror.log'], 'at');
 		fprintf(fid,'\nMatlab error occured in: %s\n\n',directory{end});
 		fprintf(fid,'%s',message);
@@ -281,5 +279,5 @@
 
 	#Start run from nightlylog directory
-	cd $ISSM_TIER/nightlylog/
+	cd $ISSM_DIR/nightlylog/
 
 	MATLABBIN=$MATLAB_PATH/bin/matlab
@@ -298,5 +296,5 @@
 #}}}
 #concatenate all reports {{{1
-cd $ISSM_TIER/nightlylog/
+cd $ISSM_DIR/nightlylog/
 cp matlab_log1.log  matlab_log.log
 for (( i=2;i<=$NUMCPUS_RUN;i++ ))
@@ -315,5 +313,5 @@
 ELAPSED_RUN=$(timer $INSTALL_TIME)
 ELAPSED_TOTAL=$(timer $START_TIME)
-cat << END >>  $ISSM_TIER/nightlylog/info.log
+cat << END >>  $ISSM_DIR/nightlylog/info.log
 elapsed_run:   $(echo $ELAPSED_RUN)
 elapsed_total: $(echo $ELAPSED_TOTAL)
@@ -324,7 +322,7 @@
 #Send Report
 #Build html report {{{1
-cd $ISSM_TIER/nightlylog/
+cd $ISSM_DIR/nightlylog/
 sh ../scripts/report.sh
-echo "html report located in $ISSM_TIER/nightlylog/report.html"
+echo "html report located in $ISSM_DIR/nightlylog/report.html"
 #}}}
 #send mail if requested                  (SKIPMAIL) {{{1
@@ -332,14 +330,14 @@
 then
 	echo "sending report..."
-	source $ISSM_TIER/cron/mailinglist
+	source $ISSM_DIR/cron/mailinglist
 	for i in `echo $MAILINGLIST`; do
 
 		if [ "$MACHINE" = "win7" ]
 		then
-			email -html -s "Nightly runs on $HOST_NAME (version: $ISSM_RELEASE)" -n "ISSM Nightly run" -f echo $EMAIL_ADRESS $i < $ISSM_TIER/nightlylog/report.html
+			email -html -s "Nightly runs on $HOST_NAME (version: $ISSM_RELEASE)" -n "ISSM Nightly run" -f echo $EMAIL_ADRESS $i < $ISSM_DIR/nightlylog/report.html
 		else 
 			if [ "$MACHINE" = "astrid" ]
 			then
-cat - $ISSM_TIER/nightlylog/report.html <<HERE | /usr/lib/sendmail  -oi -t
+cat - $ISSM_DIR/nightlylog/report.html <<HERE | /usr/lib/sendmail  -oi -t
 From: "ISSM Nightly run" <$EMAIL_ADRESS>
 To: $i
@@ -349,5 +347,5 @@
 HERE
 		else
-cat - $ISSM_TIER/nightlylog/report.html <<HERE | /usr/sbin/sendmail  -oi -t
+cat - $ISSM_DIR/nightlylog/report.html <<HERE | /usr/sbin/sendmail  -oi -t
 From: "ISSM Nightly run" <$EMAIL_ADRESS>
 To: $i
