Changeset 1521
- Timestamp:
- 08/03/09 16:03:28 (16 years ago)
- Location:
- issm/trunk/cron
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/cron/nightlyrun.sh
r1455 r1521 3 3 #It then processes the results and sends an email to the Ice developpers. 4 4 5 #Recover package for which we run nightly. 6 package=$1; 7 echo $package 5 #get configs 6 if [ `hostname -s` == "wilkes" ]; then 7 source wilkes_config 8 fi 9 if [ `hostname -s` == "ice1" ]; then 10 source ice1_config 11 fi 8 12 9 #Some functions 10 function today_date { 11 suffix=`date | awk '{printf("%s-%s-%s",$2,$3,$6);}'` 12 echo $suffix; 13 } 14 15 #Figure out today's date 16 export today=`today_date`; 13 #create nightly run variables 14 export today=`date | awk '{printf("%s-%s-%s",$2,$3,$6);}'`; 17 15 export host_name=`hostname`; 18 16 19 17 #create ISSM variables 20 export ISSM_DIR="/u/wilkes-r1b/morlighe/svn/issm/trunk/cron/trunk" 21 export ISSM_ARCH=linux-gnu-amd64 22 source $ISSM_DIR/etc/environment.sh 23 export ISSM_RELEASE="issm"; 18 export ISSM_DIR 19 export ISSM_ARCH 20 export ISSM_RELEASE 24 21 25 #Erase previous code 22 #Erase previous code and Fetch the new one 26 23 rm -rf trunk 27 28 #Fetch svn code29 24 svn checkout http://s383-rhat/issm/svn/issm/trunk 30 25 31 # Go to the issm directory26 #install ISSM 32 27 cd $ISSM_DIR 33 34 #install ISSM35 28 36 29 #1: modify some variables 37 30 cd etc 38 cat environment_variables.sh | sed -e "s/C:\/MATLAB\/R2009a\//\/usr\/local\/pkgs\/matlab-7.6\//g" > environment_variables.sh.bak 31 #modify MATLAB_PATH ( /usr/... -> \/usr\/...) 32 echo $MATLAB_PATH | sed 's/\//\\\//g' > MATLAB_PATH2 33 MATLAB_PATH2=`cat MATLAB_PATH2` 34 rm MATLAB_PATH2 35 36 #modify MATLAB_DIR in environment_variables.sh 37 cat environment_variables.sh | sed -e "s/C:\/MATLAB\/R2009a\//$MATLAB_PATH2/g" > environment_variables.sh.bak 39 38 mv environment_variables.sh.bak environment_variables.sh 39 40 #modify EXECUTION_PATH ( /usr/... -> \/usr\/...) 41 echo $EXECUTION_PATH | sed 's/\//\\\//g' | sed 's/-/\\-/g' > EXECUTION_PATH2 42 EXECUTION_PATH2=`cat EXECUTION_PATH2` 43 rm EXECUTION_PATH2 44 echo $ISSM_DIR\/bin | sed 's/\//\\\//g' | sed 's/-/\\-/g' > CLUSTER_PATH 45 CLUSTER_PATH=`cat CLUSTER_PATH` 46 rm CLUSTER_PATH 47 48 #modify EXECUTION_PATH in cluster.rc 49 cat cluster.rc | sed -e "s-cluster_codepath.*-cluster_codepath\=$CLUSTER_PATH-" | sed -e "s-cluster_executionpath.*-cluster_executionpath\=$EXECUTION_PATH2-" > cluster.bak 50 mv cluster.bak cluster.rc 40 51 cd .. 41 52 source $ISSM_DIR/etc/environment.sh … … 43 54 #2: install some required external packages 44 55 cd externalpackages 45 cd mpich246 cp configs/ wilkes/* .47 ./install.sh 56 cd mpich2 57 cp configs/$EP_CONFIG/* . 58 ./install.sh $NUMCPUS 48 59 cd ../petsc 49 cp configs/ wilkes/* .50 ./install.sh 60 cp configs/$EP_CONFIG/* . 61 ./install.sh $NUMCPUS 51 62 cd ../metis 52 cp config /linux/* .53 ./install.sh 63 cp configs/$EP_CONFIG/* . 64 ./install.sh $NUMCPUS 54 65 cd ../triangle 55 cp config /lin64/* .56 ./install.sh 66 cp configs/$EP_CONFIG/* . 67 ./install.sh $NUMCPUS 57 68 cd $ISSM_DIR 58 69 … … 66 77 sh config/wilkes/linux64.sh 67 78 68 #4: compile ISSM69 make -j 8 70 make install 71 72 #5: change issm.rc 73 cd etc 74 cat cluster.rc | sed -e "s/cluster_codepath=\/u\/astrid1\/larour\/issm\/trunk\/bin/cluster_codepath=\/u\/wilkes-r1b\/morlighe\/svn\/issm\/trunk\/cron\/trunk\/bin/g" | sed -e "s/cluster_executionpath=\/u\/wilkes-r1b\/larour\/Testing\/Execution/cluster_executionpath=\/u\/wilkes-r1b\/morlighe\/ExecutionNightlyRun/g"> cluster.bak 75 mv cluster.bak cluster.rc 76 cd .. 79 #4: compile and install ISSM 80 if [ -z $NUMCPUS ]; 81 then 82 make 83 make install 84 else 85 make -j $NUMCPUS 86 make -j $NUMCPUS install 87 fi 77 88 78 89 #Launch matlab and the nightly run script 79 if [[ package == "" ]] 80 then 81 matlab -nojvm -nosplash > ./nightlylong.log << EOF 90 matlab -nojvm -nosplash > ./nightlylong.log << EOF 82 91 startup 83 nightlyrun ;92 nightlyrun($PACKAGES); 84 93 EOF 85 else86 matlab -nojvm -nosplash > ./nightlylong.log << EOF87 startup88 nightlyrun($1);89 EOF90 fi91 94 92 95 #removed unused lines to deal with a smaller file -
issm/trunk/cron/report.sh
r1435 r1521 129 129 130 130 # go through the lines of $package.log 131 COUNTER= 1131 COUNTER=0 132 132 MAX=`wc -l $package.log | awk '{printf("%s",$1);}'` 133 133 while [ $COUNTER -lt $MAX ]; do
Note:
See TracChangeset
for help on using the changeset viewer.