source: issm/oecreview/Archive/24684-25833/ISSM-25243-25244.diff@ 25834

Last change on this file since 25834 was 25834, checked in by Mathieu Morlighem, 4 years ago

CHG: added 24684-25833

File size: 18.4 KB
  • ../trunk-jpl/packagers/linux/package-issm-linux-binaries.sh

     
    11#!/bin/bash
    22
    33
     4# Script to test, package, and transfer distributable to ISSM Web site.
     5# Corresponds with build generated by configuration in
     6# $ISSM_DIR/jenkins/ross-debian_linux-binaries.
     7#
     8
    49## Constants
    510#
    611LIBGFORTRAN="/usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0" # Important that this is the library itself
     
    1116TARBALL_NAME="issm-linux"
    1217TARBALL="${TARBALL_NAME}.tar.gz"
    1318
     19## Environment
     20#
     21export PATH="${ISSM_DIR}/bin:$(getconf PATH)" # Ensure that we pick up binaries from 'bin' directory rather than 'externalpackages'
     22
    1423# Check if MATLAB exists
    1524if ! [ -d ${MATLAB_PATH} ]; then
    1625        echo "${MATLAB_PATH} does not point to a MATLAB installation! Please modify MATLAB_PATH variable in $(basename $0) and try again."
     
    5867
    5968# Check that MATLAB did not exit in error
    6069matlabExitCode=`echo $?`
    61 matlabExitedInError=`grep -E "Activation cannot proceed|license" matlab.log | wc -l`
     70matlabExitedInError=`grep -E "Activation cannot proceed|license|Error" matlab.log | wc -l`
    6271
    6372if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
    6473        echo "----------MATLAB exited in error!----------"
  • ../trunk-jpl/packagers/linux/package-issm-linux-binaries-solid_earth.sh

     
    11#!/bin/bash
    22
    33
     4# Script to test, package, and transfer distributable to ISSM Web site.
     5# Corresponds with build generated by configuration in
     6# $ISSM_DIR/jenkins/ross-debian_linux-binaries-solid_earth.
     7#
     8
    49## Constants
    510#
    611LIBGFORTRAN="/usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0" # Important that this is the library itself
     
    1217TARBALL_NAME="issm-linux-solid_earth"
    1318TARBALL="${TARBALL_NAME}.tar.gz"
    1419
     20## Environment
     21#
     22export PATH="${ISSM_DIR}/bin:$(getconf PATH)" # Ensure that we pick up binaries from 'bin' directory rather than 'externalpackages'
     23
    1524# Check if MATLAB exists
    1625if ! [ -d ${MATLAB_PATH} ]; then
    1726        echo "${MATLAB_PATH} does not point to a MATLAB installation! Please modify MATLAB_PATH variable in $(basename $0) and try again."
     
    8796
    8897# Check that MATLAB did not exit in error
    8998matlabExitCode=`echo $?`
    90 matlabExitedInError=`grep -E "Activation cannot proceed|license" matlab.log | wc -l`
     99matlabExitedInError=`grep -E "Activation cannot proceed|license|Error" matlab.log | wc -l`
    91100
    92101if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
    93102        echo "----------MATLAB exited in error!----------"
  • ../trunk-jpl/packagers/linux/package-issm-linux-binaries-with_dakota.sh

     
    11#!/bin/bash
    22
    33
     4# Script to test, package, and transfer distributable to ISSM Web site.
     5# Corresponds with build generated by configuration in
     6# $ISSM_DIR/jenkins/ross-debian_linux-binaries-with_dakota.
     7#
     8
    49## Constants
    510#
    611LIBGFORTRAN="/usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0" # Important that this is the library itself
     
    1217TARBALL_NAME="issm-linux-with_dakota"
    1318TARBALL="${TARBALL_NAME}.tar.gz"
    1419
     20## Environment
     21#
     22export PATH="${ISSM_DIR}/bin:$(getconf PATH)" # Ensure that we pick up binaries from 'bin' directory rather than 'externalpackages'
     23
    1524# Check if MATLAB exists
    1625if ! [ -d ${MATLAB_PATH} ]; then
    1726        echo "${MATLAB_PATH} does not point to a MATLAB installation! Please modify MATLAB_PATH variable in $(basename $0) and try again."
     
    6170
    6271# Check that MATLAB did not exit in error
    6372matlabExitCode=`echo $?`
    64 matlabExitedInError=`grep -E "Activation cannot proceed|license" matlab.log | wc -l`
     73matlabExitedInError=`grep -E "Activation cannot proceed|license|Error" matlab.log | wc -l`
    6574
    6675if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
    6776        echo "----------MATLAB exited in error!----------"
  • ../trunk-jpl/packagers/mac/package-issm-mac-binaries-solid_earth.sh

     
     1#!/bin/bash
     2
     3
     4# Script to test, package, and transfer distributable to ISSM Web site.
     5# Corresponds with build generated by configuration in
     6# $ISSM_DIR/jenkins/pine_island-mac-binaries-solid_earth.
     7#
     8
     9## Constants
     10#
     11MATLAB_NROPTIONS="'benchmark','slr'"
     12MATLAB_PATH="/Applications/MATLAB_R2018a.app"
     13PACKAGE="ISSM-Solid_Earth" # Name of directory to copy distributable files to
     14PYTHON_NROPTIONS="--benchmark slr"
     15TARBALL_NAME="issm-linux-solid_earth"
     16TARBALL="${TARBALL_NAME}.tar.gz"
     17
     18## Environment
     19#
     20export PATH="${ISSM_DIR}/bin:$(getconf PATH)" # Ensure that we pick up binaries from 'bin' directory rather than 'externalpackages'
     21
     22# Check if MATLAB exists
     23if ! [ -d ${MATLAB_PATH} ]; then
     24        echo "${MATLAB_PATH} does not point to a MATLAB installation! Please modify MATLAB_PATH variable in $(basename $0) and try again."
     25        exit 1
     26fi
     27
     28# Clean up from previous packaging
     29echo "Cleaning up existing assets"
     30cd ${ISSM_DIR}
     31rm -rf ${PACKAGE}
     32mkdir ${PACKAGE}
     33
     34# Add/modify required binaries
     35cd ${ISSM_DIR}/bin
     36
     37echo "Modifying generic"
     38cat generic_static.m | sed -e "s/generic_static/generic/g" > generic.m
     39cat generic_static.py | sed -e "s/generic_static/generic/g" > generic.py
     40
     41echo "Moving MPICH binaries to bin/"
     42if [ -f ${ISSM_DIR}/externalpackages/petsc/install/bin/mpiexec ]; then
     43        cp ${ISSM_DIR}/externalpackages/petsc/install/bin/mpiexec .
     44        cp ${ISSM_DIR}/externalpackages/petsc/install/bin/hydra_pmi_proxy .
     45elif [ -f ${ISSM_DIR}/externalpackages/mpich/install/bin/mpiexec ]; then
     46        cp ${ISSM_DIR}/externalpackages/mpich/install/bin/mpiexec .
     47        cp ${ISSM_DIR}/externalpackages/mpich/install/bin/hydra_pmi_proxy .
     48else
     49        echo "MPICH not found"
     50        exit 1
     51fi
     52
     53echo "Moving GDAL binaries to bin/"
     54if [ -f ${ISSM_DIR}/externalpackages/gdal/install/bin/gdal-config ]; then
     55        cp ${ISSM_DIR}/externalpackages/gdal/install/bin/gdalsrsinfo .
     56        cp ${ISSM_DIR}/externalpackages/gdal/install/bin/gdaltransform .
     57else
     58        echo "GDAL not found"
     59        exit 1
     60fi
     61
     62echo "Moving GMT binaries to bin/"
     63if [ -f ${ISSM_DIR}/externalpackages/gmt/install/bin/gmt-config ]; then
     64        cp ${ISSM_DIR}/externalpackages/gmt/install/bin/gmt .
     65        cp ${ISSM_DIR}/externalpackages/gmt/install/bin/gmtselect .
     66else
     67        echo "GMT not found"
     68        exit 1
     69fi
     70
     71echo "Moving Gmsh binaries to bin/"
     72if [ -f ${ISSM_DIR}/externalpackages/gmsh/install/bin/gmsh ]; then
     73        cp ${ISSM_DIR}/externalpackages/gmsh/install/bin/gmsh .
     74else
     75        echo "Gmsh not found"
     76        exit 1
     77fi
     78
     79# Run tests
     80echo "Running tests"
     81cd ${ISSM_DIR}/test/NightlyRun
     82
     83# Check that MATLAB tests run
     84echo "Running MATLAB tests"
     85
     86rm matlab.log 2> /dev/null
     87
     88# Run MATLAB tests redirecting output to logfile and suppressing output to console
     89${MATLAB_PATH}/bin/matlab -nojvm -nosplash -r "try, addpath ${ISSM_DIR}/bin ${ISSM_DIR}/lib; runme(${MATLAB_NROPTIONS}); exit; catch me,fprintf('%s',getReport(me)); exit; end" -logfile matlab.log &> /dev/null
     90
     91# Check that MATLAB did not exit in error
     92matlabExitCode=`echo $?`
     93matlabExitedInError=`grep -E "Activation cannot proceed|license|Error" matlab.log | wc -l`
     94
     95if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
     96        echo "----------MATLAB exited in error!----------"
     97        cat matlab.log
     98        echo "-----------End of matlab.log-----------"
     99
     100        # Clean up execution directory
     101        rm -rf ${ISSM_DIR}/execution/*
     102
     103        exit 1
     104fi
     105
     106# Check that all MATLAB tests passed
     107numMatlabTestsFailed=`cat matlab.log | grep -c -e "FAILED|ERROR"`
     108
     109if [[ ${numMatlabTestsFailed} -ne 0 ]]; then
     110        echo "One or more MATLAB tests FAILED"
     111        exit 1;
     112else
     113        echo "All MATLAB tests PASSED"
     114fi
     115
     116# Check that Python tests run
     117echo "Running Python tests"
     118
     119export PATH="${PATH}:${ISSM_DIR}/bin"
     120export PYTHONPATH="${ISSM_DIR}/src/m/dev"
     121export PYTHONSTARTUP="${PYTHONPATH}/devpath.py"
     122export PYTHONUNBUFFERED=1 # We don't want Python to buffer output, otherwise issm.exe output is not captured
     123
     124rm python.log 2> /dev/null
     125./runme.py ${PYTHON_NROPTIONS} &> python.log 2>&1
     126
     127# Check that Python did not exit in error
     128pythonExitCode=`echo $?`
     129pythonExitedInError=`grep -E "Error|Traceback|bad interpreter" python.log | wc -l`
     130
     131if [[ ${pythonExitCode} -ne 0 || ${pythonExitedInError} -ne 0 ]]; then
     132        echo "----------Python exited in error!----------"
     133        cat python.log
     134        echo "-----------End of python.log-----------"
     135
     136        # Clean up execution directory
     137        rm -rf ${ISSM_DIR}/execution/*
     138
     139        exit 1
     140fi
     141
     142# Check that all Python tests passed
     143numPythonTestsFailed=`cat python.log | grep -c -e "FAILED|ERROR"`
     144
     145if [[ ${numPythonTestsFailed} -ne 0 ]]; then
     146        echo "One or more Python tests FAILED"
     147        exit 1
     148else
     149        echo "All Python tests PASSED"
     150fi
     151
     152# Create tarball
     153cd ${ISSM_DIR}
     154rm -f ${TARBALL}
     155svn cleanup --remove-ignored --remove-unversioned test # Clean up test directory (before copying to package)
     156echo "Copying assets to package: ${PACKAGE}"
     157cp -rf bin examples lib scripts test ${PACKAGE}/
     158echo "Cleaning up unneeded/unwanted files"
     159python -m compileall ${PACKAGE}/bin # Precompile all Python scripts to bytecode
     160rm -f ${PACKAGE}/bin/*.py # Remove all Python scripts
     161rm -f ${PACKAGE}/bin/generic_static.* # Remove static versions of generic cluster classes
     162rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package
     163rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package
     164rm -f ${PACKAGE}/test/SandBox # Remove testing sandbox from package
     165echo "Creating tarball: ${TARBALL_NAME}"
     166tar -czf ${TARBALL} ${PACKAGE}
     167ls -lah ${ISSM_DIR}/${TARBALL}
     168
     169echo "Transferring binaries to ISSM Web site"
     170scp -i ~/.ssh/pine_island_to_ross ${TARBALL} jenkins@ross.ics.uci.edu:/var/www/html/${TARBALL}
     171
     172if [ $? -ne 0 ]; then
     173        echo "FAILED: Manually check connection"
     174        exit 1
     175fi
  • ../trunk-jpl/packagers/mac/package-issm-mac-binaries-with_dakota.sh

    Property changes on: ../trunk-jpl/packagers/mac/package-issm-mac-binaries-solid_earth.sh
    ___________________________________________________________________
    Added: svn:executable
    ## -0,0 +1 ##
    +*
    \ No newline at end of property
     
    11#!/bin/bash
    22
    33
     4# Script to test, package, and transfer distributable to ISSM Web site.
     5# Corresponds with build generated by configuration in
     6# $ISSM_DIR/jenkins/pine_island-mac-binaries-with_dakota.
     7#
     8
    49## Constants
    510#
    611MATLAB_NROPTIONS="'id',[IdFromString('Dakota')],'exclude',[234,235,418,420,444,445]"
     
    1015TARBALL_NAME="issm-mac-with_dakota"
    1116TARBALL="${TARBALL_NAME}.tar.gz"
    1217
     18## Environment
     19#
     20export PATH="${ISSM_DIR}/bin:$(getconf PATH)" # Ensure that we pick up binaries from 'bin' directory rather than 'externalpackages'
     21
    1322# Check if MATLAB exists
    1423if ! [ -d ${MATLAB_PATH} ]; then
    1524        echo "${MATLAB_PATH} does not point to a MATLAB installation! Please modify MATLAB_PATH variable in $(basename $0) and try again."
     
    5564
    5665# Check that MATLAB did not exit in error
    5766matlabExitCode=`echo $?`
    58 matlabExitedInError=`grep -E "Activation cannot proceed|license" matlab.log | wc -l`
     67matlabExitedInError=`grep -E "Activation cannot proceed|license|Error" matlab.log | wc -l`
    5968
    6069if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
    6170        echo "----------MATLAB exited in error!----------"
  • ../trunk-jpl/packagers/mac/package-issm-mac-binaries.sh

     
    11#!/bin/bash
    22
    33
     4# Script to test, package, and transfer distributable to ISSM Web site.
     5# Corresponds with build generated by configuration in
     6# $ISSM_DIR/jenkins/pine_island-mac-binaries.
     7#
     8
    49## Constants
    510#
    611MATLAB_NROPTIONS="'exclude',[IdFromString('Dakota'),435,701,702,703]"
     
    914TARBALL_NAME="issm-mac"
    1015TARBALL="${TARBALL_NAME}.tar.gz"
    1116
     17## Environment
     18#
     19export PATH="${ISSM_DIR}/bin:$(getconf PATH)" # Ensure that we pick up binaries from 'bin' directory rather than 'externalpackages'
     20
    1221# Check if MATLAB exists
    1322if ! [ -d ${MATLAB_PATH} ]; then
    1423        echo "${MATLAB_PATH} does not point to a MATLAB installation! Please modify MATLAB_PATH variable in $(basename $0) and try again."
     
    5362
    5463# Check that MATLAB did not exit in error
    5564matlabExitCode=`echo $?`
    56 matlabExitedInError=`grep -E "Activation cannot proceed|license" matlab.log | wc -l`
     65matlabExitedInError=`grep -E "Activation cannot proceed|license|Error" matlab.log | wc -l`
    5766
    5867if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
    5968        echo "----------MATLAB exited in error!----------"
  • ../trunk-jpl/jenkins/pine_island-mac-binaries-solid_earth

     
     1#--------------------#
     2# ISSM Configuration #
     3#--------------------#
     4
     5# MATLAB path
     6MATLAB_PATH="/Applications/MATLAB_R2018a.app"
     7
     8# NOTE:
     9# - We can disable dependency tracking in the Autotools because the binaries
     10#       should always be a one-time build.
     11#
     12
     13# ISSM CONFIGURATION
     14ISSM_CONFIG='\
     15        --prefix=${ISSM_DIR} \
     16        --enable-standalone-executables \
     17        --enable-standalone-modules \
     18        --enable-standalone-libraries \
     19        --disable-dependency-tracking \
     20        --with-matlab-dir=${MATLAB_PATH} \
     21        --with-python-dir=/System/Library/Frameworks/Python.framework/Versions/2.7 \
     22        --with-python-numpy-dir=/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy \
     23        --with-fortran-lib="/usr/local/Cellar/gcc/9.3.0/lib/gcc/9/libgfortran.a /usr/local/Cellar/gcc/9.3.0/lib/gcc/9/libquadmath.a /usr/local/Cellar/gcc/9.3.0/lib/gcc/9/gcc/x86_64-apple-darwin15/9.3.0/libgcc.a" \
     24        --with-mpi-include=${ISSM_DIR}/externalpackages/petsc/install/include \
     25        --with-mpi-libflags="-L${ISSM_DIR}/externalpackages/petsc/install/lib -lmpi -lmpicxx -lmpifort" \
     26        --with-blas-lapack-dir=${ISSM_DIR}/externalpackages/petsc/install \
     27        --with-metis-dir=${ISSM_DIR}/externalpackages/petsc/install \
     28        --with-scalapack-dir=${ISSM_DIR}/externalpackages/petsc/install \
     29        --with-mumps-dir=${ISSM_DIR}/externalpackages/petsc/install \
     30        --with-hdf5-dir=${ISSM_DIR}/externalpackages/petsc/install \
     31        --with-petsc-dir=${ISSM_DIR}/externalpackages/petsc/install \
     32        --with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \
     33        --with-boost-dir=${ISSM_DIR}/externalpackages/boost/install
     34'
     35
     36#-------------------#
     37# External Packages #
     38#-------------------#
     39
     40#List of external pakages to be installed and their installation scripts
     41EXTERNALPACKAGES="
     42        autotools               install.sh
     43        cmake                   install.sh
     44        petsc                   install-3.12-mac-solid_earth-static.sh
     45        boost                   install-1.7-mac-static.sh
     46        triangle                install-mac-static.sh
     47        chaco                   install.sh
     48        m1qn3                   install.sh
     49        semic                   install.sh
     50        curl                    install-7.67-static.sh
     51        netcdf                  install-4.7-mac-parallel-static.sh
     52        proj                    install-6.2-static.sh
     53        gdal                    install-3-python-netcdf-static.sh
     54        gshhg                   install.sh
     55        gmt                             install-6.0-mac-static.sh
     56        gmsh                    install-4-static.sh
     57        shell2junit             install.sh
     58"
     59
     60#---------#
     61# Testing #
     62#---------#
     63
     64# Test suites
     65MATLAB_TEST=0
     66PYTHON_TEST=0
     67JAVASCRIPT_TEST=0
     68EXAMPLES_TEST=0
     69
     70# Number of CPUs used in ISSM compilation
     71#
     72# NOTE: One is usually safer as some packages are very sensitive to parallel
     73#               compilation
     74#
     75NUMCPUS_INSTALL=4
     76
     77# Number of CPUs used in the nightly runs
     78NUMCPUS_RUN=1
     79
     80# Nightly run options
     81#
     82# See documentation in test/NightlyRun/runme.* for more information.
     83#
     84MATLAB_NROPTIONS=""
     85PYTHON_NROPTIONS=""
  • ../trunk-jpl/externalpackages/boost/install-1.7-mac.sh

    Property changes on: ../trunk-jpl/jenkins/pine_island-mac-binaries-solid_earth
    ___________________________________________________________________
    Added: svn:executable
    ## -0,0 +1 ##
    +*
    \ No newline at end of property
     
    3838./b2 install link=shared runtime-link=shared
    3939
    4040# Set install_name for all shared libraries
     41#
     42# NOTE: The install_name_tool prints an error message on some installations,
     43#               but this is not a shell error, and it does not seem to affect the
     44#               Boost libraries called by ISSM. For now, we are simply redirecting the
     45#               error to null.
     46#
     47# TODO:
     48# - Modify the source to apply absolute paths to the library ids so that
     49#       patching it after the fact with install_name_tool is not necessary.
     50#
    4151cd ${BOOST_ROOT}/install/lib
    4252for name in *.dylib; do
    43         install_name_tool -id ${BOOST_ROOT}/install/lib/${name} ${name}
     53        install_name_tool -id ${BOOST_ROOT}/install/lib/${name} ${name} 2>/dev/null
    4454done
  • ../trunk-jpl/src/m/boundaryconditions/getlovenumbers.m

     
    3636end
    3737
    3838        love_numbers=[...
    39      0           0          0          0          0          0          0
    40         -1.28740059 -1.00000000 -0.89858519 1.28740059 0.42519882 0.89858519 0.00000000
     39     0           0          0          0          0          0          0;
     40        -1.28740059 -1.00000000 -0.89858519 1.28740059 0.42519882 0.89858519 0.00000000;
    4141        -1.00025365 -0.30922675 0.02060926 1.69102690 0.46358648 0.67016399 0.61829668;
    4242        -1.06243501 -0.19927948 0.06801636 1.86315553 0.55741597 0.73270416 0.56270589;
    4343        -1.06779588 -0.13649834 0.05667027 1.93129754 0.63672498 0.80683140 0.51132745;
Note: See TracBrowser for help on using the repository browser.