Changeset 18398


Ignore:
Timestamp:
08/15/14 10:03:09 (11 years ago)
Author:
Mathieu Morlighem
Message:

CHG: simplifying jenkins script and removed some AC macros to see if it works

Location:
issm/trunk-jpl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/configure.ac

    r18372 r18398  
    1414AC_PROG_F77([ifort g77 gfortran])
    1515
    16 AC_F77_LIBRARY_LDFLAGS
     16#AC_F77_LIBRARY_LDFLAGS
    1717
    1818#Libraries and linking
    19 AC_PATH_XTRA      #figure out X library and include paths
     19#AC_PATH_XTRA      #figure out X library and include paths
    2020
    2121#AUTOMAKE
  • issm/trunk-jpl/jenkins/imac-012301-gil

    r18387 r18398  
    1313        --with-matlab-dir=$MATLAB_DIR \
    1414        --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
    15         --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
    1615        --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include  \
    17         --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 " \
    18         --with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \
    19         --with-math-lib="/usr/lib/libm.dylib" \
    20         --with-graphics-lib="/usr/X11/lib/libX11.dylib" \
    21         --with-numthreads=8 \
     16        --with-mpi-libflags="-L$ISSM_DIR/externalpackages/mpich/install/lib -lpmpich -lmpich -lmpl" \
    2217        --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
    23         --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
    2418        --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
    2519        --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \
     20        --with-metis-dir=$ISSM_DIR/externalpackages/petsc/install \
     21        --with-numthreads=8 \
     22        --enable-debugging \
    2623        --enable-development'
    2724
     
    6057                                                shell2junit  install.sh "
    6158
    62 
    6359#---------------------#
    6460# 4: ISSM Compilation #
     
    7066ISSM_COMPILATION="yes"
    7167
    72 #----------------------#
    73 # 5: Mail notification #
    74 #----------------------#
    75 
    76 #Mail delivery. If SKIPMAIL="no", the html nightly run report will be
    77 #sent to the adresses present in $ISSM_DIR/cron/mailinglist.
    78 SKIPMAIL="no"
    79 
    80 #Sender email address
    81 EMAIL_ADRESS="eric.larour@jpl.nasa.gov"
    82 
    83 #Mailing list
    84 MAILINGLIST="eric.larour@jpl.nasa.gov"
    85 
    8668#------------------------#
    87 # 6: Nightly run options #
     69# 5: Nightly run options #
    8870#------------------------#
    8971
  • issm/trunk-jpl/jenkins/jenkins.sh

    r17410 r18398  
    33#It then processes the results and sends an email to the Ice developpers.
    44
    5 #some functions
    6 function timer() #{{{
    7 {
    8         if [[ $# -eq 0 ]]; then
    9                 echo $(date '+%s')
    10         else
    11                 local  stime=$1
    12                 etime=$(date '+%s')
    13 
    14                 if [[ -z "$stime" ]]; then stime=$etime; fi
    15 
    16                 dt=$((etime - stime))
    17                 ds=$((dt % 60))
    18                 dm=$(((dt / 60) % 60))
    19                 dh=$((dt / 3600))
    20                 printf '%d:%02d:%02d' $dh $dm $ds
    21         fi
    22 } #}}}
    23 function todaydate() #{{{
    24 {
    25         suffix=`date | awk '{printf("%s-%s-%s  %s",$2,$3,$6,$4);}'`                     
    26         echo $suffix;                   
    27 } #}}}
    28 function host_name() #{{{
    29 {
    30         #return host name depending on the OS
    31         if [ "$1" = "win7" ]
    32         then
    33                 HOST_NAME=`hostname | sed 's/-//g'`;
    34         else
    35                 HOST_NAME=`hostname -s | sed 's/-//g'`;
    36         fi
    37         echo $HOST_NAME;
    38 } #}}}
    39 function pause() #{{{
    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 #}}}
    49 
    505#Get configuration
    516#Source config file{{{
     
    6318source $1;
    6419#}}}
    65 #Initialize variables {{{
    66 TODAY=$(todaydate);
     20#Get Operating system (OS) name{{{
    6721OS=$(uname -s)
    6822if [[ $OS == "CYGWIN_NT-6.1-WOW64" ]]; then
    6923        OS="win7";
    7024fi
    71 HOST_NAME=$(host_name $OS);
    72 START_TIME=$(timer);
    73 ISSM_RELEASE=$(basename $(echo $REPOSITORY));
    74 USER=$(whoami);
    75 INIT_PATH=$(pwd);
    7625#}}}
    7726
     
    212161rm -rf $ISSM_DIR/execution/*
    213162
    214 #Prepare info.log
    215 #{{{
    216 rm -rf $ISSM_DIR/nightlylog
    217 mkdir  $ISSM_DIR/nightlylog
    218 INSTALL_TIME=$(timer)
    219 ELAPSED=$(timer $START_TIME)
    220 VERSION=$(svnversion $ISSM_DIR)
    221 cat << END > $ISSM_DIR/nightlylog/info.log
    222 name:      $(echo $NAME)
    223 today:     $(echo $TODAY)
    224 user:      $(echo $USER)
    225 host:      $(echo $HOST_NAME)
    226 OS:        $(echo $OS)
    227 release:   $(echo $ISSM_RELEASE)
    228 init_path: $(echo $INIT_PATH)
    229 is_matlab: $(echo $MATLAB_TEST)
    230 is_python: $(echo $PYTHON_TEST)
    231 elapsed_install: $(echo $ELAPSED)
    232 version: $(echo $VERSION)
    233 END
    234 #}}}
    235 
    236163#matlab tests
    237164if [ $MATLAB_TEST -eq 1 ]; then
    238165#Launch all tests on different cpus {{{
    239 MATLAB_START_TIME=$(timer);
    240166for (( i=1;i<=$NUMCPUS_RUN;i++ ))
    241167do
    242168        #Launch matlab and the nightly run script
    243169        cat > $ISSM_DIR/nightlylog/matlab_run$i.m << EOF
    244         warning off %necessary to avoid a info.log of several Go for parallel runs
     170        warning off %necessary to avoid a log of several Go for parallel runs
    245171        try,
    246172        $(if [ "$MATLAB_NROPTIONS" = ""  ]
     
    269195#wait until matlab closes
    270196if [ "$OS" = "win7" ]; then
    271         pause MATLAB
     197        pid=$(ps aux -W | grep MATLAB | awk '{printf("%s\n",MATLAB);}')
     198
     199        while [ -n "$pid" ]
     200        do
     201                pid=$(ps aux -W | grep MATLAB | awk '{printf("%s\n",MATLAB);}')
     202        done
    272203else
    273204        wait
     
    284215#filter out windows characters:
    285216cat matlab_log.log | tr -cd '\11\12\40-\176' > matlab_log.log2 && mv matlab_log.log2 matlab_log.log
    286 
    287 #}}}
    288 #Complete info.log {{{
    289 if [ $(cat matlab_log.log | grep "MATLABEXITEDCORRECTLY" | wc -l) -eq $NUMCPUS_RUN ]
    290 then
    291         MATLABCRASH=0
    292 else
    293         MATLABCRASH=1
    294 fi
    295 ELAPSED=$(timer $MATLAB_START_TIME)
    296 cat << END >>  $ISSM_DIR/nightlylog/info.log
    297 elapsed_matlab: $(echo $ELAPSED)
    298 matlab_crash:   $(echo $MATLABCRASH)
    299 END
    300217#}}}
    301218fi
     
    312229done
    313230
    314 #wait until python closes
    315 if [ "$OS" = "win7" ]; then
    316         pause MATLAB
    317 else
    318         wait
    319 fi
    320 
    321231#concatenate reports
    322232cd $ISSM_DIR/nightlylog/
     
    327237done
    328238#}}}
    329 #Complete info.log {{{
    330 if [ $(cat python_log.log | grep "PYTHONEXITEDCORRECTLY" | wc -l) -eq $NUMCPUS_RUN ]
    331 then
    332         PYTHONCRASH=0
    333 else
    334         PYTHONCRASH=1
    335 fi
    336 ELAPSED=$(timer $PYTHON_START_TIME)
    337 cat << END >>  $ISSM_DIR/nightlylog/info.log
    338 elapsed_python: $(echo $ELAPSED)
    339 python_crash:   $(echo $PYTHONCRASH)
    340 END
    341 #}}}
    342 fi
    343 
    344 #complete info.log
    345 #{{{
    346 ELAPSED=$(timer $START_TIME)
    347 cat << END >>  $ISSM_DIR/nightlylog/info.log
    348 elapsed_total:  $(echo $ELAPSED)
    349 END
    350 #}}}
     239fi
    351240
    352241#process logs to be junit compatible
Note: See TracChangeset for help on using the changeset viewer.