Index: ../trunk-jpl/jenkins/linux64_murdo =================================================================== --- ../trunk-jpl/jenkins/linux64_murdo (revision 0) +++ ../trunk-jpl/jenkins/linux64_murdo (revision 16616) @@ -0,0 +1,106 @@ +# +########### Configuration file for Eric Larour's Jenkins run on Murdo ############ + +#-------------------------------# +# 1: ISSM general configuration # +#-------------------------------# + +#Nightly run name +NAME="ISSM matlab tests on Linux64 (murdo)" + +#ISSM Architecture +ISSM_ARCH="linux-gnu-amd64" + +#ISSM CONFIGURATION +ISSM_CONFIG='--prefix=$ISSM_DIR\ + --with-matlab-dir=$MATLAB_DIR \ + --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ + --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ + --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \ + --with-mpi-libflags="-L$ISSM_DIR/externalpackages/mpich/install/lib/ -lmpich" \ + --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ + --with-petsc-arch=$ISSM_ARCH \ + --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ + --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ + --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \ + --with-numthreads=18 \ + --with-cxxoptflags="-mtune=barcelona -ffast-math -O3 -msse4.2 -Wno-write-strings "\ + --with-graphics-lib="/usr/lib/x86_64-linux-gnu/libX11.so" \ + --with-tao-dir=$ISSM_DIR/externalpackages/tao/install \ + --enable-debugging ' + +#MATLAB path +MATLAB_PATH="/usr/local/matlab80/" + +#PYTHON and MATLAB testing +MATLAB_TEST=1 +PYTHON_TEST=0 + +#execution path used for parallel runs +EXECUTION_PATH=$ISSM_DIR/execution + +#-----------------------------------# +# 3: External packages installation # +#-----------------------------------# + +#ISSM_EXTERNALPACKAGES can have 3 values: +# - "install" install all external packages listed below +# - "copy" copy existing directories (EXTERNALPACKAGESDIR) +# - "none" leave external packages as is +# ->skip to section 4 +ISSM_EXTERNALPACKAGES="install" +EXTERNALPACKAGESDIR=$ISSM_DIR/externalpackages + +#List of external pakages to be installed and their installation scripts +EXTERNALPACKAGES="autotools install.sh + matlab install.sh + mpich install-3.0-linux64.sh + cmake install.sh + petsc install-3.4-linux64.sh + triangle install-linux64.sh + boost install.sh + dakota install-5.3.1-linux64.sh + tao install-2.2.sh + chaco install.sh + shell2junit install.sh" + +#---------------------# +# 4: ISSM Compilation # +#---------------------# + +#ISSM_COMPILATION can have 2 values: +# - "yes" compile ISSM +# - "no" do not compile ISSM +ISSM_COMPILATION="yes" + +#----------------------# +# 5: Mail notification # +#----------------------# + +#Mail delivery. If SKIPMAIL="no", the html nightly run report will be +#sent to the adresses present in $ISSM_DIR/cron/mailinglist. +SKIPMAIL="no" + +#Sender email address +EMAIL_ADRESS="eric.larour@jpl.nasa.gov" + +#Mailing list +MAILINGLIST="eric.larour@jpl.nasa.gov" + +#------------------------# +# 6: Nightly run options # +#------------------------# + +#number of cpus used in ISSM installation and compilation (one is usually +#safer as some packages are very sensitive to parallel compilation) +NUMCPUS_INSTALL=8 + +#number of cpus used in the nightly runs. +NUMCPUS_RUN=8 + +#Nightly run options. The matlab routine runme.m will be called +#as follows: runme($MATLAB_NROPTIONS). The options must be understandable +#by Matlab and runme.m +#ex: "'id',[101 102 103]" +MATLAB_NROPTIONS="" +PYTHON_NROPTIONS="" Property changes on: ../trunk-jpl/jenkins/linux64_murdo ___________________________________________________________________ Name: svn:executable + * Index: ../trunk-jpl/jenkins/imac =================================================================== --- ../trunk-jpl/jenkins/imac (revision 0) +++ ../trunk-jpl/jenkins/imac (revision 16616) @@ -0,0 +1,105 @@ +# +########### Configuration file for Eric Larour's Jenkins run on MaxOSX ############ + +#-------------------------------# +# 1: ISSM general configuration # +#-------------------------------# + +#Nightly run name +NAME="ISSM matlab tests on MacOSX" + +#ISSM Architecture +ISSM_ARCH="macosx-gnu" + +#ISSM CONFIGURATION +ISSM_CONFIG='--prefix=$ISSM_DIR \ + --with-matlab-dir=$MATLAB_DIR \ + --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ + --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ + --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \ + --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 " \ + --with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \ + --with-math-lib="/usr/lib/libm.dylib" \ + --with-graphics-lib="/usr/X11/lib/libX11.dylib" \ + --with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5 -O3 -DNDEBUG -w "\ + --with-numthreads=8 \ + --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ + --with-petsc-arch=$ISSM_ARCH \ + --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ + --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ + --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \ + --with-tao-dir=$ISSM_DIR/externalpackages/tao/install' + +#MATLAB path +MATLAB_PATH="/Applications/MATLAB_R2011b.app/" + +#PYTHON and MATLAB testing +MATLAB_TEST=1 +PYTHON_TEST=0 + +#execution path used for parallel runs +EXECUTION_PATH=$ISSM_DIR/execution + +#-----------------------------------# +# 3: External packages installation # +#-----------------------------------# + +#ISSM_EXTERNALPACKAGES can have 3 values: +# - "install" install all external packages listed below +# - "copy" copy existing directories (EXTERNALPACKAGESDIR) +# - "none" leave external packages as is +# ->skip to section 4 +ISSM_EXTERNALPACKAGES="install" +EXTERNALPACKAGESDIR=$ISSM_DIR/externalpackages + +#List of external pakages to be installed and their installation scripts +EXTERNALPACKAGES="autotools install.sh + matlab install.sh + mpich install-3.0-macosx64.sh + cmake install.sh + petsc install-3.4-macosx64.sh + tao install-2.2.sh + triangle install-macosx64.sh + shell2junit install.sh " + + +#---------------------# +# 4: ISSM Compilation # +#---------------------# + +#ISSM_COMPILATION can have 2 values: +# - "yes" compile ISSM +# - "no" do not compile ISSM +ISSM_COMPILATION="yes" + +#----------------------# +# 5: Mail notification # +#----------------------# + +#Mail delivery. If SKIPMAIL="no", the html nightly run report will be +#sent to the adresses present in $ISSM_DIR/cron/mailinglist. +SKIPMAIL="no" + +#Sender email address +EMAIL_ADRESS="eric.larour@jpl.nasa.gov" + +#Mailing list +MAILINGLIST="eric.larour@jpl.nasa.gov" + +#------------------------# +# 6: Nightly run options # +#------------------------# + +#number of cpus used in ISSM installation and compilation (one is usually +#safer as some packages are very sensitive to parallel compilation) +NUMCPUS_INSTALL=8 + +#number of cpus used in the nightly runs. +NUMCPUS_RUN=1 + +#Nightly run options. The matlab routine runme.m will be called +#as follows: runme($MATLAB_NROPTIONS). The options must be understandable +#by Matlab and runme.m +#ex: "'id',[101 102 103]" +MATLAB_NROPTIONS="" +PYTHON_NROPTIONS="" Property changes on: ../trunk-jpl/jenkins/imac ___________________________________________________________________ Name: svn:executable + * Index: ../trunk-jpl/jenkins/jenkins.sh =================================================================== --- ../trunk-jpl/jenkins/jenkins.sh (revision 0) +++ ../trunk-jpl/jenkins/jenkins.sh (revision 16616) @@ -0,0 +1,316 @@ +#!/bin/bash +#This bash script calls the nightlyrun.m matlab file to run our nightly test decks. +#It then processes the results and sends an email to the Ice developpers. + +#some functions +function timer() #{{{ +{ + if [[ $# -eq 0 ]]; then + echo $(date '+%s') + else + local stime=$1 + etime=$(date '+%s') + + if [[ -z "$stime" ]]; then stime=$etime; fi + + dt=$((etime - stime)) + ds=$((dt % 60)) + dm=$(((dt / 60) % 60)) + dh=$((dt / 3600)) + printf '%d:%02d:%02d' $dh $dm $ds + fi +} #}}} +function todaydate() #{{{ +{ + suffix=`date | awk '{printf("%s-%s-%s %s",$2,$3,$6,$4);}'` + echo $suffix; +} #}}} +function host_name() #{{{ +{ + #return host name depending on the OS + if [ "$1" = "win7" ] + then + HOST_NAME=`hostname | sed 's/-//g'`; + else + HOST_NAME=`hostname -s | sed 's/-//g'`; + fi + echo $HOST_NAME; +} #}}} +function pause() #{{{ +{ +pid=`ps aux -W | grep $1 | awk '{printf("%s\n",$1);}'` + +while [ -n "$pid" ] +do + pid=`ps aux -W | grep $1 | awk '{printf("%s\n",$1);}'` +done +} +#}}} + +#Get configuration +#Source config file{{{ +if [ $# -ne 1 ]; +then + #no config file specified: exit + echo "no config file specified. Exiting..." >&2 # Error message to stderr. + exit 1 +fi +if [ ! -f "$1" ] +then + echo "File $1 not found!" >&2 # Error message to stderr. + exit 1 +fi +source $1; +#}}} +#Initialize variables {{{ +TODAY=$(todaydate); +HOST_NAME=$(host_name $OS); +OS=$(uname -s) +START_TIME=$(timer); +ISSM_RELEASE=$(basename $(echo $REPOSITORY)); +USER=$(whoami); +INIT_PATH=$(pwd); +#}}} + +#Installation ISSM +#create matlab's installation sript {{{ +cat << END > $ISSM_DIR/externalpackages/matlab/install.sh +#!/bin/bash +rm -rf install +ln -s $MATLAB_PATH install +END +#}}} +#install/copy/none external packages (ISSM_EXTERNALPACKAGES){{{ +if [ "$ISSM_EXTERNALPACKAGES" == "install" ] +then + + cd $ISSM_DIR/externalpackages + + #number of packages: + NUMPACKAGES=$(($(echo $EXTERNALPACKAGES | wc -w )/2)) + + for ((i=1;i<=$NUMPACKAGES;i++)) + do + NUM1=$((2*$i-1)) + NUM2=$((2*$i)) + PACKAGENAME=$(echo $EXTERNALPACKAGES | cut -d " " -f $NUM1-$NUM1) + PACKAGEINST=$(echo $EXTERNALPACKAGES | cut -d " " -f $NUM2-$NUM2) + + cd $PACKAGENAME + echo "======================================================"; + echo " Installing $PACKAGENAME "; + echo "======================================================"; + ./$PACKAGEINST | tee compil.log + if [ $? -ne 0 ]; then + echo "======================================================"; + echo " ERROR: installation of $PACKAGENAME failed "; + echo "======================================================"; + fi + source $ISSM_DIR/etc/environment.sh + cd .. + done + +elif [ "$ISSM_EXTERNALPACKAGES" == "copy" ] +then + cd $ISSM_DIR + rm -rf externalpackages + cp -Rf $EXTERNALPACKAGESDIR ./ +elif [ "$ISSM_EXTERNALPACKAGES" == "link" ] +then + cd $ISSM_DIR + rm -rf externalpackages + ln -s $EXTERNALPACKAGESDIR . +elif [ "$ISSM_EXTERNALPACKAGES" == "none" ] +then + echo "Skipping external packages installation" +else + echo "ISSM_EXTERNALPACKAGES supported values are: install, copy and none. Exiting..." >&2 # Error message to stderr. + exit 1 +fi +source $ISSM_DIR/etc/environment.sh +#}}} +#ISSM compilation yes/no (ISSM_COMPILATION) {{{ +if [ "$ISSM_COMPILATION" == "yes" ] +then + cd $ISSM_DIR + make uninstall + make clean + make distclean + ./scripts/automakererun.sh + cat > configure.sh << EOF +./configure $ISSM_CONFIG +EOF + chmod 700 configure.sh + ./configure.sh + + #4: compile and install ISSM + if [ $NUMCPUS_INSTALL -gt 1 ] + then + echo "Making with " $NUMCPUS_INSTALL " cpus" + make -j $NUMCPUS_INSTALL install + else + make install + fi +elif [ "$ISSM_COMPILATION" == "no" ] +then + echo "Skipping ISSM compilation" +else + echo "ISSM_COMPILATION supported values are: yes and no. Exiting..." >&2 # Error message to stderr. + exit 1 +fi +#}}} + +#shell2junit {{{ +source $ISSM_DIR/externalpackages/shell2junit/install/sh2ju.sh +#}}} + +#Prepare info.log +#{{{ +rm -rf $ISSM_DIR/nightlylog +mkdir $ISSM_DIR/nightlylog +INSTALL_TIME=$(timer) +ELAPSED=$(timer $START_TIME) +VERSION=$(svnversion $ISSM_DIR) +cat << END > $ISSM_DIR/nightlylog/info.log +name: $(echo $NAME) +today: $(echo $TODAY) +user: $(echo $USER) +host: $(echo $HOST_NAME) +OS: $(echo $OS) +release: $(echo $ISSM_RELEASE) +init_path: $(echo $INIT_PATH) +is_matlab: $(echo $MATLAB_TEST) +is_python: $(echo $PYTHON_TEST) +elapsed_install: $(echo $ELAPSED) +version: $(echo $VERSION) +END +#}}} + +#matlab tests +if [ $MATLAB_TEST -eq 1 ]; then +#Launch all tests on different cpus {{{ +MATLAB_START_TIME=$(timer); +for (( i=1;i<=$NUMCPUS_RUN;i++ )) +do + #Launch matlab and the nightly run script + cat > $ISSM_DIR/nightlylog/matlab_run$i.m << EOF + warning off %necessary to avoid a info.log of several Go for parallel runs + try, + $(if [ "$MATLAB_NROPTIONS" = "" ] + then + echo "runme('output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);" + else + echo "runme($MATLAB_NROPTIONS,'output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);" + fi + ) + catch me, + %An error occured, get report and exit + message=getReport(me) + directory=strsplit(pwd,'/'); + fid=fopen([issmdir '/nightlylog/matlaberror.log'], 'at'); + fprintf(fid,'\nMatlab error occured in: %s\n\n',directory{end}); + fprintf(fid,'%s',message); + fclose(fid); + end + disp('MATLABEXITEDCORRECTLY'); + exit +EOF + cd $ISSM_DIR/test/NightlyRun + 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 & +done + +#wait until matlab closes +if [ "$OS" = "win7" ]; then + pause MATLAB +else + wait +fi + +#concatenate reports +cd $ISSM_DIR/nightlylog/ +rm matlab_log.log +for (( i=1;i<=$NUMCPUS_RUN;i++ )) +do + cat matlab_log$i.log >> matlab_log.log +done + +#filter out windows characters: +cat matlab_log.log | tr -cd '\11\12\40-\176' > matlab_log.log2 && mv matlab_log.log2 matlab_log.log + +#}}} +#Complete info.log {{{ +if [ $(cat matlab_log.log | grep "MATLABEXITEDCORRECTLY" | wc -l) -eq $NUMCPUS_RUN ] +then + MATLABCRASH=0 +else + MATLABCRASH=1 +fi +ELAPSED=$(timer $MATLAB_START_TIME) +cat << END >> $ISSM_DIR/nightlylog/info.log +elapsed_matlab: $(echo $ELAPSED) +matlab_crash: $(echo $MATLABCRASH) +END +#}}} +fi + +#python tests +if [ $PYTHON_TEST -eq 1 ]; then +#Launch all tests on different cpus {{{ +PYTHON_START_TIME=$(timer); +export PYTHONSTARTUP=$ISSM_DIR/src/m/dev/devpath.py +for (( i=1;i<=$NUMCPUS_RUN;i++ )) +do + cd $ISSM_DIR/test/NightlyRun + ./runme.py --output=nightly --rank=$i --numprocs=$NUMCPUS_RUN $PYTHON_NROPTIONS 2>&1 > $ISSM_DIR/nightlylog/python_log$i.log & +done + +#wait until python closes +if [ "$OS" = "win7" ]; then + pause MATLAB +else + wait +fi + +#concatenate reports +cd $ISSM_DIR/nightlylog/ +rm python_log.log +for (( i=1;i<=$NUMCPUS_RUN;i++ )) +do + cat python_log$i.log >> python_log.log +done +#}}} +#Complete info.log {{{ +if [ $(cat python_log.log | grep "PYTHONEXITEDCORRECTLY" | wc -l) -eq $NUMCPUS_RUN ] +then + PYTHONCRASH=0 +else + PYTHONCRASH=1 +fi +ELAPSED=$(timer $PYTHON_START_TIME) +cat << END >> $ISSM_DIR/nightlylog/info.log +elapsed_python: $(echo $ELAPSED) +python_crash: $(echo $PYTHONCRASH) +END +#}}} +fi + +#complete info.log +#{{{ +ELAPSED=$(timer $START_TIME) +cat << END >> $ISSM_DIR/nightlylog/info.log +elapsed_total: $(echo $ELAPSED) +END +#}}} + +#process logs to be junit compatible +#{{{ +cd $ISSM_DIR/nightlylog/ +juLogClean + +rm -rf juLogFile && cat matlab_log.log | grep "test id" > juLogFile + +while read i; do + juLog -name=Error -error=ERROR echo $i + juLog -name=Failure -error=FAILURE echo $i +done < juLogFile +#}}} Property changes on: ../trunk-jpl/jenkins/jenkins.sh ___________________________________________________________________ Name: svn:executable + * Index: ../trunk-jpl/jenkins/linux64_larsen =================================================================== --- ../trunk-jpl/jenkins/linux64_larsen (revision 0) +++ ../trunk-jpl/jenkins/linux64_larsen (revision 16616) @@ -0,0 +1,106 @@ +# +########### Configuration file for Eric Larour's Jenkins run on Murdo ############ + +#-------------------------------# +# 1: ISSM general configuration # +#-------------------------------# + +#Nightly run name +NAME="ISSM matlab tests on Linux64 (murdo)" + +#ISSM Architecture +ISSM_ARCH="linux-gnu-amd64" + +#ISSM CONFIGURATION +ISSM_CONFIG='--prefix=$ISSM_DIR\ + --with-matlab-dir=$MATLAB_DIR \ + --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ + --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ + --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \ + --with-mpi-libflags="-L$ISSM_DIR/externalpackages/mpich/install/lib/ -lmpich" \ + --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ + --with-petsc-arch=$ISSM_ARCH \ + --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ + --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ + --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \ + --with-numthreads=18 \ + --with-cxxoptflags="-mtune=barcelona -ffast-math -O3 -msse4.2 -Wno-write-strings "\ + --with-graphics-lib="/usr/lib/x86_64-linux-gnu/libX11.so" \ + --with-tao-dir=$ISSM_DIR/externalpackages/tao/install \ + --enable-debugging ' + +#MATLAB path +MATLAB_PATH="/usr/local/matlab80/" + +#PYTHON and MATLAB testing +MATLAB_TEST=1 +PYTHON_TEST=0 + +#execution path used for parallel runs +EXECUTION_PATH=$ISSM_DIR/execution + +#-----------------------------------# +# 3: External packages installation # +#-----------------------------------# + +#ISSM_EXTERNALPACKAGES can have 3 values: +# - "install" install all external packages listed below +# - "copy" copy existing directories (EXTERNALPACKAGESDIR) +# - "none" leave external packages as is +# ->skip to section 4 +ISSM_EXTERNALPACKAGES="install" +EXTERNALPACKAGESDIR=$ISSM_DIR/externalpackages + +#List of external pakages to be installed and their installation scripts +EXTERNALPACKAGES="autotools install.sh + matlab install.sh + mpich install-3.0-linux64.sh + cmake install.sh + petsc install-3.4-linux64.sh + triangle install-linux64.sh + boost install.sh + dakota install-5.3.1-linux64.sh + tao install-2.2.sh + chaco install.sh + shell2junit install.sh" + +#---------------------# +# 4: ISSM Compilation # +#---------------------# + +#ISSM_COMPILATION can have 2 values: +# - "yes" compile ISSM +# - "no" do not compile ISSM +ISSM_COMPILATION="yes" + +#----------------------# +# 5: Mail notification # +#----------------------# + +#Mail delivery. If SKIPMAIL="no", the html nightly run report will be +#sent to the adresses present in $ISSM_DIR/cron/mailinglist. +SKIPMAIL="no" + +#Sender email address +EMAIL_ADRESS="eric.larour@jpl.nasa.gov" + +#Mailing list +MAILINGLIST="eric.larour@jpl.nasa.gov" + +#------------------------# +# 6: Nightly run options # +#------------------------# + +#number of cpus used in ISSM installation and compilation (one is usually +#safer as some packages are very sensitive to parallel compilation) +NUMCPUS_INSTALL=8 + +#number of cpus used in the nightly runs. +NUMCPUS_RUN=8 + +#Nightly run options. The matlab routine runme.m will be called +#as follows: runme($MATLAB_NROPTIONS). The options must be understandable +#by Matlab and runme.m +#ex: "'id',[101 102 103]" +MATLAB_NROPTIONS="" +PYTHON_NROPTIONS="" Property changes on: ../trunk-jpl/jenkins/linux64_larsen ___________________________________________________________________ Name: svn:executable + *