[issm-svn] r23927 - in issm/trunk: externalpackages/boost externalpackages/dakota jenkins m4 packagers packagers/macosx packagers/macosx-dakota packagers/ubuntu packagers/ubuntu-dakota
jdquinn at issm.ess.uci.edu
jdquinn at issm.ess.uci.edu
Thu May 23 11:34:41 PDT 2019
Author: jdquinn
Date: 2019-05-23 11:34:41 -0700 (Thu, 23 May 2019)
New Revision: 23927
Added:
issm/trunk/externalpackages/boost/install-1.55-linux64-static.sh
issm/trunk/externalpackages/dakota/install-6.2-linux64-static.sh
issm/trunk/jenkins/linux64_ross_dakota_static
issm/trunk/packagers/ubuntu-dakota/
issm/trunk/packagers/ubuntu-dakota/package.sh
Modified:
issm/trunk/externalpackages/dakota/install-6.2-macosx64-static.sh
issm/trunk/jenkins/linux64_ross_static
issm/trunk/m4/issm_options.m4
issm/trunk/packagers/macosx-dakota/package.sh
issm/trunk/packagers/macosx/package.sh
issm/trunk/packagers/ubuntu/package.sh
Log:
CHG: Added configuration for Ubuntu with Dakota binaries; clean up of other packaging scripts
Added: issm/trunk/externalpackages/boost/install-1.55-linux64-static.sh
===================================================================
--- issm/trunk/externalpackages/boost/install-1.55-linux64-static.sh (rev 0)
+++ issm/trunk/externalpackages/boost/install-1.55-linux64-static.sh 2019-05-23 18:34:41 UTC (rev 23927)
@@ -0,0 +1,39 @@
+#!/bin/bash
+#set -eu
+#unhook set -eu because some target do fail and it is not a big deal
+
+#Note of caution: stop after boostrap phase, and run
+#bjam --debug-configuration, to figure out which paths boost is using to include
+#python. make sure everyone of these paths is covered by python. If not, just make
+#symlinks in externalpackages/python to what boost is expecting. Ther is NO WAY
+#to get the boost library to include python support without doing that.
+
+#Some cleanup
+rm -rf install boost_1_55_0 src
+mkdir install src
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.sh https://issm.ess.uci.edu/files/externalpackages/boost_1_55_0.tar.gz boost_1_55_0.tar.gz
+
+#Untar
+tar -zxvf boost_1_55_0.tar.gz
+
+#Move boost into install directory
+mv boost_1_55_0/* src
+rm -rf boost_1_55_0
+
+#Setting CXXFLAGS to deal with C++11 incompatibility with Matlab's Boost
+export CXXFLAGS='-std=c++98'
+
+#Configure and compile
+cd src
+./bootstrap.sh \
+ --prefix="$ISSM_DIR/externalpackages/boost/install" \
+ --with-python-root="$ISSM_DIR/externalpackages/python/install"
+
+#Compile boost
+./bjam link=static runtime-link=static install
+
+#put bjam into install also
+mkdir ../install/bin
+cp bjam ../install/bin
Added: issm/trunk/externalpackages/dakota/install-6.2-linux64-static.sh
===================================================================
--- issm/trunk/externalpackages/dakota/install-6.2-linux64-static.sh (rev 0)
+++ issm/trunk/externalpackages/dakota/install-6.2-linux64-static.sh 2019-05-23 18:34:41 UTC (rev 23927)
@@ -0,0 +1,81 @@
+#!/bin/bash
+set -eu
+
+# Constants
+DAK_VER="6.2"
+
+#Some cleanup
+rm -rf Dakota
+rm -rf src
+rm -rf build
+rm -rf install
+mkdir src build install
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.sh https://issm.ess.uci.edu/files/externalpackages/dakota-${DAK_VER}-public.src.tar.gz dakota-${DAK_VER}-public-src.tar.gz
+
+#Untar
+tar -zxvf dakota-${DAK_VER}-public-src.tar.gz
+
+#Move Dakota to src directory
+mv dakota-${DAK_VER}.0.src/* src
+rm -rf dakota-${DAK_VER}.0.src
+
+#Set up Dakota cmake variables and config
+DAK_PATH=$ISSM_DIR/externalpackages/dakota
+
+export DAK_BUILD=$DAK_PATH/build
+export DAK_INSTALL=$DAK_PATH/install
+export DAK_SRC=$DAK_PATH/src
+export MPIHOME=$ISSM_DIR/externalpackages/mpich/install
+export BOOST_ROOT=$ISSM_DIR/externalpackages/boost/install
+
+cp $DAK_SRC/cmake/BuildDakotaTemplate.cmake $DAK_SRC/cmake/BuildDakotaCustom.cmake
+patch $DAK_SRC/cmake/BuildDakotaCustom.cmake configs/${DAK_VER}/BuildDakotaCustom.cmake.patch
+patch $DAK_SRC/cmake/DakotaDev.cmake configs/${DAK_VER}/DakotaDev.cmake.patch
+patch $DAK_SRC/CMakeLists.txt configs/${DAK_VER}/CMakeLists.txt.petsclibs.patch
+
+#Apply patches
+patch src/src/NonDSampling.cpp configs/${DAK_VER}/NonDSampling.cpp.patch
+patch src/src/NonDLocalReliability.cpp configs/${DAK_VER}/NonDLocalReliability.cpp.patch
+patch src/packages/pecos/src/pecos_global_defs.hpp configs/${DAK_VER}/pecos_global_defs.hpp.patch
+
+#Setting CXXFLAGS to deal with C++11 incompatibility with Matlab's Boost
+export CXXFLAGS='-std=c++98'
+
+#Configure dakota
+cd $DAK_BUILD
+
+cmake -C$DAK_SRC/cmake/BuildDakotaCustom.cmake \
+ -C$DAK_SRC/cmake/DakotaDev.cmake \
+ -DBUILD_STATIC_LIBS=ON \
+ -DBUILD_SHARED_LIBS=OFF \
+ -DBOOST_ROOT=$BOOST_ROOT \
+ -DBoost_LIBRARY_DIRS=$BOOST_ROOT/lib \
+ -DBoost_NO_BOOST_CMAKE=TRUE \
+ -DBoost_NO_SYSTEM_PATHS=TRUE \
+ -DBoost_INSTALL_PREFIX=$DAK_INSTALL \
+ -DCMAKE_C_FLAGS="-O2 -g -fPIC" \
+ -DCMAKE_CXX_FLAGS="-O2 -g -fPIC" \
+ -DCMAKE_Fortran_FLAGS="-O2 -g -fPIC" \
+ -DCMAKE_C_COMPILER=$ISSM_DIR/externalpackages/mpich/install/bin/mpicc \
+ -DCMAKE_CXX_COMPILER=$ISSM_DIR/externalpackages/mpich/install/bin/mpicxx \
+ -DCMAKE_Fortran_COMPILER=$ISSM_DIR/externalpackages/mpich/install/bin/mpif77 \
+ -DHAVE_ACRO=off \
+ -DHAVE_JEGA=off \
+ $DAK_SRC
+cd ..
+
+#Compile and install dakota
+cd $DAK_BUILD
+
+if [ $# -eq 0 ];
+then
+ make
+ make install
+else
+ make -j $1
+ make -j $1 install
+fi
+
+cd ..
Modified: issm/trunk/externalpackages/dakota/install-6.2-macosx64-static.sh
===================================================================
--- issm/trunk/externalpackages/dakota/install-6.2-macosx64-static.sh 2019-05-20 23:33:50 UTC (rev 23926)
+++ issm/trunk/externalpackages/dakota/install-6.2-macosx64-static.sh 2019-05-23 18:34:41 UTC (rev 23927)
@@ -28,8 +28,8 @@
export DAK_INSTALL=$DAK_PATH/install
export DAK_SRC=$DAK_PATH/src
export MPIHOME=$ISSM_DIR/externalpackages/mpich/install
-export BOOST_ROOT=$ISSM_DIR/externalpackages/boost/install
+
# Apply patches
cp $DAK_SRC/cmake/BuildDakotaTemplate.cmake $DAK_SRC/cmake/BuildDakotaCustom.cmake
patch $DAK_SRC/cmake/BuildDakotaCustom.cmake configs/$DAK_VER/BuildDakotaCustom.cmake.mac.patch
Added: issm/trunk/jenkins/linux64_ross_dakota_static
===================================================================
--- issm/trunk/jenkins/linux64_ross_dakota_static (rev 0)
+++ issm/trunk/jenkins/linux64_ross_dakota_static 2019-05-23 18:34:41 UTC (rev 23927)
@@ -0,0 +1,67 @@
+
+#-------------------------------#
+# 1: ISSM general configuration #
+#-------------------------------#
+
+#MATLAB path
+MATLAB_PATH="/usr/local/MATLAB/R2015a"
+
+#ISSM CONFIGURATION
+ISSM_CONFIG='--prefix=$ISSM_DIR\
+ --enable-standalone-executables \
+ --enable-standalone-modules \
+ --enable-standalone-libraries \
+ --with-matlab-dir=$MATLAB_PATH \
+ --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
+ --with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \
+ --with-mpi-libflags="$ISSM_DIR/externalpackages/mpich/install/lib/libmpifort.a $ISSM_DIR/externalpackages/mpich/install/lib/libmpi.a -lrt -lpthread" \
+ --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
+ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install \
+ --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
+ --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \
+ --with-metis-dir=$ISSM_DIR/externalpackages/petsc/install \
+ --with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install \
+ --with-m1qn3-dir=$ISSM_DIR/externalpackages/m1qn3/install \
+ --with-boost-dir=$ISSM_DIR/externalpackages/boost/install \
+ --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
+ --with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu -lgfortran" \
+ --with-numthreads=4 \
+ --with-pic'
+
+#PYTHON and MATLAB testing
+MATLAB_TEST=0
+PYTHON_TEST=0
+
+#-----------------------------------#
+# 3: External packages installation #
+#-----------------------------------#
+
+#List of external pakages to be installed and their installation scripts
+EXTERNALPACKAGES="autotools install.sh
+ cmake install.sh
+ chaco install.sh
+ mpich install-3.2-linux64-static.sh
+ m1qn3 install.sh
+ petsc install-3.7-linux64-static.sh
+ triangle install-linux64.sh
+ boost install-1.55-linux64-static.sh
+ dakota install-6.2-linux64-static.sh
+ shell2junit install.sh"
+
+#-----------------#
+# 4: test 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=4
+
+#number of cpus used in the nightly runs.
+NUMCPUS_RUN=4
+
+#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]"
+#PYTHON_NROPTIONS=""
+#MATLAB_NROPTIONS=""
Modified: issm/trunk/jenkins/linux64_ross_static
===================================================================
--- issm/trunk/jenkins/linux64_ross_static 2019-05-20 23:33:50 UTC (rev 23926)
+++ issm/trunk/jenkins/linux64_ross_static 2019-05-23 18:34:41 UTC (rev 23927)
@@ -22,9 +22,9 @@
--with-metis-dir=$ISSM_DIR/externalpackages/petsc/install \
--with-m1qn3-dir=$ISSM_DIR/externalpackages/m1qn3/install \
--with-math77-dir=$ISSM_DIR/externalpackages/math77/install \
- --with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu/4.9 -lgfortran" \
- --with-pic \
- --with-numthreads=4'
+ --with-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu -lgfortran" \
+ --with-numthreads=4 \
+ --with-pic'
#PYTHON and MATLAB testing
MATLAB_TEST=0
@@ -51,10 +51,10 @@
#number of cpus used in ISSM installation and compilation (one is usually
#safer as some packages are very sensitive to parallel compilation)
-NUMCPUS_INSTALL=10
+NUMCPUS_INSTALL=4
#number of cpus used in the nightly runs.
-NUMCPUS_RUN=10
+NUMCPUS_RUN=4
#Nightly run options. The matlab routine runme.m will be called
#as follows: runme($MATLAB_NROPTIONS). The options must be understandable
@@ -61,5 +61,5 @@
#by Matlab and runme.m
#ex: "'id',[101 102 103]"
## FS
-#PYTHON_NROPTIONS="--exclude_name 'Dakota'"
-#MATLAB_NROPTIONS="'exclude',[243,701,702,703,435,IdFromString('Dakota')]"
+#PYTHON_NROPTIONS=""
+#MATLAB_NROPTIONS=""
Modified: issm/trunk/m4/issm_options.m4
===================================================================
--- issm/trunk/m4/issm_options.m4 2019-05-20 23:33:50 UTC (rev 23926)
+++ issm/trunk/m4/issm_options.m4 2019-05-23 18:34:41 UTC (rev 23927)
@@ -390,7 +390,6 @@
TRIANGLELIB="-Wl,`cygpath -m $TRIANGLE_ROOT/`triangle.lib"
;;
*linux*)
- TRIANGLELIB=$TRIANGLE_ROOT/triangle.a
if test "x$HAVE_JAVASCRIPT" = "xyes"; then
dnl go to the bit code, not the library.
TRIANGLELIB=$TRIANGLE_ROOT/triangle.o
@@ -502,7 +501,11 @@
AC_DEFINE([DAKOTA_HAVE_MPI],[1],[enabling parallel MPI])
else if test x$DAKOTA_VERSION = x6.1 || test x$DAKOTA_VERSION = x6.2; then
DAKOTAFLAGS="-DDISABLE_DAKOTA_CONFIG_H -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DDAKOTA_PLUGIN -DBOOST_DISABLE_ASSERTS -DDAKOTA_HAVE_BOOST_FS -DHAVE_UNISTD_H -DHAVE_SYSTEM -DHAVE_WORKING_FORK -DHAVE_WORKING_VFORK -DHAVE_SYS_WAIT_H -DHAVE_USLEEP -DDAKOTA_F90 -DDAKOTA_HAVE_MPI -DHAVE_PECOS -DHAVE_SURFPACK -DDAKOTA_UTILIB -DHAVE_ADAPTIVE_SAMPLING -DHAVE_CONMIN -DDAKOTA_DDACE -DHAVE_FSUDACE -DDAKOTA_HOPS -DHAVE_NCSU -DHAVE_NL2SOL -DHAVE_OPTPP -DDAKOTA_OPTPP -DHAVE_PSUADE -DHAVE_AMPL"
- DAKOTALIB="-L$DAKOTA_ROOT/lib -L$BOOST_ROOT/lib -ldakota_src -ldream -lfsudace -lddace -lnomad -lpecos_src -llhs -llhs_mods -loptpp -lsurfpack -lconmin -ldakota_src_fortran -llhs_mod -lncsuopt -lsurfpack_fortran -lteuchos -lamplsolver -lcport -ldfftpack -lfsudace -lhopspack -lnidr -lpecos -lpsuade -lsparsegrid -lboost_serialization -lboost_signals -lboost_regex -lboost_filesystem -lboost_system"
+ if test "x$enable_standalone_executables" = "xyes"; then
+ DAKOTALIB="-L$DAKOTA_ROOT/lib -ldakota_src -ldream -lfsudace -lddace -lnomad -lpecos_src -llhs -llhs_mods -loptpp -lsurfpack -lconmin -ldakota_src_fortran -llhs_mod -lncsuopt -lsurfpack_fortran -lteuchos -lamplsolver -lcport -ldfftpack -lfsudace -lhopspack -lnidr -lpecos -lpsuade -lsparsegrid $BOOST_ROOT/lib/libboost_serialization.a $BOOST_ROOT/lib/libboost_signals.a $BOOST_ROOT/lib/libboost_regex.a $BOOST_ROOT/lib/libboost_filesystem.a $BOOST_ROOT/lib/libboost_system.a"
+ else
+ DAKOTALIB="-L$DAKOTA_ROOT/lib -L$BOOST_ROOT/lib -ldakota_src -ldream -lfsudace -lddace -lnomad -lpecos_src -llhs -llhs_mods -loptpp -lsurfpack -lconmin -ldakota_src_fortran -llhs_mod -lncsuopt -lsurfpack_fortran -lteuchos -lamplsolver -lcport -ldfftpack -lfsudace -lhopspack -lnidr -lpecos -lpsuade -lsparsegrid -lboost_serialization -lboost_signals -lboost_regex -lboost_filesystem -lboost_system"
+ fi
AC_DEFINE([DISABLE_DAKOTA_CONFIG_H],[1],[disabling DAKOTA_CONFIG_H])
AC_DEFINE([DAKOTA_HAVE_MPI],[1],[enabling parallel MPI])
else
Modified: issm/trunk/packagers/macosx/package.sh
===================================================================
--- issm/trunk/packagers/macosx/package.sh 2019-05-20 23:33:50 UTC (rev 23926)
+++ issm/trunk/packagers/macosx/package.sh 2019-05-23 18:34:41 UTC (rev 23927)
@@ -2,7 +2,7 @@
MATLAB_PATH="/Applications/MATLAB_R2015b.app"
PACKAGE="ISSM" # Name of directory to copy distributable files to
-TARBALL_NAME="issm-mac-static_build"
+TARBALL_NAME="issm-mac"
TARBALL=$TARBALL_NAME.tar.gz
# Clean up from previous packaging
Modified: issm/trunk/packagers/macosx-dakota/package.sh
===================================================================
--- issm/trunk/packagers/macosx-dakota/package.sh 2019-05-20 23:33:50 UTC (rev 23926)
+++ issm/trunk/packagers/macosx-dakota/package.sh 2019-05-23 18:34:41 UTC (rev 23927)
@@ -2,7 +2,7 @@
MATLAB_PATH="/Applications/MATLAB_R2015b.app"
PACKAGE="ISSM" # Name of directory to copy distributable files to
-TARBALL_NAME="issm-mac-dakota-static_build"
+TARBALL_NAME="issm-mac-dakota"
TARBALL=$TARBALL_NAME.tar.gz
# Clean up from previous packaging
@@ -41,8 +41,6 @@
cd $ISSM_DIR
rm -f $TARBALL
cp -rf bin lib test examples scripts $PACKAGE/
-
-cd $ISSM_DIR
tar -czf $TARBALL $PACKAGE
ls -lah $TARBALL
Modified: issm/trunk/packagers/ubuntu/package.sh
===================================================================
--- issm/trunk/packagers/ubuntu/package.sh 2019-05-20 23:33:50 UTC (rev 23926)
+++ issm/trunk/packagers/ubuntu/package.sh 2019-05-23 18:34:41 UTC (rev 23927)
@@ -1,12 +1,31 @@
#!/bin/bash
-echo "modify generic"
+MATLAB_PATH="/usr/local/MATLAB/R2015a"
+PACKAGE="ISSM" # Name of directory to copy distributable files to
+TARBALL_NAME="issm-ubuntu"
+TARBALL=$TARBALL_NAME.tar.gz
+
+# Clean up from previous packaging
+echo "Cleaning up existing assets"
+cd $ISSM_DIR
+rm -rf $PACKAGE
+mkdir $PACKAGE
+
+# Add/modify required binaries
cd $ISSM_DIR/bin
+
+echo "Modify generic"
cat generic_static.m | sed -e "s/generic_static/generic/g" > generic.m
-echo "move mpiexec to bin"
-cp ../externalpackages/mpich/install/bin/mpiexec .
-cp ../externalpackages/mpich/install/bin/hydra_pmi_proxy .
-echo "move gmsh to bin"
+
+echo "Moving mpiexec to bin"
+if [ -f ../externalpackages/mpich/install/bin/mpiexec ]; then
+ cp ../externalpackages/mpich/install/bin/mpiexec .
+ cp ../externalpackages/mpich/install/bin/hydra_pmi_proxy .
+else
+ echo "mpich not found"
+fi
+
+echo "Moving gmsh to bin"
if [ -f ../externalpackages/gmsh/install/gmsh ]; then
cp ../externalpackages/gmsh/install/gmsh .
else
@@ -13,32 +32,25 @@
echo "gmsh not found"
fi
-#Check that test101 runs
+# Check that test101 runs
cd $ISSM_DIR/test/NightlyRun
rm matlab.log
-/usr/local/MATLAB/R2015a/bin/matlab -nojvm -nosplash -r "try, addpath $ISSM_DIR/bin $ISSM_DIR/lib; runme('id',101);exit; catch me,fprintf('%s',getReport(me)); exit; end" -logfile matlab.log
+$MATLAB_PATH/bin/matlab -nojvm -nosplash -r "try, addpath $ISSM_DIR/bin $ISSM_DIR/lib; runme('id',101);exit; catch me,fprintf('%s',getReport(me)); exit; end" -logfile matlab.log
if [[ $(cat matlab.log | grep -c SUCCESS) -lt 10 ]]; then
echo "test101 FAILED"
exit 1;
else
- echo "test101 passed"
+ echo "test101 PASSED"
fi
-tarball_name='issm-ubuntu-static_build.tar.gz'
-
-echo "Cleanup first"
+echo "Creating tarball: ${TARBALL_NAME}"
cd $ISSM_DIR
-rm $tarball_name
+rm -f $TARBALL
+cp -rf bin lib test examples scripts $PACKAGE/
+tar -czf $TARBALL $PACKAGE
+ls -lah $TARBALL
-echo "Creating tarball: ${tarball_name}"
-cd $ISSM_DIR
-rm -rf trunk
-mkdir trunk
-cp -rf bin lib test examples scripts trunk/
-tar -czf $tarball_name trunk
-ls -lah $tarball_name
-
echo "Shipping binaries to website"
# We're using public key authentication method to upload the tarball The
@@ -55,7 +67,7 @@
source ~/.ssh/agent.sh
ssh-add ~/.ssh/ubuntu-bins_jenkins-to-ross
-scp $tarball_name ross.ics.uci.edu:/var/www/html/$tarball_name
+scp $TARBALL ross.ics.uci.edu:/var/www/html/$TARBALL
if [ $? -ne 0 ]; then
echo "The upload failed."
Added: issm/trunk/packagers/ubuntu-dakota/package.sh
===================================================================
--- issm/trunk/packagers/ubuntu-dakota/package.sh (rev 0)
+++ issm/trunk/packagers/ubuntu-dakota/package.sh 2019-05-23 18:34:41 UTC (rev 23927)
@@ -0,0 +1,76 @@
+#!/bin/bash
+
+MATLAB_PATH="/usr/local/MATLAB/R2015a"
+PACKAGE="ISSM" # Name of directory to copy distributable files to
+TARBALL_NAME="issm-ubuntu-dakota"
+TARBALL=$TARBALL_NAME.tar.gz
+
+# Clean up from previous packaging
+echo "Cleaning up existing assets"
+cd $ISSM_DIR
+rm -rf $PACKAGE
+mkdir $PACKAGE
+
+# Add/modify required binaries
+cd $ISSM_DIR/bin
+
+echo "Modify generic"
+cat generic_static.m | sed -e "s/generic_static/generic/g" > generic.m
+
+echo "Moving mpiexec to bin"
+if [ -f ../externalpackages/mpich/install/bin/mpiexec ]; then
+ cp ../externalpackages/mpich/install/bin/mpiexec .
+ cp ../externalpackages/mpich/install/bin/hydra_pmi_proxy .
+else
+ echo "mpich not found"
+fi
+
+echo "Moving gmsh to bin"
+if [ -f ../externalpackages/gmsh/install/gmsh ]; then
+ cp ../externalpackages/gmsh/install/gmsh .
+else
+ echo "gmsh not found"
+fi
+
+# Check that test101 runs
+cd $ISSM_DIR/test/NightlyRun
+rm matlab.log
+$MATLAB_PATH/bin/matlab -nojvm -nosplash -r "try, addpath $ISSM_DIR/bin $ISSM_DIR/lib; runme('id',101);exit; catch me,fprintf('%s',getReport(me)); exit; end" -logfile matlab.log
+
+if [[ $(cat matlab.log | grep -c SUCCESS) -lt 10 ]]; then
+ echo "test101 FAILED"
+ exit 1;
+else
+ echo "test101 PASSED"
+fi
+
+echo "Creating tarball: ${TARBALL_NAME}"
+cd $ISSM_DIR
+rm -f $TARBALL
+cp -rf bin lib test examples scripts $PACKAGE/
+tar -czf $TARBALL $PACKAGE
+ls -lah $TARBALL
+
+echo "Shipping binaries to website"
+
+# We're using public key authentication method to upload the tarball The
+# following lines check to see if the SSH Agent is running. If not, then it is
+# started and relevant information is forwarded to a script.
+pgrep "ssh-agent" > /dev/null
+if [ $? -ne 0 ]; then
+ echo "SSH Agent is not running. Starting it..."
+ ssh-agent > ~/.ssh/agent.sh
+else
+ echo "SSH Agent is running..."
+fi
+
+source ~/.ssh/agent.sh
+ssh-add ~/.ssh/ubuntu-bins_jenkins-to-ross
+
+scp $TARBALL ross.ics.uci.edu:/var/www/html/$TARBALL
+
+if [ $? -ne 0 ]; then
+ echo "The upload failed."
+ echo "Perhaps the SSH Agent was started by some other means."
+ echo "Try killing the agent and running again."
+fi
More information about the issm-svn
mailing list