Changeset 11552
- Timestamp:
- 02/27/12 13:33:21 (13 years ago)
- Location:
- issm/trunk-jpl/cron
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/cron/nightlyrun.sh
r11178 r11552 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 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 #}}} 40 49 #Get configuration 41 50 #Source config file{{{1 … … 74 83 #Erase previous code and Fetch the new one 75 84 rm -rf $ISSM_RELEASE 76 svn checkout $REPOSITORY85 svn checkout "$REPOSITORY" 77 86 78 87 elif [ "$ISSM_INSTALLATION" == "update" ] … … 100 109 #create simpler cluster.rc file, with only the cluster we are interested in. 101 110 cd $ISSM_TIER/test/NightlyRun/ 111 if [ "$MACHINE" = "win7" ]; then 112 cat << END > $HOST_NAME"_settings.m" 113 cluster.login='$USER'; 114 cluster.codepath='`cygpath -m $ISSM_TIER/bin`'; 115 cluster.executionpath='`cygpath -m $EXECUTION_PATH`'; 116 END 117 else 102 118 cat << END > $HOST_NAME"_settings.m" 103 119 cluster.login='$USER'; … … 105 121 cluster.executionpath='$EXECUTION_PATH'; 106 122 END 123 fi 107 124 #}}} 108 125 #Source environment variables with new matlab path {{{1 … … 113 130 if [ "$ISSM_EXTERNALPACKAGES" == "install" ] 114 131 then 132 115 133 cd $ISSM_TIER/externalpackages 116 for ep in $EXTERNALPACKAGES117 do118 cd $ep 119 case $ep in120 "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_INSTALL126 esac134 #number of packages: 135 numpackages=`echo $EXTERNALPACKAGES | wc -w` 136 137 for (( i=1; i<=$numpackages; i++ )) 138 do 139 package=`echo $EXTERNALPACKAGES | cut -d " " -f $i-$i` 140 package_config=`echo $EXTERNALPACKAGES_CONFIGS | cut -d " " -f $i-$i` 141 package_numcpus=`echo $EXTERNALPACKAGES_NUMCPUS | cut -d " " -f $i-$i` 142 143 cd $package 144 $package_config $package_numcpus 127 145 cd .. 128 146 done 147 129 148 130 149 elif [ "$ISSM_EXTERNALPACKAGES" == "copy" ] … … 158 177 make distclean 159 178 ./scripts/automakererun.sh 160 ./configs/config-linux64-astrid.sh 161 162 #4: compile and install ISSM 163 if [ "$MACHINE" = "wineric" ] 164 then 165 cd $ISSM_TIER/src/c 166 ./intel-compile.sh 167 cd $ISSM_TIER/src/mex 168 make install 169 cd $ISSM_TIER 170 else 171 make -j $NUMCPUS_INSTALL 172 make -j $NUMCPUS_INSTALL install 173 fi 179 source ./configs/$COMPILE_CONFIG_FILE 180 181 make -j $NUMCPUS_INSTALL 182 make -j $NUMCPUS_INSTALL install 174 183 175 184 elif [ "$ISSM_COMPILATION" == "no" ] … … 185 194 #create softlink to startup {{{1 186 195 cd $ISSM_TIER/test/NightlyRun/ 187 ln -s $ISSM_TIER/startup.m . 196 if [ "$MACHINE" = "win7" ]; then 197 cp $ISSM_TIER/startup.m . 198 else 199 ln -s $ISSM_TIER/startup.m . 200 fi 188 201 #}}} 189 202 #Create nightlylog directory and info.log {{{1 … … 212 225 213 226 #Run tests 227 #on Matlab and windows machines, we'll need a windows style path: {{{ 228 if [ "$MACHINE" = "win7" ]; then 229 MATLAB_TIER=`cygpath -m $ISSM_TIER` 230 else 231 MATLAB_TIER=$ISSM_TIER 232 fi 233 234 #}}} 214 235 #Launch all tests on different cpus {{{1 215 236 for (( i=1;i<=$NUMCPUS_RUN;i++ )) … … 219 240 warning off %necessary to avoid a info.log of several Go for parallel runs 220 241 try, 221 cd $ ISSM_TIER/test/NightlyRun242 cd $MATLAB_TIER/test/NightlyRun 222 243 startup; 223 244 $(if [ "$NROPTIONS" = "" ] … … 225 246 echo "runme('output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);" 226 247 else 248 #echo "runme('id',[101 102]);" 227 249 echo "runme($NROPTIONS,'output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);" 228 250 fi … … 245 267 246 268 #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 & 269 $MATLABBIN -nojvm -nosplash -r matlab_run$i -logfile matlab_log$i.log & 270 249 271 done 250 272 251 273 #wait until matlab closes 252 wait 274 if [ "$MACHINE" = "win7" ]; then 275 pause MATLAB 276 else 277 wait 278 fi 279 253 280 #}}} 254 281 #concatenate all reports {{{1 … … 290 317 for i in `echo $MAILINGLIST`; do 291 318 292 if [ "$MACHINE" = "win eric" ]319 if [ "$MACHINE" = "win7" ] 293 320 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.html 321 echo $i 322 email -html -s "Nightly runs of $ISSM_RELEASE , configuration: $MACHINE, host: $HOST_NAME, user: $USER. " $i < $ISSM_TIER/nightlylog/report.html 295 323 else 296 324 if [ "$MACHINE" = "astrid" ]
Note:
See TracChangeset
for help on using the changeset viewer.