Changeset 25196


Ignore:
Timestamp:
07/02/20 10:53:58 (5 years ago)
Author:
jdquinn
Message:

CHG: Fixes for Linux solid earth binaries; applied similar changes to other packaging/testing scripts; clean up

Location:
issm/trunk-jpl
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/jenkins/ross-debian_linux-binaries-solid_earth

    r25095 r25196  
    4040
    4141EXTERNALPACKAGES="
    42         autotools       install-debian-linux.sh
    43         cmake           install.sh
    44         petsc           install-3.12-linux-solid_earth-static.sh
    45         boost           install-1.7-linux-static.sh
    46         triangle        install-linux-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-parallel-static.sh
    52         proj            install-6.2-static.sh
    53         gdal            install-3.0-python-netcdf-static.sh
    54         gshhg           install.sh
    55         gmt                     install-6.0-linux-static.sh
    56         gmsh            install-4-static.sh
    57         shell2junit     install.sh
     42        autotools               install-debian-linux.sh
     43        cmake                   install.sh
     44        petsc                   install-3.12-linux-solid_earth-static.sh
     45        boost                   install-1.7-linux-static.sh
     46        triangle                install-linux-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-parallel-static.sh
     52        netcdf-python   install.sh
     53        proj                    install-6.2-static.sh
     54        gdal                    install-3.0-python-netcdf-static.sh
     55        gshhg                   install.sh
     56        gmt                             install-6.0-linux-static.sh
     57        gmsh                    install-4-static.sh
     58        shell2junit             install.sh
    5859"
    5960
  • issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-solid_earth.sh

    r25189 r25196  
    99MATLAB_PATH="/usr/local/MATLAB/R2019b"
    1010PACKAGE="ISSM-Solid_Earth" # Name of directory to copy distributable files to
    11 PYTHON_NROPTIONS="--benchmark 'slr'"
     11PYTHON_NROPTIONS="--benchmark slr"
    1212TARBALL_NAME="issm-linux-solid_earth"
    1313TARBALL="${TARBALL_NAME}.tar.gz"
     
    4141else
    4242        echo "MPICH not found"
     43        exit 1
     44fi
     45
     46echo "Moving GDAL binaries to bin/"
     47if [ -f ${ISSM_DIR}/externalpackages/gdal/install/bin/gdal-config ]; then
     48        cp ${ISSM_DIR}/externalpackages/gdal/install/bin/gdalsrsinfo .
     49        cp ${ISSM_DIR}/externalpackages/gdal/install/bin/gdaltransform .
     50else
     51        echo "GDAL not found"
     52        exit 1
     53fi
     54
     55echo "Moving GMT binaries to bin/"
     56if [ -f ${ISSM_DIR}/externalpackages/gmt/install/bin/gmt-config ]; then
     57        cp ${ISSM_DIR}/externalpackages/gmt/install/bin/gmt .
     58        cp ${ISSM_DIR}/externalpackages/gmt/install/bin/gmtselect .
     59else
     60        echo "GMT not found"
    4361        exit 1
    4462fi
     
    141159rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package
    142160rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package
     161rm -f ${PACKAGE}/test/SandBox # Remove testing sandbox from package
    143162echo "Creating tarball: ${TARBALL_NAME}"
    144163tar -czf ${TARBALL} ${PACKAGE}
  • issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-with_dakota.sh

    r25189 r25196  
    133133rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package
    134134rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package
     135rm -f ${PACKAGE}/test/SandBox # Remove testing sandbox from package
    135136echo "Creating tarball: ${TARBALL_NAME}"
    136137tar -czf ${TARBALL} ${PACKAGE}
  • issm/trunk-jpl/packagers/linux/package-issm-linux-binaries.sh

    r25189 r25196  
    9292rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package
    9393rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package
     94rm -f ${PACKAGE}/test/SandBox # Remove testing sandbox from package
    9495echo "Creating tarball: ${TARBALL_NAME}"
    9596tar -czf ${TARBALL} ${PACKAGE}
  • issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-with_dakota.sh

    r25189 r25196  
    127127rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package
    128128rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package
     129rm -f ${PACKAGE}/test/SandBox # Remove testing sandbox from package
    129130echo "Creating tarball: ${TARBALL_NAME}"
    130131tar -czf ${TARBALL} ${PACKAGE}
  • issm/trunk-jpl/packagers/mac/package-issm-mac-binaries.sh

    r25189 r25196  
    8787rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package (we only need MEX-files)
    8888rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package
     89rm -f ${PACKAGE}/test/SandBox # Remove testing sandbox from package
    8990echo "Creating tarball: ${TARBALL_NAME}"
    9091tar -czf ${TARBALL} ${PACKAGE}
  • issm/trunk-jpl/scripts/devpath.py

    r25125 r25196  
    77#
    88#           export ISSM_DIR=</path/to/ISSM>
    9 #           export PATH="${PATH}:${ISSM_DIR}/bin"
     9#           export PATH="${PATH}:${ISSM_DIR}/bin:${ISSM_DIR}/scripts"
    1010#           export PYTHONPATH="${ISSM_DIR}/scripts"
    1111#           export PYTHONSTARTUP="${PYTHONPATH}/devpath.py"
  • issm/trunk-jpl/scripts/test-issm-linux-binaries-solid_earth.sh

    r25189 r25196  
    66#
    77
    8 unset ISSM_DIR # Ensure that ISSM_DIR is not set in case we are running on a machine and user profile that sets it
    9 
    108MATLAB_NROPTIONS="'benchmark','slr'"
    119MATLAB_PATH="/usr/local/MATLAB/R2019b"
    1210INSTALL_DIR=~/Downloads
    1311PACKAGE_NAME="ISSM-Solid_Earth"
    14 PYTHON_NROPTIONS="--benchmark 'slr'"
     12PYTHON_NROPTIONS="--benchmark slr"
    1513TARBALL_NAME="issm-linux-solid_earth"
    1614TARBALL="${TARBALL_NAME}.tar.gz"
    1715
     16export ISSM_DIR="${INSTALL_DIR}/${PACKAGE_NAME}"
     17export PATH="${PATH}:${ISSM_DIR}/bin:${ISSM_DIR}/scripts"
     18
    1819cd ${INSTALL_DIR}
    19 rm -rf ${PACKAGE_NAME}
    20 tar -zxvf ${TARBALL}
     20# rm -rf ${PACKAGE_NAME}
     21# tar -zxvf ${TARBALL}
    2122cd ${PACKAGE_NAME}/test/NightlyRun
    2223
    23 # Check that MATLAB tests run
    24 echo "Running MATLAB tests"
    25 rm matlab.log 2> /dev/null
     24# # Check that MATLAB tests run
     25# echo "Running MATLAB tests"
     26# rm matlab.log 2> /dev/null
    2627
    27 # Run MATLAB tests redirecting output to logfile and suppressing output to console
    28 ${MATLAB_PATH}/bin/matlab -nojvm -nosplash -r "try, addpath ../../bin; addpath ../../lib; runme(${MATLAB_NROPTIONS}); exit; catch me,fprintf('%s',getReport(me)); exit; end" -logfile matlab.log &> /dev/null
     28# # Run MATLAB tests redirecting output to logfile and suppressing output to console
     29# ${MATLAB_PATH}/bin/matlab -nojvm -nosplash -r "try, addpath ../../bin; addpath ../../lib; runme(${MATLAB_NROPTIONS}); exit; catch me,fprintf('%s',getReport(me)); exit; end" -logfile matlab.log &> /dev/null
    2930
    30 # Check that MATLAB did not exit in error
    31 matlabExitCode=`echo $?`
    32 matlabExitedInError=`grep -E "Activation cannot proceed|license|Error" matlab.log | wc -l`
     31# # Check that MATLAB did not exit in error
     32# matlabExitCode=`echo $?`
     33# matlabExitedInError=`grep -E "Activation cannot proceed|license|Error" matlab.log | wc -l`
    3334
    34 if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
    35         echo "----------MATLAB exited in error!----------"
    36         cat matlab.log
    37         echo "-----------End of matlab.log-----------"
    38         exit 1
    39 fi
     35# if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
     36#       echo "----------MATLAB exited in error!----------"
     37#       cat matlab.log
     38#       echo "-----------End of matlab.log-----------"
     39#       exit 1
     40# fi
    4041
    41 # Check that all MATLAB tests passed
    42 numMatlabTestsFailed=`cat matlab.log | grep -c -e "FAILED|ERROR"`
     42# # Check that all MATLAB tests passed
     43# numMatlabTestsFailed=`cat matlab.log | grep -c -e "FAILED|ERROR"`
    4344
    44 if [[ ${numMatlabTestsFailed} -ne 0 ]]; then
    45         echo "One or more MATLAB tests FAILED"
    46         exit 1
    47 else
    48         echo "All MATLAB tests PASSED"
    49 fi
     45# if [[ ${numMatlabTestsFailed} -ne 0 ]]; then
     46#       echo "One or more MATLAB tests FAILED"
     47#       exit 1
     48# else
     49#       echo "All MATLAB tests PASSED"
     50# fi
    5051
    5152# Check that Python tests run
    5253echo "Running Python tests"
    5354
    54 export ISSM_DIR="${INSTALL_DIR}"
    55 export PATH="${PATH}:${ISSM_DIR}/bin"
    5655export PYTHONPATH="${ISSM_DIR}/scripts"
    5756export PYTHONSTARTUP="${PYTHONPATH}/devpath.py"
  • issm/trunk-jpl/scripts/test-issm-linux-binaries-with_dakota.sh

    r25189 r25196  
    55# NOTE: Tarball must already exist in INSTALL_DIR
    66#
    7 
    8 unset ISSM_DIR # Ensure that ISSM_DIR is not set in case we are running on a machine and user profile that sets it
    97
    108MATLAB_NROPTIONS="'id',[IdFromString('Dakota')]"
     
    1513TARBALL_NAME="issm-linux-with_dakota"
    1614TARBALL="${TARBALL_NAME}.tar.gz"
     15
     16export ISSM_DIR="${INSTALL_DIR}/${PACKAGE_NAME}"
     17export PATH="${PATH}:${ISSM_DIR}/bin:${ISSM_DIR}/scripts"
    1718
    1819cd ${INSTALL_DIR}
  • issm/trunk-jpl/scripts/test-issm-linux-binaries.sh

    r25189 r25196  
    66#
    77
    8 unset ISSM_DIR # Ensure that ISSM_DIR is not set in case we are running on a machine and user profile that sets it
    9 
    108MATLAB_NROPTIONS="'exclude',[IdFromString('Dakota')]"
    119MATLAB_PATH="/usr/local/MATLAB/R2019b"
     
    1412TARBALL_NAME="issm-linux"
    1513TARBALL="${TARBALL_NAME}.tar.gz"
     14
     15export ISSM_DIR="${INSTALL_DIR}/${PACKAGE_NAME}"
     16export PATH="${PATH}:${ISSM_DIR}/bin:${ISSM_DIR}/scripts"
    1617
    1718cd ${INSTALL_DIR}
  • issm/trunk-jpl/scripts/test-issm-mac-binaries-with_dakota.sh

    r25189 r25196  
    55# NOTE: Tarball must already exist in INSTALL_DIR
    66#
    7 
    8 unset ISSM_DIR # Ensure that ISSM_DIR is not set in case we are running on a machine and user profile that sets it
    97
    108MATLAB_NROPTIONS="'id',[IdFromString('Dakota')],'exclude',[234,235,418,420,444,445]"
     
    1513TARBALL_NAME="issm-mac-with_dakota"
    1614TARBALL="${TARBALL_NAME}.tar.gz"
     15
     16export ISSM_DIR="${INSTALL_DIR}/${PACKAGE_NAME}"
     17export PATH="${PATH}:${ISSM_DIR}/bin:${ISSM_DIR}/scripts"
     18
    1719
    1820cd ${INSTALL_DIR}
     
    5355
    5456export ISSM_DIR="${INSTALL_DIR}"
    55 export PATH="${PATH}:${ISSM_DIR}/bin"
    5657export PYTHONPATH="${ISSM_DIR}/scripts"
    5758export PYTHONSTARTUP="${PYTHONPATH}/devpath.py"
  • issm/trunk-jpl/scripts/test-issm-mac-binaries.sh

    r25189 r25196  
    66#
    77
    8 unset ISSM_DIR # Ensure that ISSM_DIR is not set in case we are running on a machine and user profile that sets it
     8export ISSM_DIR="${INSTALL_DIR}/${PACKAGE_NAME}"
     9export PATH="${PATH}:${ISSM_DIR}/bin:${ISSM_DIR}/scripts"
    910
    1011MATLAB_NROPTIONS="'exclude',[IdFromString('Dakota'),435,701,702,703]"
  • issm/trunk-jpl/src/m/Makefile.am

    r24593 r25196  
    4848        ${ISSM_DIR}/src/m/qmu/setupdesign/*.m \
    4949        ${ISSM_DIR}/src/m/regional/*.m \
     50        ${ISSM_DIR}/src/m/shp/*.m \
    5051        ${ISSM_DIR}/src/m/solve/*.m \
    5152        ${ISSM_DIR}/src/m/solvers/*.m \
  • issm/trunk-jpl/src/m/coordsystems/gmtmask.m

    r22821 r25196  
    3636
    3737        %Avoid bypassing of the ld library path by Matlab (:()
     38        %
     39        % TODO: Do we really need this (we can/already set it in etc/environment.sh)?
    3840        if ismac,
    3941                dyld_library_path_old=getenv('DYLD_LIBRARY_PATH');
     
    4244
    4345        %Find path to gmt, list all possible known paths to gmt (you may need to add yours to the list)
    44    paths = {[issmdir() '/bin/gmt'],[issmdir() '/externalpackages/gmt/install/bin/gmt'],'/Applications/GMT-5.4.3.app/Contents/Resources/bin/gmt'};
     46   gmtpaths = {[issmdir '/bin/gmt'],[issmdir '/externalpackages/gmt/install/bin/gmt'],'/Applications/GMT-5.4.3.app/Contents/Resources/bin/gmt'};
    4547   gmtpath = '';
    46    for i=paths
     48   for i=gmtpaths
    4749      if exist(i{1},'file'),
    4850         gmtpath = i{1};
     
    5153   end
    5254   if isempty(gmtpath),
    53       error('gmt not found, make sure it is properly installed, or add its path to this file (line 44)');
     55      error('gmt not found! Make sure it is properly installed, or add its path to this file.');
    5456   end
    5557   
  • issm/trunk-jpl/src/m/coordsystems/gmtmask.py

    r25161 r25196  
    1 from os import getenv, putenv
     1import os
    22import subprocess
    33
    44import numpy as np
    55
     6from issmdir import *
    67from MatlabFuncs import *
    78from model import *
     
    4445
    4546    #Avoid bypassing of the ld library path by Matlab (:()
    46     try:
    47         issmdir
    48     except NameError:
    49         issmdir = getenv('ISSM_DIR')
     47    issm_dir = issmdir()
     48
    5049    try:
    5150        ismac
     
    5352        ismac = False
    5453
     54    # TODO: Do we really need this (we can/already set it in etc/environment.sh)?
    5555    if ismac:
    56         dyld_library_path_old = getenv('DYLD_LIBRARY_PATH')
    57         putenv('DYLD_LIBRARY_PATH', issmdir + '/externalpackages/curl/install/lib:' + issmdir + '/externalpackages/hdf5/install/lib:' + issmdir + '/externalpackages/netcdf/install/lib')
     56        dyld_library_path_old = os.getenv('DYLD_LIBRARY_PATH')
     57        os.putenv('DYLD_LIBRARY_PATH', issm_dir + '/externalpackages/curl/install/lib:' + issm_dir + '/externalpackages/hdf5/install/lib:' + issm_dir + '/externalpackages/netcdf/install/lib')
     58
     59    #Find path to gmt (you may need to add yours to the list).
     60    #
     61    # NOTE: Assumes gmtselect is also in this directory.
     62    #
     63    gmtpaths = [
     64        issm_dir + '/bin/gmt',
     65        issm_dir + '/externalpackages/gmt/install/bin/gmt',
     66        '/Applications/GMT-5.4.3.app/Contents/Resources/bin/gmt'
     67    ]
     68    gmtpath = ''
     69    for i in range(len(gmtpaths)):
     70        if os.path.isfile(gmtpaths[i]):
     71            gmtpath = gmtpaths[i]
     72            break
     73
     74    if gmtpath == '':
     75        raise Exception('gmt not found! Make sure it is properly installed, or add its path to this file.')
    5876
    5977    #figure out which vertices are on the ocean, which one on the continent:
    60     subprocess.call(issmdir + '/externalpackages/gmt/install/bin/gmt gmtselect ./ all_vertices.txt -h0 -Df -R0/360/-90/90 -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices.txt', shell=True)
     78    subprocess.call(gmtpath + ' gmtselect ./ all_vertices.txt -h0 -Df -R0/360/-90/90 -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices.txt', shell=True)
    6179
    6280    #reset DYLD_LIBRARY_PATH to what it was:
    6381    if ismac:
    64         putenv('DYLD_LIBRARY_PATH', dyld_library_path_old)
     82        os.putenv('DYLD_LIBRARY_PATH', dyld_library_path_old)
    6583
    6684    #read the con_vertices.txt file and flag our mesh vertices on the continent
Note: See TracChangeset for help on using the changeset viewer.