Changeset 11995 for issm/trunk/cron/nightlyrun.sh
- Timestamp:
- 04/16/12 14:57:18 (13 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:ignore
-
old new 7 7 config.status 8 8 configure 9 doxygen10 9 ISSM.paf 11 10 ISSM.ppf 12 11 ISSM.ppf_cache 13 12 libtool 14 list15 13 Makefile 16 14 Makefile.in
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
issm/trunk/cron
-
Property svn:ignore
set to
trunk-jpl
-
Property svn:ignore
set to
-
issm/trunk/cron/nightlyrun.sh
r11237 r11995 29 29 { 30 30 #return host name depending on the OS 31 if [ "$1" = "win eric" ]31 if [ "$1" = "win7" ] 32 32 then 33 HOST_NAME=`hostname `;33 HOST_NAME=`hostname | sed 's/-//g'`; 34 34 else 35 HOST_NAME=`hostname -s `;35 HOST_NAME=`hostname -s | sed 's/-//g'`; 36 36 fi 37 37 echo $HOST_NAME; 38 38 } #}}} 39 function pause() #{{{1 40 { 41 pid=`ps aux -W | grep $1 | awk '{printf("%s\n",$1);}'` 42 43 while [ -n "$pid" ] 44 do 45 pid=`ps aux -W | grep $1 | awk '{printf("%s\n",$1);}'` 46 done 47 } 48 #}}} 39 49 40 50 #Get configuration … … 74 84 #Erase previous code and Fetch the new one 75 85 rm -rf $ISSM_RELEASE 76 svn checkout $REPOSITORY86 svn checkout "$REPOSITORY" 77 87 78 88 elif [ "$ISSM_INSTALLATION" == "update" ] … … 100 110 #create simpler cluster.rc file, with only the cluster we are interested in. 101 111 cd $ISSM_TIER/test/NightlyRun/ 102 cat << END > $HOST_NAME"_settings.m" 112 if [ "$MACHINE" = "win7" ]; then 113 cat << END > $HOST_NAME"_settings.m" 114 cluster.login='$USER'; 115 cluster.codepath='`cygpath -m $ISSM_TIER/bin`'; 116 cluster.executionpath='`cygpath -m $EXECUTION_PATH`'; 117 END 118 else 119 cat << END > $HOST_NAME"_settings.m" 103 120 cluster.login='$USER'; 104 121 cluster.codepath='$ISSM_TIER/bin'; 105 122 cluster.executionpath='$EXECUTION_PATH'; 106 123 END 124 cat << END > $ISSM_TIER/externalpackages/matlab/install.sh 125 #!/bin/bash 126 rm -rf install 127 ln -s $MATLAB_PATH install 128 END 129 130 fi 107 131 #}}} 108 132 #Source environment variables with new matlab path {{{1 … … 113 137 if [ "$ISSM_EXTERNALPACKAGES" == "install" ] 114 138 then 139 115 140 cd $ISSM_TIER/externalpackages 116 for ep in $EXTERNALPACKAGES 117 do 118 cd $ep 119 case $ep in 120 "mpich2" ) ./install-1.0.2-linux64.sh ;; 121 "petsc" ) ./install-3.2-linux64.sh ;; 122 "metis" ) ./install-4.0-linux64.sh ;; 123 "triangle" ) ./install-linux64.sh ;; 124 "dakota" ) ./install-linux64-astrid.sh ;; 125 *) ./install.sh $NUMCPUS_INSTALL 126 esac 141 #number of packages: 142 numpackages=`echo $EXTERNALPACKAGES | wc -w` 143 144 for (( i=1; i<=$numpackages; i++ )) 145 do 146 package=`echo $EXTERNALPACKAGES | cut -d " " -f $i-$i` 147 package_config=`echo $EXTERNALPACKAGES_CONFIGS | cut -d " " -f $i-$i` 148 149 cd $package 150 $package_config 127 151 cd .. 128 152 done … … 136 160 cp -Rf $EXTERNALPACKAGESDIR ./ 137 161 162 elif [ "$ISSM_EXTERNALPACKAGES" == "link" ] 163 then 164 165 #erase externapackages, and link with externalpackages_dir 166 cd $ISSM_TIER 167 rm -rf externalpackages 168 ln -s $EXTERNALPACKAGESDIR . 169 138 170 elif [ "$ISSM_EXTERNALPACKAGES" == "none" ] 139 171 then … … 158 190 make distclean 159 191 ./scripts/automakererun.sh 160 ./configs/config-linux64-astrid.sh192 source ./configs/$COMPILE_CONFIG_FILE 161 193 162 194 #4: compile and install ISSM 163 if [ "$MACHINE" = "wineric" ]195 if [ $NUMCPUS_INSTALL -gt 1 ] 164 196 then 165 cd $ISSM_TIER/src/c166 ./intel-compile.sh167 cd $ISSM_TIER/src/mex197 echo "Making with " $NUMCPUS_INSTALL "cpus" 198 make -j $NUMCPUS_INSTALL install 199 else 168 200 make install 169 cd $ISSM_TIER170 else171 make -j $NUMCPUS_INSTALL172 make -j $NUMCPUS_INSTALL install173 201 fi 202 203 make install 174 204 175 205 elif [ "$ISSM_COMPILATION" == "no" ] … … 185 215 #create softlink to startup {{{1 186 216 cd $ISSM_TIER/test/NightlyRun/ 187 ln -s $ISSM_TIER/startup.m . 217 rm startup.m #in case it alreade exists 218 cp $ISSM_TIER/startup.m . 188 219 #}}} 189 220 #Create nightlylog directory and info.log {{{1 … … 212 243 213 244 #Run tests 245 #on Matlab and windows machines, we'll need a windows style path: {{{ 246 if [ "$MACHINE" = "win7" ]; then 247 MATLAB_TIER=`cygpath -m $ISSM_TIER` 248 else 249 MATLAB_TIER=$ISSM_TIER 250 fi 251 #}}} 214 252 #Launch all tests on different cpus {{{1 215 253 for (( i=1;i<=$NUMCPUS_RUN;i++ )) … … 219 257 warning off %necessary to avoid a info.log of several Go for parallel runs 220 258 try, 221 cd $ ISSM_TIER/test/NightlyRun259 cd $MATLAB_TIER/test/NightlyRun 222 260 startup; 223 261 $(if [ "$NROPTIONS" = "" ] … … 225 263 echo "runme('output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);" 226 264 else 265 #echo "runme('id',[101 102]);" 227 266 echo "runme($NROPTIONS,'output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);" 228 267 fi … … 244 283 cd $ISSM_TIER/nightlylog/ 245 284 285 MATLABBIN=$MATLAB_PATH/bin/matlab 246 286 #Start test 247 MATLAB_VERSION="7.6" #7.2,7.4,7.6 and 7.8248 /usr/local/pkgs/matlab-$MATLAB_VERSION/bin/matlab -nojvm -nosplash -r matlab_run$i -logfile matlab_log$i.log & 287 $MATLABBIN -nojvm -nosplash -r matlab_run$i -logfile matlab_log$i.log & 288 249 289 done 250 290 251 291 #wait until matlab closes 252 wait 292 if [ "$MACHINE" = "win7" ]; then 293 pause MATLAB 294 else 295 wait 296 fi 297 253 298 #}}} 254 299 #concatenate all reports {{{1 255 300 cd $ISSM_TIER/nightlylog/ 256 mvmatlab_log1.log matlab_log.log301 cp matlab_log1.log matlab_log.log 257 302 for (( i=2;i<=$NUMCPUS_RUN;i++ )) 258 303 do … … 290 335 for i in `echo $MAILINGLIST`; do 291 336 292 if [ "$MACHINE" = "win eric" ]337 if [ "$MACHINE" = "win7" ] 293 338 then 294 email -html - f "ISSM Nightly run $EMAIL_ADRESS" -s "Nightly runs of $ISSM_RELEASE , configuration: $MACHINE, host: $HOST_NAME, user: $USER. " $i < $ISSM_TIER/test/Verification/NightlyRun/report.html339 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 295 340 else 296 341 if [ "$MACHINE" = "astrid" ] … … 299 344 From: "ISSM Nightly run" <$EMAIL_ADRESS> 300 345 To: $i 301 Subject: Nightly runs o f $ISSM_RELEASE, configuration: $MACHINE, host: $HOST_NAME, user: $USER.346 Subject: Nightly runs on $HOST_NAME (version: $ISSM_RELEASE) 302 347 Mime-Version: 1.0 303 348 Content-Type: text/html … … 307 352 From: "ISSM Nightly run" <$EMAIL_ADRESS> 308 353 To: $i 309 Subject: Nightly runs o f $ISSM_RELEASE, configuration: $MACHINE, host: $HOST_NAME, user: $USER.354 Subject: Nightly runs on $HOST_NAME (version: $ISSM_RELEASE) 310 355 Mime-Version: 1.0 311 356 Content-Type: text/html
Note:
See TracChangeset
for help on using the changeset viewer.