Changeset 5081 for issm/trunk/cron/nightlyrun.sh
- Timestamp:
- 08/09/10 12:13:46 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/cron/nightlyrun.sh
r5076 r5081 213 213 fi 214 214 #}}} 215 #create softlink to startup {{{1 216 cd $ISSM_DIR/test/NightlyRun/ 217 ln -s $ISSM_DIR/startup.m . 218 #}}} 215 219 #Create nightlylog directory and nightly.log {{{1 216 220 #put installation elapsed time in nightly.log … … 229 233 END 230 234 #}}} 235 #check NUMCPUS_RUN options {{{1 236 if [ "$NUMCPUS_RUN" = "" ] 237 then 238 echo "NUMCPUS_RUN option not found, defaulting to NUMCPUS_RUN = 1" 239 NUMCPUS_RUN=1 240 fi 241 #}}} 231 242 232 243 #Run tests 233 #Call run.sh script{{{1 234 cd $ISSM_DIR/cron/ 235 ./run.sh $1 244 #Launch all tests on different cpus {{{1 245 for (( i=1;i<=$NUMCPUS_RUN;i++ )) 246 do 247 #Launch matlab and the nightly run script 248 cat > $ISSM_DIR/nightlylog/matlab_run$i.m << EOF 249 warning off %necessary to avoid a nightly.log of several Go for parallel runs 250 try, 251 cd $ISSM_DIR/test/NightlyRun 252 startup; 253 $(if [ "$NROPTIONS" = "" ] 254 then 255 echo "runme('output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);" 256 else 257 echo "runme($NROPTIONS,'output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);" 258 fi 259 ) 260 catch me, 261 %An error occured, get report and exit 262 directory=strsplit(pwd,'/'); 263 message=getReport(me) 264 fid=fopen([ISSM_DIR '/nightlylog/matlaberror.log'], 'at'); 265 fprintf(fid,'\nMatlab error occured in: %s\n\n',directory{end}); 266 fprintf(fid,'%s',message); 267 fclose(fid); 268 end 269 exit 270 EOF 271 272 #Start run from nightlylog directory 273 cd $ISSM_DIR/nightlylog/ 274 275 #Start test 276 MATLAB_VERSION="7.6" #7.2,7.4,7.6 and 7.8 277 /usr/local/pkgs/matlab-$MATLAB_VERSION/bin/matlab -nojvm -nosplash -r matlab_run$i -logfile matlab_log$i.log & 278 done 279 280 #wait until matlab closes 281 wait 282 #}}} 283 #concatenate all reports {{{1 284 mv matlab_log1.log matlab_log.log 285 for (( i=2;i<=$NUMCPUS_RUN;i++ )) 286 do 287 cat matlab_log.log matlab_log$i.log > matlab_log.log.bak 288 mv matlab_log.log.bak matlab_log.log 289 rm matlab_log$i.log 290 291 done 236 292 #}}} 237 293 #Complete nightly.log {{{1
Note:
See TracChangeset
for help on using the changeset viewer.