[17802] | 1 | Index: ../trunk-jpl/jenkins/linux64_murdo
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/jenkins/linux64_murdo (revision 0)
|
---|
| 4 | +++ ../trunk-jpl/jenkins/linux64_murdo (revision 16616)
|
---|
| 5 | @@ -0,0 +1,106 @@
|
---|
| 6 | +#
|
---|
| 7 | +########### Configuration file for Eric Larour's Jenkins run on Murdo ############
|
---|
| 8 | +
|
---|
| 9 | +#-------------------------------#
|
---|
| 10 | +# 1: ISSM general configuration #
|
---|
| 11 | +#-------------------------------#
|
---|
| 12 | +
|
---|
| 13 | +#Nightly run name
|
---|
| 14 | +NAME="ISSM matlab tests on Linux64 (murdo)"
|
---|
| 15 | +
|
---|
| 16 | +#ISSM Architecture
|
---|
| 17 | +ISSM_ARCH="linux-gnu-amd64"
|
---|
| 18 | +
|
---|
| 19 | +#ISSM CONFIGURATION
|
---|
| 20 | +ISSM_CONFIG='--prefix=$ISSM_DIR\
|
---|
| 21 | + --with-matlab-dir=$MATLAB_DIR \
|
---|
| 22 | + --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
|
---|
| 23 | + --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
|
---|
| 24 | + --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \
|
---|
| 25 | + --with-mpi-libflags="-L$ISSM_DIR/externalpackages/mpich/install/lib/ -lmpich" \
|
---|
| 26 | + --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
|
---|
| 27 | + --with-petsc-arch=$ISSM_ARCH \
|
---|
| 28 | + --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
|
---|
| 29 | + --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
|
---|
| 30 | + --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \
|
---|
| 31 | + --with-numthreads=18 \
|
---|
| 32 | + --with-cxxoptflags="-mtune=barcelona -ffast-math -O3 -msse4.2 -Wno-write-strings "\
|
---|
| 33 | + --with-graphics-lib="/usr/lib/x86_64-linux-gnu/libX11.so" \
|
---|
| 34 | + --with-tao-dir=$ISSM_DIR/externalpackages/tao/install \
|
---|
| 35 | + --enable-debugging '
|
---|
| 36 | +
|
---|
| 37 | +#MATLAB path
|
---|
| 38 | +MATLAB_PATH="/usr/local/matlab80/"
|
---|
| 39 | +
|
---|
| 40 | +#PYTHON and MATLAB testing
|
---|
| 41 | +MATLAB_TEST=1
|
---|
| 42 | +PYTHON_TEST=0
|
---|
| 43 | +
|
---|
| 44 | +#execution path used for parallel runs
|
---|
| 45 | +EXECUTION_PATH=$ISSM_DIR/execution
|
---|
| 46 | +
|
---|
| 47 | +#-----------------------------------#
|
---|
| 48 | +# 3: External packages installation #
|
---|
| 49 | +#-----------------------------------#
|
---|
| 50 | +
|
---|
| 51 | +#ISSM_EXTERNALPACKAGES can have 3 values:
|
---|
| 52 | +# - "install" install all external packages listed below
|
---|
| 53 | +# - "copy" copy existing directories (EXTERNALPACKAGESDIR)
|
---|
| 54 | +# - "none" leave external packages as is
|
---|
| 55 | +# ->skip to section 4
|
---|
| 56 | +ISSM_EXTERNALPACKAGES="install"
|
---|
| 57 | +EXTERNALPACKAGESDIR=$ISSM_DIR/externalpackages
|
---|
| 58 | +
|
---|
| 59 | +#List of external pakages to be installed and their installation scripts
|
---|
| 60 | +EXTERNALPACKAGES="autotools install.sh
|
---|
| 61 | + matlab install.sh
|
---|
| 62 | + mpich install-3.0-linux64.sh
|
---|
| 63 | + cmake install.sh
|
---|
| 64 | + petsc install-3.4-linux64.sh
|
---|
| 65 | + triangle install-linux64.sh
|
---|
| 66 | + boost install.sh
|
---|
| 67 | + dakota install-5.3.1-linux64.sh
|
---|
| 68 | + tao install-2.2.sh
|
---|
| 69 | + chaco install.sh
|
---|
| 70 | + shell2junit install.sh"
|
---|
| 71 | +
|
---|
| 72 | +#---------------------#
|
---|
| 73 | +# 4: ISSM Compilation #
|
---|
| 74 | +#---------------------#
|
---|
| 75 | +
|
---|
| 76 | +#ISSM_COMPILATION can have 2 values:
|
---|
| 77 | +# - "yes" compile ISSM
|
---|
| 78 | +# - "no" do not compile ISSM
|
---|
| 79 | +ISSM_COMPILATION="yes"
|
---|
| 80 | +
|
---|
| 81 | +#----------------------#
|
---|
| 82 | +# 5: Mail notification #
|
---|
| 83 | +#----------------------#
|
---|
| 84 | +
|
---|
| 85 | +#Mail delivery. If SKIPMAIL="no", the html nightly run report will be
|
---|
| 86 | +#sent to the adresses present in $ISSM_DIR/cron/mailinglist.
|
---|
| 87 | +SKIPMAIL="no"
|
---|
| 88 | +
|
---|
| 89 | +#Sender email address
|
---|
| 90 | +EMAIL_ADRESS="eric.larour@jpl.nasa.gov"
|
---|
| 91 | +
|
---|
| 92 | +#Mailing list
|
---|
| 93 | +MAILINGLIST="eric.larour@jpl.nasa.gov"
|
---|
| 94 | +
|
---|
| 95 | +#------------------------#
|
---|
| 96 | +# 6: Nightly run options #
|
---|
| 97 | +#------------------------#
|
---|
| 98 | +
|
---|
| 99 | +#number of cpus used in ISSM installation and compilation (one is usually
|
---|
| 100 | +#safer as some packages are very sensitive to parallel compilation)
|
---|
| 101 | +NUMCPUS_INSTALL=8
|
---|
| 102 | +
|
---|
| 103 | +#number of cpus used in the nightly runs.
|
---|
| 104 | +NUMCPUS_RUN=8
|
---|
| 105 | +
|
---|
| 106 | +#Nightly run options. The matlab routine runme.m will be called
|
---|
| 107 | +#as follows: runme($MATLAB_NROPTIONS). The options must be understandable
|
---|
| 108 | +#by Matlab and runme.m
|
---|
| 109 | +#ex: "'id',[101 102 103]"
|
---|
| 110 | +MATLAB_NROPTIONS=""
|
---|
| 111 | +PYTHON_NROPTIONS=""
|
---|
| 112 |
|
---|
| 113 | Property changes on: ../trunk-jpl/jenkins/linux64_murdo
|
---|
| 114 | ___________________________________________________________________
|
---|
| 115 | Name: svn:executable
|
---|
| 116 | + *
|
---|
| 117 |
|
---|
| 118 | Index: ../trunk-jpl/jenkins/imac
|
---|
| 119 | ===================================================================
|
---|
| 120 | --- ../trunk-jpl/jenkins/imac (revision 0)
|
---|
| 121 | +++ ../trunk-jpl/jenkins/imac (revision 16616)
|
---|
| 122 | @@ -0,0 +1,105 @@
|
---|
| 123 | +#
|
---|
| 124 | +########### Configuration file for Eric Larour's Jenkins run on MaxOSX ############
|
---|
| 125 | +
|
---|
| 126 | +#-------------------------------#
|
---|
| 127 | +# 1: ISSM general configuration #
|
---|
| 128 | +#-------------------------------#
|
---|
| 129 | +
|
---|
| 130 | +#Nightly run name
|
---|
| 131 | +NAME="ISSM matlab tests on MacOSX"
|
---|
| 132 | +
|
---|
| 133 | +#ISSM Architecture
|
---|
| 134 | +ISSM_ARCH="macosx-gnu"
|
---|
| 135 | +
|
---|
| 136 | +#ISSM CONFIGURATION
|
---|
| 137 | +ISSM_CONFIG='--prefix=$ISSM_DIR \
|
---|
| 138 | + --with-matlab-dir=$MATLAB_DIR \
|
---|
| 139 | + --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
|
---|
| 140 | + --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
|
---|
| 141 | + --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \
|
---|
| 142 | + --with-mpi-libflags=" $ISSM_DIR/externalpackages/mpich/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich/install/lib/libmpl.a " \
|
---|
| 143 | + --with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \
|
---|
| 144 | + --with-math-lib="/usr/lib/libm.dylib" \
|
---|
| 145 | + --with-graphics-lib="/usr/X11/lib/libX11.dylib" \
|
---|
| 146 | + --with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5 -O3 -DNDEBUG -w "\
|
---|
| 147 | + --with-numthreads=8 \
|
---|
| 148 | + --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
|
---|
| 149 | + --with-petsc-arch=$ISSM_ARCH \
|
---|
| 150 | + --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
|
---|
| 151 | + --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
|
---|
| 152 | + --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \
|
---|
| 153 | + --with-tao-dir=$ISSM_DIR/externalpackages/tao/install'
|
---|
| 154 | +
|
---|
| 155 | +#MATLAB path
|
---|
| 156 | +MATLAB_PATH="/Applications/MATLAB_R2011b.app/"
|
---|
| 157 | +
|
---|
| 158 | +#PYTHON and MATLAB testing
|
---|
| 159 | +MATLAB_TEST=1
|
---|
| 160 | +PYTHON_TEST=0
|
---|
| 161 | +
|
---|
| 162 | +#execution path used for parallel runs
|
---|
| 163 | +EXECUTION_PATH=$ISSM_DIR/execution
|
---|
| 164 | +
|
---|
| 165 | +#-----------------------------------#
|
---|
| 166 | +# 3: External packages installation #
|
---|
| 167 | +#-----------------------------------#
|
---|
| 168 | +
|
---|
| 169 | +#ISSM_EXTERNALPACKAGES can have 3 values:
|
---|
| 170 | +# - "install" install all external packages listed below
|
---|
| 171 | +# - "copy" copy existing directories (EXTERNALPACKAGESDIR)
|
---|
| 172 | +# - "none" leave external packages as is
|
---|
| 173 | +# ->skip to section 4
|
---|
| 174 | +ISSM_EXTERNALPACKAGES="install"
|
---|
| 175 | +EXTERNALPACKAGESDIR=$ISSM_DIR/externalpackages
|
---|
| 176 | +
|
---|
| 177 | +#List of external pakages to be installed and their installation scripts
|
---|
| 178 | +EXTERNALPACKAGES="autotools install.sh
|
---|
| 179 | + matlab install.sh
|
---|
| 180 | + mpich install-3.0-macosx64.sh
|
---|
| 181 | + cmake install.sh
|
---|
| 182 | + petsc install-3.4-macosx64.sh
|
---|
| 183 | + tao install-2.2.sh
|
---|
| 184 | + triangle install-macosx64.sh
|
---|
| 185 | + shell2junit install.sh "
|
---|
| 186 | +
|
---|
| 187 | +
|
---|
| 188 | +#---------------------#
|
---|
| 189 | +# 4: ISSM Compilation #
|
---|
| 190 | +#---------------------#
|
---|
| 191 | +
|
---|
| 192 | +#ISSM_COMPILATION can have 2 values:
|
---|
| 193 | +# - "yes" compile ISSM
|
---|
| 194 | +# - "no" do not compile ISSM
|
---|
| 195 | +ISSM_COMPILATION="yes"
|
---|
| 196 | +
|
---|
| 197 | +#----------------------#
|
---|
| 198 | +# 5: Mail notification #
|
---|
| 199 | +#----------------------#
|
---|
| 200 | +
|
---|
| 201 | +#Mail delivery. If SKIPMAIL="no", the html nightly run report will be
|
---|
| 202 | +#sent to the adresses present in $ISSM_DIR/cron/mailinglist.
|
---|
| 203 | +SKIPMAIL="no"
|
---|
| 204 | +
|
---|
| 205 | +#Sender email address
|
---|
| 206 | +EMAIL_ADRESS="eric.larour@jpl.nasa.gov"
|
---|
| 207 | +
|
---|
| 208 | +#Mailing list
|
---|
| 209 | +MAILINGLIST="eric.larour@jpl.nasa.gov"
|
---|
| 210 | +
|
---|
| 211 | +#------------------------#
|
---|
| 212 | +# 6: Nightly run options #
|
---|
| 213 | +#------------------------#
|
---|
| 214 | +
|
---|
| 215 | +#number of cpus used in ISSM installation and compilation (one is usually
|
---|
| 216 | +#safer as some packages are very sensitive to parallel compilation)
|
---|
| 217 | +NUMCPUS_INSTALL=8
|
---|
| 218 | +
|
---|
| 219 | +#number of cpus used in the nightly runs.
|
---|
| 220 | +NUMCPUS_RUN=1
|
---|
| 221 | +
|
---|
| 222 | +#Nightly run options. The matlab routine runme.m will be called
|
---|
| 223 | +#as follows: runme($MATLAB_NROPTIONS). The options must be understandable
|
---|
| 224 | +#by Matlab and runme.m
|
---|
| 225 | +#ex: "'id',[101 102 103]"
|
---|
| 226 | +MATLAB_NROPTIONS=""
|
---|
| 227 | +PYTHON_NROPTIONS=""
|
---|
| 228 |
|
---|
| 229 | Property changes on: ../trunk-jpl/jenkins/imac
|
---|
| 230 | ___________________________________________________________________
|
---|
| 231 | Name: svn:executable
|
---|
| 232 | + *
|
---|
| 233 |
|
---|
| 234 | Index: ../trunk-jpl/jenkins/jenkins.sh
|
---|
| 235 | ===================================================================
|
---|
| 236 | --- ../trunk-jpl/jenkins/jenkins.sh (revision 0)
|
---|
| 237 | +++ ../trunk-jpl/jenkins/jenkins.sh (revision 16616)
|
---|
| 238 | @@ -0,0 +1,316 @@
|
---|
| 239 | +#!/bin/bash
|
---|
| 240 | +#This bash script calls the nightlyrun.m matlab file to run our nightly test decks.
|
---|
| 241 | +#It then processes the results and sends an email to the Ice developpers.
|
---|
| 242 | +
|
---|
| 243 | +#some functions
|
---|
| 244 | +function timer() #{{{
|
---|
| 245 | +{
|
---|
| 246 | + if [[ $# -eq 0 ]]; then
|
---|
| 247 | + echo $(date '+%s')
|
---|
| 248 | + else
|
---|
| 249 | + local stime=$1
|
---|
| 250 | + etime=$(date '+%s')
|
---|
| 251 | +
|
---|
| 252 | + if [[ -z "$stime" ]]; then stime=$etime; fi
|
---|
| 253 | +
|
---|
| 254 | + dt=$((etime - stime))
|
---|
| 255 | + ds=$((dt % 60))
|
---|
| 256 | + dm=$(((dt / 60) % 60))
|
---|
| 257 | + dh=$((dt / 3600))
|
---|
| 258 | + printf '%d:%02d:%02d' $dh $dm $ds
|
---|
| 259 | + fi
|
---|
| 260 | +} #}}}
|
---|
| 261 | +function todaydate() #{{{
|
---|
| 262 | +{
|
---|
| 263 | + suffix=`date | awk '{printf("%s-%s-%s %s",$2,$3,$6,$4);}'`
|
---|
| 264 | + echo $suffix;
|
---|
| 265 | +} #}}}
|
---|
| 266 | +function host_name() #{{{
|
---|
| 267 | +{
|
---|
| 268 | + #return host name depending on the OS
|
---|
| 269 | + if [ "$1" = "win7" ]
|
---|
| 270 | + then
|
---|
| 271 | + HOST_NAME=`hostname | sed 's/-//g'`;
|
---|
| 272 | + else
|
---|
| 273 | + HOST_NAME=`hostname -s | sed 's/-//g'`;
|
---|
| 274 | + fi
|
---|
| 275 | + echo $HOST_NAME;
|
---|
| 276 | +} #}}}
|
---|
| 277 | +function pause() #{{{
|
---|
| 278 | +{
|
---|
| 279 | +pid=`ps aux -W | grep $1 | awk '{printf("%s\n",$1);}'`
|
---|
| 280 | +
|
---|
| 281 | +while [ -n "$pid" ]
|
---|
| 282 | +do
|
---|
| 283 | + pid=`ps aux -W | grep $1 | awk '{printf("%s\n",$1);}'`
|
---|
| 284 | +done
|
---|
| 285 | +}
|
---|
| 286 | +#}}}
|
---|
| 287 | +
|
---|
| 288 | +#Get configuration
|
---|
| 289 | +#Source config file{{{
|
---|
| 290 | +if [ $# -ne 1 ];
|
---|
| 291 | +then
|
---|
| 292 | + #no config file specified: exit
|
---|
| 293 | + echo "no config file specified. Exiting..." >&2 # Error message to stderr.
|
---|
| 294 | + exit 1
|
---|
| 295 | +fi
|
---|
| 296 | +if [ ! -f "$1" ]
|
---|
| 297 | +then
|
---|
| 298 | + echo "File $1 not found!" >&2 # Error message to stderr.
|
---|
| 299 | + exit 1
|
---|
| 300 | +fi
|
---|
| 301 | +source $1;
|
---|
| 302 | +#}}}
|
---|
| 303 | +#Initialize variables {{{
|
---|
| 304 | +TODAY=$(todaydate);
|
---|
| 305 | +HOST_NAME=$(host_name $OS);
|
---|
| 306 | +OS=$(uname -s)
|
---|
| 307 | +START_TIME=$(timer);
|
---|
| 308 | +ISSM_RELEASE=$(basename $(echo $REPOSITORY));
|
---|
| 309 | +USER=$(whoami);
|
---|
| 310 | +INIT_PATH=$(pwd);
|
---|
| 311 | +#}}}
|
---|
| 312 | +
|
---|
| 313 | +#Installation ISSM
|
---|
| 314 | +#create matlab's installation sript {{{
|
---|
| 315 | +cat << END > $ISSM_DIR/externalpackages/matlab/install.sh
|
---|
| 316 | +#!/bin/bash
|
---|
| 317 | +rm -rf install
|
---|
| 318 | +ln -s $MATLAB_PATH install
|
---|
| 319 | +END
|
---|
| 320 | +#}}}
|
---|
| 321 | +#install/copy/none external packages (ISSM_EXTERNALPACKAGES){{{
|
---|
| 322 | +if [ "$ISSM_EXTERNALPACKAGES" == "install" ]
|
---|
| 323 | +then
|
---|
| 324 | +
|
---|
| 325 | + cd $ISSM_DIR/externalpackages
|
---|
| 326 | +
|
---|
| 327 | + #number of packages:
|
---|
| 328 | + NUMPACKAGES=$(($(echo $EXTERNALPACKAGES | wc -w )/2))
|
---|
| 329 | +
|
---|
| 330 | + for ((i=1;i<=$NUMPACKAGES;i++))
|
---|
| 331 | + do
|
---|
| 332 | + NUM1=$((2*$i-1))
|
---|
| 333 | + NUM2=$((2*$i))
|
---|
| 334 | + PACKAGENAME=$(echo $EXTERNALPACKAGES | cut -d " " -f $NUM1-$NUM1)
|
---|
| 335 | + PACKAGEINST=$(echo $EXTERNALPACKAGES | cut -d " " -f $NUM2-$NUM2)
|
---|
| 336 | +
|
---|
| 337 | + cd $PACKAGENAME
|
---|
| 338 | + echo "======================================================";
|
---|
| 339 | + echo " Installing $PACKAGENAME ";
|
---|
| 340 | + echo "======================================================";
|
---|
| 341 | + ./$PACKAGEINST | tee compil.log
|
---|
| 342 | + if [ $? -ne 0 ]; then
|
---|
| 343 | + echo "======================================================";
|
---|
| 344 | + echo " ERROR: installation of $PACKAGENAME failed ";
|
---|
| 345 | + echo "======================================================";
|
---|
| 346 | + fi
|
---|
| 347 | + source $ISSM_DIR/etc/environment.sh
|
---|
| 348 | + cd ..
|
---|
| 349 | + done
|
---|
| 350 | +
|
---|
| 351 | +elif [ "$ISSM_EXTERNALPACKAGES" == "copy" ]
|
---|
| 352 | +then
|
---|
| 353 | + cd $ISSM_DIR
|
---|
| 354 | + rm -rf externalpackages
|
---|
| 355 | + cp -Rf $EXTERNALPACKAGESDIR ./
|
---|
| 356 | +elif [ "$ISSM_EXTERNALPACKAGES" == "link" ]
|
---|
| 357 | +then
|
---|
| 358 | + cd $ISSM_DIR
|
---|
| 359 | + rm -rf externalpackages
|
---|
| 360 | + ln -s $EXTERNALPACKAGESDIR .
|
---|
| 361 | +elif [ "$ISSM_EXTERNALPACKAGES" == "none" ]
|
---|
| 362 | +then
|
---|
| 363 | + echo "Skipping external packages installation"
|
---|
| 364 | +else
|
---|
| 365 | + echo "ISSM_EXTERNALPACKAGES supported values are: install, copy and none. Exiting..." >&2 # Error message to stderr.
|
---|
| 366 | + exit 1
|
---|
| 367 | +fi
|
---|
| 368 | +source $ISSM_DIR/etc/environment.sh
|
---|
| 369 | +#}}}
|
---|
| 370 | +#ISSM compilation yes/no (ISSM_COMPILATION) {{{
|
---|
| 371 | +if [ "$ISSM_COMPILATION" == "yes" ]
|
---|
| 372 | +then
|
---|
| 373 | + cd $ISSM_DIR
|
---|
| 374 | + make uninstall
|
---|
| 375 | + make clean
|
---|
| 376 | + make distclean
|
---|
| 377 | + ./scripts/automakererun.sh
|
---|
| 378 | + cat > configure.sh << EOF
|
---|
| 379 | +./configure $ISSM_CONFIG
|
---|
| 380 | +EOF
|
---|
| 381 | + chmod 700 configure.sh
|
---|
| 382 | + ./configure.sh
|
---|
| 383 | +
|
---|
| 384 | + #4: compile and install ISSM
|
---|
| 385 | + if [ $NUMCPUS_INSTALL -gt 1 ]
|
---|
| 386 | + then
|
---|
| 387 | + echo "Making with " $NUMCPUS_INSTALL " cpus"
|
---|
| 388 | + make -j $NUMCPUS_INSTALL install
|
---|
| 389 | + else
|
---|
| 390 | + make install
|
---|
| 391 | + fi
|
---|
| 392 | +elif [ "$ISSM_COMPILATION" == "no" ]
|
---|
| 393 | +then
|
---|
| 394 | + echo "Skipping ISSM compilation"
|
---|
| 395 | +else
|
---|
| 396 | + echo "ISSM_COMPILATION supported values are: yes and no. Exiting..." >&2 # Error message to stderr.
|
---|
| 397 | + exit 1
|
---|
| 398 | +fi
|
---|
| 399 | +#}}}
|
---|
| 400 | +
|
---|
| 401 | +#shell2junit {{{
|
---|
| 402 | +source $ISSM_DIR/externalpackages/shell2junit/install/sh2ju.sh
|
---|
| 403 | +#}}}
|
---|
| 404 | +
|
---|
| 405 | +#Prepare info.log
|
---|
| 406 | +#{{{
|
---|
| 407 | +rm -rf $ISSM_DIR/nightlylog
|
---|
| 408 | +mkdir $ISSM_DIR/nightlylog
|
---|
| 409 | +INSTALL_TIME=$(timer)
|
---|
| 410 | +ELAPSED=$(timer $START_TIME)
|
---|
| 411 | +VERSION=$(svnversion $ISSM_DIR)
|
---|
| 412 | +cat << END > $ISSM_DIR/nightlylog/info.log
|
---|
| 413 | +name: $(echo $NAME)
|
---|
| 414 | +today: $(echo $TODAY)
|
---|
| 415 | +user: $(echo $USER)
|
---|
| 416 | +host: $(echo $HOST_NAME)
|
---|
| 417 | +OS: $(echo $OS)
|
---|
| 418 | +release: $(echo $ISSM_RELEASE)
|
---|
| 419 | +init_path: $(echo $INIT_PATH)
|
---|
| 420 | +is_matlab: $(echo $MATLAB_TEST)
|
---|
| 421 | +is_python: $(echo $PYTHON_TEST)
|
---|
| 422 | +elapsed_install: $(echo $ELAPSED)
|
---|
| 423 | +version: $(echo $VERSION)
|
---|
| 424 | +END
|
---|
| 425 | +#}}}
|
---|
| 426 | +
|
---|
| 427 | +#matlab tests
|
---|
| 428 | +if [ $MATLAB_TEST -eq 1 ]; then
|
---|
| 429 | +#Launch all tests on different cpus {{{
|
---|
| 430 | +MATLAB_START_TIME=$(timer);
|
---|
| 431 | +for (( i=1;i<=$NUMCPUS_RUN;i++ ))
|
---|
| 432 | +do
|
---|
| 433 | + #Launch matlab and the nightly run script
|
---|
| 434 | + cat > $ISSM_DIR/nightlylog/matlab_run$i.m << EOF
|
---|
| 435 | + warning off %necessary to avoid a info.log of several Go for parallel runs
|
---|
| 436 | + try,
|
---|
| 437 | + $(if [ "$MATLAB_NROPTIONS" = "" ]
|
---|
| 438 | + then
|
---|
| 439 | + echo "runme('output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);"
|
---|
| 440 | + else
|
---|
| 441 | + echo "runme($MATLAB_NROPTIONS,'output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);"
|
---|
| 442 | + fi
|
---|
| 443 | + )
|
---|
| 444 | + catch me,
|
---|
| 445 | + %An error occured, get report and exit
|
---|
| 446 | + message=getReport(me)
|
---|
| 447 | + directory=strsplit(pwd,'/');
|
---|
| 448 | + fid=fopen([issmdir '/nightlylog/matlaberror.log'], 'at');
|
---|
| 449 | + fprintf(fid,'\nMatlab error occured in: %s\n\n',directory{end});
|
---|
| 450 | + fprintf(fid,'%s',message);
|
---|
| 451 | + fclose(fid);
|
---|
| 452 | + end
|
---|
| 453 | + disp('MATLABEXITEDCORRECTLY');
|
---|
| 454 | + exit
|
---|
| 455 | +EOF
|
---|
| 456 | + cd $ISSM_DIR/test/NightlyRun
|
---|
| 457 | + matlab -nojvm -nosplash -r "addpath $ISSM_DIR/src/m/dev; devpath; addpath $ISSM_DIR/nightlylog/; matlab_run$i" -logfile $ISSM_DIR/nightlylog/matlab_log$i.log &
|
---|
| 458 | +done
|
---|
| 459 | +
|
---|
| 460 | +#wait until matlab closes
|
---|
| 461 | +if [ "$OS" = "win7" ]; then
|
---|
| 462 | + pause MATLAB
|
---|
| 463 | +else
|
---|
| 464 | + wait
|
---|
| 465 | +fi
|
---|
| 466 | +
|
---|
| 467 | +#concatenate reports
|
---|
| 468 | +cd $ISSM_DIR/nightlylog/
|
---|
| 469 | +rm matlab_log.log
|
---|
| 470 | +for (( i=1;i<=$NUMCPUS_RUN;i++ ))
|
---|
| 471 | +do
|
---|
| 472 | + cat matlab_log$i.log >> matlab_log.log
|
---|
| 473 | +done
|
---|
| 474 | +
|
---|
| 475 | +#filter out windows characters:
|
---|
| 476 | +cat matlab_log.log | tr -cd '\11\12\40-\176' > matlab_log.log2 && mv matlab_log.log2 matlab_log.log
|
---|
| 477 | +
|
---|
| 478 | +#}}}
|
---|
| 479 | +#Complete info.log {{{
|
---|
| 480 | +if [ $(cat matlab_log.log | grep "MATLABEXITEDCORRECTLY" | wc -l) -eq $NUMCPUS_RUN ]
|
---|
| 481 | +then
|
---|
| 482 | + MATLABCRASH=0
|
---|
| 483 | +else
|
---|
| 484 | + MATLABCRASH=1
|
---|
| 485 | +fi
|
---|
| 486 | +ELAPSED=$(timer $MATLAB_START_TIME)
|
---|
| 487 | +cat << END >> $ISSM_DIR/nightlylog/info.log
|
---|
| 488 | +elapsed_matlab: $(echo $ELAPSED)
|
---|
| 489 | +matlab_crash: $(echo $MATLABCRASH)
|
---|
| 490 | +END
|
---|
| 491 | +#}}}
|
---|
| 492 | +fi
|
---|
| 493 | +
|
---|
| 494 | +#python tests
|
---|
| 495 | +if [ $PYTHON_TEST -eq 1 ]; then
|
---|
| 496 | +#Launch all tests on different cpus {{{
|
---|
| 497 | +PYTHON_START_TIME=$(timer);
|
---|
| 498 | +export PYTHONSTARTUP=$ISSM_DIR/src/m/dev/devpath.py
|
---|
| 499 | +for (( i=1;i<=$NUMCPUS_RUN;i++ ))
|
---|
| 500 | +do
|
---|
| 501 | + cd $ISSM_DIR/test/NightlyRun
|
---|
| 502 | + ./runme.py --output=nightly --rank=$i --numprocs=$NUMCPUS_RUN $PYTHON_NROPTIONS 2>&1 > $ISSM_DIR/nightlylog/python_log$i.log &
|
---|
| 503 | +done
|
---|
| 504 | +
|
---|
| 505 | +#wait until python closes
|
---|
| 506 | +if [ "$OS" = "win7" ]; then
|
---|
| 507 | + pause MATLAB
|
---|
| 508 | +else
|
---|
| 509 | + wait
|
---|
| 510 | +fi
|
---|
| 511 | +
|
---|
| 512 | +#concatenate reports
|
---|
| 513 | +cd $ISSM_DIR/nightlylog/
|
---|
| 514 | +rm python_log.log
|
---|
| 515 | +for (( i=1;i<=$NUMCPUS_RUN;i++ ))
|
---|
| 516 | +do
|
---|
| 517 | + cat python_log$i.log >> python_log.log
|
---|
| 518 | +done
|
---|
| 519 | +#}}}
|
---|
| 520 | +#Complete info.log {{{
|
---|
| 521 | +if [ $(cat python_log.log | grep "PYTHONEXITEDCORRECTLY" | wc -l) -eq $NUMCPUS_RUN ]
|
---|
| 522 | +then
|
---|
| 523 | + PYTHONCRASH=0
|
---|
| 524 | +else
|
---|
| 525 | + PYTHONCRASH=1
|
---|
| 526 | +fi
|
---|
| 527 | +ELAPSED=$(timer $PYTHON_START_TIME)
|
---|
| 528 | +cat << END >> $ISSM_DIR/nightlylog/info.log
|
---|
| 529 | +elapsed_python: $(echo $ELAPSED)
|
---|
| 530 | +python_crash: $(echo $PYTHONCRASH)
|
---|
| 531 | +END
|
---|
| 532 | +#}}}
|
---|
| 533 | +fi
|
---|
| 534 | +
|
---|
| 535 | +#complete info.log
|
---|
| 536 | +#{{{
|
---|
| 537 | +ELAPSED=$(timer $START_TIME)
|
---|
| 538 | +cat << END >> $ISSM_DIR/nightlylog/info.log
|
---|
| 539 | +elapsed_total: $(echo $ELAPSED)
|
---|
| 540 | +END
|
---|
| 541 | +#}}}
|
---|
| 542 | +
|
---|
| 543 | +#process logs to be junit compatible
|
---|
| 544 | +#{{{
|
---|
| 545 | +cd $ISSM_DIR/nightlylog/
|
---|
| 546 | +juLogClean
|
---|
| 547 | +
|
---|
| 548 | +rm -rf juLogFile && cat matlab_log.log | grep "test id" > juLogFile
|
---|
| 549 | +
|
---|
| 550 | +while read i; do
|
---|
| 551 | + juLog -name=Error -error=ERROR echo $i
|
---|
| 552 | + juLog -name=Failure -error=FAILURE echo $i
|
---|
| 553 | +done < juLogFile
|
---|
| 554 | +#}}}
|
---|
| 555 |
|
---|
| 556 | Property changes on: ../trunk-jpl/jenkins/jenkins.sh
|
---|
| 557 | ___________________________________________________________________
|
---|
| 558 | Name: svn:executable
|
---|
| 559 | + *
|
---|
| 560 |
|
---|
| 561 | Index: ../trunk-jpl/jenkins/linux64_larsen
|
---|
| 562 | ===================================================================
|
---|
| 563 | --- ../trunk-jpl/jenkins/linux64_larsen (revision 0)
|
---|
| 564 | +++ ../trunk-jpl/jenkins/linux64_larsen (revision 16616)
|
---|
| 565 | @@ -0,0 +1,106 @@
|
---|
| 566 | +#
|
---|
| 567 | +########### Configuration file for Eric Larour's Jenkins run on Murdo ############
|
---|
| 568 | +
|
---|
| 569 | +#-------------------------------#
|
---|
| 570 | +# 1: ISSM general configuration #
|
---|
| 571 | +#-------------------------------#
|
---|
| 572 | +
|
---|
| 573 | +#Nightly run name
|
---|
| 574 | +NAME="ISSM matlab tests on Linux64 (murdo)"
|
---|
| 575 | +
|
---|
| 576 | +#ISSM Architecture
|
---|
| 577 | +ISSM_ARCH="linux-gnu-amd64"
|
---|
| 578 | +
|
---|
| 579 | +#ISSM CONFIGURATION
|
---|
| 580 | +ISSM_CONFIG='--prefix=$ISSM_DIR\
|
---|
| 581 | + --with-matlab-dir=$MATLAB_DIR \
|
---|
| 582 | + --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
|
---|
| 583 | + --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
|
---|
| 584 | + --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \
|
---|
| 585 | + --with-mpi-libflags="-L$ISSM_DIR/externalpackages/mpich/install/lib/ -lmpich" \
|
---|
| 586 | + --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
|
---|
| 587 | + --with-petsc-arch=$ISSM_ARCH \
|
---|
| 588 | + --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
|
---|
| 589 | + --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
|
---|
| 590 | + --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \
|
---|
| 591 | + --with-numthreads=18 \
|
---|
| 592 | + --with-cxxoptflags="-mtune=barcelona -ffast-math -O3 -msse4.2 -Wno-write-strings "\
|
---|
| 593 | + --with-graphics-lib="/usr/lib/x86_64-linux-gnu/libX11.so" \
|
---|
| 594 | + --with-tao-dir=$ISSM_DIR/externalpackages/tao/install \
|
---|
| 595 | + --enable-debugging '
|
---|
| 596 | +
|
---|
| 597 | +#MATLAB path
|
---|
| 598 | +MATLAB_PATH="/usr/local/matlab80/"
|
---|
| 599 | +
|
---|
| 600 | +#PYTHON and MATLAB testing
|
---|
| 601 | +MATLAB_TEST=1
|
---|
| 602 | +PYTHON_TEST=0
|
---|
| 603 | +
|
---|
| 604 | +#execution path used for parallel runs
|
---|
| 605 | +EXECUTION_PATH=$ISSM_DIR/execution
|
---|
| 606 | +
|
---|
| 607 | +#-----------------------------------#
|
---|
| 608 | +# 3: External packages installation #
|
---|
| 609 | +#-----------------------------------#
|
---|
| 610 | +
|
---|
| 611 | +#ISSM_EXTERNALPACKAGES can have 3 values:
|
---|
| 612 | +# - "install" install all external packages listed below
|
---|
| 613 | +# - "copy" copy existing directories (EXTERNALPACKAGESDIR)
|
---|
| 614 | +# - "none" leave external packages as is
|
---|
| 615 | +# ->skip to section 4
|
---|
| 616 | +ISSM_EXTERNALPACKAGES="install"
|
---|
| 617 | +EXTERNALPACKAGESDIR=$ISSM_DIR/externalpackages
|
---|
| 618 | +
|
---|
| 619 | +#List of external pakages to be installed and their installation scripts
|
---|
| 620 | +EXTERNALPACKAGES="autotools install.sh
|
---|
| 621 | + matlab install.sh
|
---|
| 622 | + mpich install-3.0-linux64.sh
|
---|
| 623 | + cmake install.sh
|
---|
| 624 | + petsc install-3.4-linux64.sh
|
---|
| 625 | + triangle install-linux64.sh
|
---|
| 626 | + boost install.sh
|
---|
| 627 | + dakota install-5.3.1-linux64.sh
|
---|
| 628 | + tao install-2.2.sh
|
---|
| 629 | + chaco install.sh
|
---|
| 630 | + shell2junit install.sh"
|
---|
| 631 | +
|
---|
| 632 | +#---------------------#
|
---|
| 633 | +# 4: ISSM Compilation #
|
---|
| 634 | +#---------------------#
|
---|
| 635 | +
|
---|
| 636 | +#ISSM_COMPILATION can have 2 values:
|
---|
| 637 | +# - "yes" compile ISSM
|
---|
| 638 | +# - "no" do not compile ISSM
|
---|
| 639 | +ISSM_COMPILATION="yes"
|
---|
| 640 | +
|
---|
| 641 | +#----------------------#
|
---|
| 642 | +# 5: Mail notification #
|
---|
| 643 | +#----------------------#
|
---|
| 644 | +
|
---|
| 645 | +#Mail delivery. If SKIPMAIL="no", the html nightly run report will be
|
---|
| 646 | +#sent to the adresses present in $ISSM_DIR/cron/mailinglist.
|
---|
| 647 | +SKIPMAIL="no"
|
---|
| 648 | +
|
---|
| 649 | +#Sender email address
|
---|
| 650 | +EMAIL_ADRESS="eric.larour@jpl.nasa.gov"
|
---|
| 651 | +
|
---|
| 652 | +#Mailing list
|
---|
| 653 | +MAILINGLIST="eric.larour@jpl.nasa.gov"
|
---|
| 654 | +
|
---|
| 655 | +#------------------------#
|
---|
| 656 | +# 6: Nightly run options #
|
---|
| 657 | +#------------------------#
|
---|
| 658 | +
|
---|
| 659 | +#number of cpus used in ISSM installation and compilation (one is usually
|
---|
| 660 | +#safer as some packages are very sensitive to parallel compilation)
|
---|
| 661 | +NUMCPUS_INSTALL=8
|
---|
| 662 | +
|
---|
| 663 | +#number of cpus used in the nightly runs.
|
---|
| 664 | +NUMCPUS_RUN=8
|
---|
| 665 | +
|
---|
| 666 | +#Nightly run options. The matlab routine runme.m will be called
|
---|
| 667 | +#as follows: runme($MATLAB_NROPTIONS). The options must be understandable
|
---|
| 668 | +#by Matlab and runme.m
|
---|
| 669 | +#ex: "'id',[101 102 103]"
|
---|
| 670 | +MATLAB_NROPTIONS=""
|
---|
| 671 | +PYTHON_NROPTIONS=""
|
---|
| 672 |
|
---|
| 673 | Property changes on: ../trunk-jpl/jenkins/linux64_larsen
|
---|
| 674 | ___________________________________________________________________
|
---|
| 675 | Name: svn:executable
|
---|
| 676 | + *
|
---|
| 677 |
|
---|