Index: /issm/trunk-jpl/externalpackages/autotools/install-win.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/autotools/install-win.sh	(revision 23392)
+++ /issm/trunk-jpl/externalpackages/autotools/install-win.sh	(revision 23393)
@@ -2,47 +2,79 @@
 set -eu
 
-rm -rf install
+AUTOCONF_VER="2.69"
+AUTOMAKE_MIN_VER="1.16"
+AUTOMAKE_BUILD_VER="${AUTOMAKE_MIN_VER}.1"
+LIBTOOL_VER="2.4.2"
+M4_VER="1.4.17"
+
+AUTOCONF="autoconf-${AUTOCONF_VER}"
+AUTOMAKE="automake-${AUTOMAKE_BUILD_VER}"
+LIBTOOL="libtool-${LIBTOOL_VER}"
+M4="m4-${M4_VER}"
+
+AUTOCONF_TARBALL="${AUTOCONF}.tar.gz"
+AUTOMAKE_TARBALL="${AUTOMAKE}.tar.gz"
+LIBTOOL_TARBALL="${LIBTOOL}.tar.gz"
+M4_TARBALL="${M4}.tar.gz"
+
+# Clean up existing assets
+rm -rf install src
+
+# Set up for installation
 mkdir install
-
 export PATH="$ISSM_DIR/externalpackages/autotools/install/bin:$PATH"
 
-#install autoconf
-echo " === INSTALLING AUTOCONF =="
-rm -rf src
-$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/autoconf-2.69.tar.gz' 'autoconf-2.69.tar.gz'
-tar -zxvf autoconf-2.69.tar.gz
-mv autoconf-2.69 src
-cd src 
-./configure --prefix="$ISSM_DIR/externalpackages/autotools/install" 
-make  
+# Install m4
+echo " === INSTALLING M4 =="
+$ISSM_DIR/scripts/DownloadExternalPackage.py "http://issm.jpl.nasa.gov/files/externalpackages/${M4_TARBALL}" $M4_TARBALL
+tar -zxvf $M4_TARBALL
+rm -f $M4_TARBALL
+mv $M4 src
+cd src
+./configure --prefix="$ISSM_DIR/externalpackages/autotools/install"
+make
 make install
 cd ..
 
-#install automake
-echo " === INSTALLING AUTOMAKE =="
+# Install autoconf
+echo " === INSTALLING AUTOCONF =="
 rm -rf src
-$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/automake-1.14.tar.gz' 'automake-1.14.tar.gz'
-tar -zxvf  automake-1.14.tar.gz
-mv automake-1.14 src
-cd src 
-./configure --prefix="$ISSM_DIR/externalpackages/autotools/install" 
-make  
+$ISSM_DIR/scripts/DownloadExternalPackage.py "http://issm.jpl.nasa.gov/files/externalpackages/${AUTOCONF_TARBALL}" $AUTOCONF_TARBALL
+tar -zxvf $AUTOCONF_TARBALL
+rm -f $AUTOCONF_TARBALL
+mv $AUTOCONF src
+cd src
+./configure --prefix="$ISSM_DIR/externalpackages/autotools/install"
+make
 make install
 cd ..
 
-#install libtool
-echo " === INSTALLING LIBTOOL =="
+# Install automake
+echo " === INSTALLING AUTOMAKE =="
 rm -rf src
-$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/libtool-2.4.2.tar.gz' 'libtool-2.4.2.tar.gz'
-tar -zxvf  libtool-2.4.2.tar.gz
-rm libtool-2.4.2.tar.gz
-mv libtool-2.4.2 src
-cd src 
-./configure --prefix="$ISSM_DIR/externalpackages/autotools/install" 
-make  
+$ISSM_DIR/scripts/DownloadExternalPackage.py "http://issm.jpl.nasa.gov/files/externalpackages/${AUTOMAKE_TARBALL}" $AUTOMAKE_TARBALL
+tar -zxvf $AUTOMAKE_TARBALL
+rm -f $AUTOMAKE_TARBALL
+mv $AUTOMAKE src
+cd src
+./configure --prefix="$ISSM_DIR/externalpackages/autotools/install"
+make
 make install
 cd ..
 
-# This patch takes care of removing options passed to the linker that casuse 
+# Install libtool
+echo " === INSTALLING LIBTOOL =="
+rm -rf src
+$ISSM_DIR/scripts/DownloadExternalPackage.py "http://issm.jpl.nasa.gov/files/externalpackages/${LIBTOOL_TARBALL}" $LIBTOOL_TARBALL
+tar -zxvf $LIBTOOL_TARBALL
+rm -f $LIBTOOL_TARBALL
+mv $LIBTOOL src
+cd src
+./configure --prefix="$ISSM_DIR/externalpackages/autotools/install"
+make
+make install
+cd ..
+
+# This patch takes care of removing options passed to the linker that causes
 # the build to fail, as well as changing some flags to match up to Microsoft
 # compilers.
@@ -54,5 +86,5 @@
 
 # This patch is for ar-lib, and removes carriage return characters that cause
-# commands to overwrite themselves and be misinterpreted during linking on 
+# commands to overwrite themselves and be misinterpreted during linking on
 # Cygwin Windows.
-patch ./install/share/automake-1.14/ar-lib < ./patches/ar-lib.patch
+patch ./install/share/automake-${AUTOMAKE_MIN_VER}/ar-lib < ./patches/ar-lib.patch
Index: /issm/trunk-jpl/externalpackages/gmsh/install-mac-precompiled.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmsh/install-mac-precompiled.sh	(revision 23393)
+++ /issm/trunk-jpl/externalpackages/gmsh/install-mac-precompiled.sh	(revision 23393)
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -eu
+
+# Set gmsh version
+GMSH_VER="3.0.5"
+
+# Set tarball name
+GMSH_TARBALL_NAME="gmsh-${GMSH_VER}-mac-precompiled"
+
+# Clean up from previous installation
+rm -f $GMSH_TARBALL_NAME.tar.gz
+rm -rf install src
+
+# Download Mac precompiled gmsh from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.py "http://issm.jpl.nasa.gov/files/externalpackages/${GMSH_TARBALL_NAME}.tar.gz" "${GMSH_TARBALL_NAME}.tar.gz"
+
+# Untar gmsh
+tar -xvzf $GMSH_TARBALL_NAME.tar.gz
+
+# Copy gmsh to path expected by packager
+mkdir install
+cp gmsh install
+rm gmsh
Index: /issm/trunk-jpl/externalpackages/gmsh/install-static.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmsh/install-static.sh	(revision 23392)
+++ /issm/trunk-jpl/externalpackages/gmsh/install-static.sh	(revision 23393)
@@ -27,5 +27,5 @@
 #Configure
 cd install
-cmake ../src -DCMAKE_INSTALL_PREFIX="$ISSM_DIR/externalpackages/gmsh/install" -DENABLE_MPI=0 -DENABLE_METIS=0
+cmake ../src -DCMAKE_INSTALL_PREFIX="$ISSM_DIR/externalpackages/gmsh/install" -DENABLE_METIS=0
 
 #Compile and install
Index: /issm/trunk-jpl/externalpackages/gmsh/install-win64-precompiled.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmsh/install-win64-precompiled.sh	(revision 23393)
+++ /issm/trunk-jpl/externalpackages/gmsh/install-win64-precompiled.sh	(revision 23393)
@@ -0,0 +1,24 @@
+#!/bin/bash
+set -eu
+
+# Set gmsh version
+VER="3.0.5"
+
+# Set tarball name
+TARBALL_NAME="gmsh-${VER}-win64-precompiled"
+TARBALL=${TARBALL_NAME}.tar.gz
+
+# Clean up from previous installation
+rm -rf install
+
+# Download Windows 64-bit precompiled gmsh from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.py "http://issm.jpl.nasa.gov/files/externalpackages/${TARBALL}" "${TARBALL}"
+
+# Untar gmsh
+tar -xvzf $TARBALL
+
+# Rename untarred dir
+mv $TARBALL_NAME install
+
+# Clean up
+rm -f $TARBALL
Index: /issm/trunk-jpl/externalpackages/gmt/install-mac-precompiled.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmt/install-mac-precompiled.sh	(revision 23393)
+++ /issm/trunk-jpl/externalpackages/gmt/install-mac-precompiled.sh	(revision 23393)
@@ -0,0 +1,24 @@
+#!/bin/bash
+set -eu
+
+# Set gmt version
+VER="5.4.4"
+
+# Set tarball name
+TARBALL_NAME="gmt-${VER}-mac-precompiled"
+TARBALL=${TARBALL_NAME}.tar.gz
+
+# Clean up from previous installation
+rm -rf install
+
+# Download Mac precompiled gmsh from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.py "http://issm.jpl.nasa.gov/files/externalpackages/${TARBALL}" "${TARBALL}"
+
+# Untar gmt
+tar -xvzf $TARBALL
+
+# Rename untarred dir
+mv $TARBALL_NAME install
+
+# Clean up
+rm -f $TARBALL
Index: /issm/trunk-jpl/externalpackages/gmt/install-win64-precompiled.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmt/install-win64-precompiled.sh	(revision 23393)
+++ /issm/trunk-jpl/externalpackages/gmt/install-win64-precompiled.sh	(revision 23393)
@@ -0,0 +1,24 @@
+#!/bin/bash
+set -eu
+
+# Set gmt version
+VER="5.4.4"
+
+# Set tarball name
+TARBALL_NAME="gmt-${VER}-win64-precompiled"
+TARBALL=${TARBALL_NAME}.tar.gz
+
+# Clean up from previous installation
+rm -rf install
+
+# Download Windows 64-bit precompiled gmsh from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.py "http://issm.jpl.nasa.gov/files/externalpackages/${TARBALL}" "${TARBALL}"
+
+# Untar gmt
+tar -xvzf $TARBALL
+
+# Rename untarred dir
+mv $TARBALL_NAME install
+
+# Clean up
+rm -f $TARBALL
Index: /issm/trunk-jpl/externalpackages/mpich/install-3.2-linux64-static.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/mpich/install-3.2-linux64-static.sh	(revision 23392)
+++ /issm/trunk-jpl/externalpackages/mpich/install-3.2-linux64-static.sh	(revision 23393)
@@ -9,5 +9,5 @@
 $ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/mpich-3.2.tar.gz' 'mpich-3.2.tar.gz'
 
-#Untar 
+#Untar
 tar -zxvf  mpich-3.2.tar.gz
 
@@ -19,5 +19,9 @@
 cd src
 ./configure \
-	--prefix="$ISSM_DIR/externalpackages/mpich/install"
+	--prefix="$ISSM_DIR/externalpackages/mpich/install" \
+	--disable-shared \
+	--enable-strict=all \
+	--enable-fast \
+	--with-pic
 
 #Compile mpich (this new version supports parallel make)
@@ -27,3 +31,4 @@
 	make -j $1
 fi
-make install 
+
+make install
Index: /issm/trunk-jpl/externalpackages/mpich/install-3.2-linux64.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/mpich/install-3.2-linux64.sh	(revision 23392)
+++ /issm/trunk-jpl/externalpackages/mpich/install-3.2-linux64.sh	(revision 23393)
@@ -9,5 +9,5 @@
 $ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/mpich-3.2.tar.gz' 'mpich-3.2.tar.gz'
 
-#Untar 
+#Untar
 tar -zxvf  mpich-3.2.tar.gz
 
@@ -28,3 +28,3 @@
 	make -j $1
 fi
-make install 
+make install
Index: /issm/trunk-jpl/externalpackages/petsc/install-3.7-linux64-static.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/petsc/install-3.7-linux64-static.sh	(revision 23392)
+++ /issm/trunk-jpl/externalpackages/petsc/install-3.7-linux64-static.sh	(revision 23393)
@@ -18,16 +18,18 @@
 ./config/configure.py \
 	--prefix="$ISSM_DIR/externalpackages/petsc/install" \
+	--with-single-library=1 \
+	--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+	--with-shared-libraries=0 \
+	--with-debugging=0 \
 	--with-mpi-dir="$ISSM_DIR/externalpackages/mpich/install" \
-	--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
-	--with-debugging=0 \
-	--with-valgrind=0 \
-	--with-x=0 \
-	--with-ssl=0 \
-	--with-shared-libraries=0 \
+	--download-fblaslapack=1 \
 	--download-metis=1 \
 	--download-parmetis=1 \
+	--with-x=0 \
+	--download-scalapack=1 \
 	--download-mumps=1 \
-	--download-fblaslapack=1 \
-	--download-scalapack=1 \
+	--with-ssl=0 \
+	--with-valgrind=0 \
+	--with-pic=1 \
 	--COPTFLAGS="-fPIC" \
 	--CXXOPTFLAGS="-fPIC" \
Index: /issm/trunk-jpl/jenkins/linux64_ross_static
===================================================================
--- /issm/trunk-jpl/jenkins/linux64_ross_static	(revision 23392)
+++ /issm/trunk-jpl/jenkins/linux64_ross_static	(revision 23393)
@@ -7,22 +7,22 @@
 MATLAB_PATH="/usr/local/MATLAB/R2015a"
 
-#ISSM CONFIGURATION 
+#ISSM CONFIGURATION
 ISSM_CONFIG='--prefix=$ISSM_DIR \
-	--disable-static \
 	--enable-standalone-executables \
+	--enable-standalone-modules \
 	--enable-standalone-libraries \
-	--enable-standalone-modules \
 	--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="-L$ISSM_DIR/externalpackages/mpich/install/lib -lmpi -lmpifort" \
-	--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-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-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-fortran-lib="-L/usr/lib/gcc/x86_64-linux-gnu/4.9 -lgfortran" \
+	--with-pic \
 	--with-numthreads=4'
 
@@ -52,8 +52,8 @@
 #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
+NUMCPUS_INSTALL=10
 
 #number of cpus used in the nightly runs.
-NUMCPUS_RUN=2
+NUMCPUS_RUN=10
 
 #Nightly run options. The matlab routine runme.m will be called
@@ -61,5 +61,5 @@
 #by Matlab and runme.m
 #ex: "'id',[101 102 103]"
-##                           FS                    
+##                           FS
 #PYTHON_NROPTIONS="--exclude_name 'Dakota'"
 #MATLAB_NROPTIONS="'exclude',[243,701,702,703,435,IdFromString('Dakota')]"
Index: /issm/trunk-jpl/jenkins/macosx_pine-island_static
===================================================================
--- /issm/trunk-jpl/jenkins/macosx_pine-island_static	(revision 23392)
+++ /issm/trunk-jpl/jenkins/macosx_pine-island_static	(revision 23393)
@@ -14,5 +14,5 @@
 	--with-matlab-dir=$MATLAB_PATH \
 	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
-	--with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include  \
+	--with-mpi-include=$ISSM_DIR/externalpackages/mpich/install/include \
 	--with-mpi-libflags="-L$ISSM_DIR/externalpackages/mpich/install/lib -lmpich -lmpl -lpmpich" \
 	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
@@ -23,6 +23,5 @@
 	--with-m1qn3-dir=$ISSM_DIR/externalpackages/m1qn3/install \
 	--with-math77-dir=$ISSM_DIR/externalpackages/math77/install \
-	--with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a /usr/local/gfortran/lib/libquadmath.a /usr/local/gfortran/lib/gcc/x86_64-apple-darwin14/5.2.0/libgcc.a" \
-	--with-numthreads=4'
+	--with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a /usr/local/gfortran/lib/libquadmath.a /usr/local/gfortran/lib/gcc/x86_64-apple-darwin14/5.2.0/libgcc.a"'
 
 #PYTHON and MATLAB testing
@@ -35,13 +34,14 @@
 
 #List of external pakages to be installed and their installation scripts
-EXTERNALPACKAGES="autotools    install.sh
-						cmake        install.sh
-						mpich        install-3.0-macosx64-static.sh
-						m1qn3        install.sh
-						petsc        install-3.6-macosx64-static.sh
-						triangle     install-macosx64.sh
-						math77        install.sh
-						gmsh          install-static.sh
-						shell2junit  install.sh"
+EXTERNALPACKAGES="autotools		install.sh
+					cmake		install.sh
+					mpich		install-3.0-macosx64-static.sh
+					m1qn3		install.sh
+					petsc		install-3.6-macosx64-static.sh
+					triangle	install-macosx64.sh
+					math77		install.sh
+					gmt			install-mac-precompiled.sh
+					gmsh		install-mac-precompiled.sh
+					shell2junit	install.sh"
 
 #for SLR we need gmsh to mesh, math77, and gmt (which itself needs gdal and netcdf...)
@@ -62,4 +62,4 @@
 #ex: "'id',[101 102 103]"
 ##                           bamg mesh   FS
-#PYTHON_NROPTIONS="--exclude_name 'Dakota'"
-#MATLAB_NROPTIONS="'exclude',[119,243,514,701,702,703,435,IdFromString('Dakota')]"
+#PYTHON_NROPTIONS=""
+#MATLAB_NROPTIONS=""
Index: /issm/trunk-jpl/jenkins/windows
===================================================================
--- /issm/trunk-jpl/jenkins/windows	(revision 23392)
+++ /issm/trunk-jpl/jenkins/windows	(revision 23393)
@@ -7,5 +7,5 @@
 MATLAB_PATH="/cygdrive/c/Programs/MATLAB/R2015a/"
 
-#ISSM CONFIGURATION 
+#ISSM CONFIGURATION
 ISSM_CONFIG='--prefix=$ISSM_DIR \
 	--with-vendor=MSVC-Win64  \
@@ -41,5 +41,5 @@
 						petsc       install-3.6-win10.sh
 						metis       install-4.0-win10.sh
-						triangle    install-win10.sh        
+						triangle    install-win10.sh
 						shell2junit install.sh"
 
@@ -50,8 +50,8 @@
 #number of cpus used in ISSM installation and compilation (one is usually
 #safer as some packages are very sensitive to parallel compilation)
-NUMCPUS_INSTALL=6
+NUMCPUS_INSTALL=8
 
 #number of cpus used in the nightly runs.
-NUMCPUS_RUN=2
+NUMCPUS_RUN=8
 
 #Nightly run options. The matlab routine runme.m will be called
Index: /issm/trunk-jpl/jenkins/windows_static
===================================================================
--- /issm/trunk-jpl/jenkins/windows_static	(revision 23393)
+++ /issm/trunk-jpl/jenkins/windows_static	(revision 23393)
@@ -0,0 +1,65 @@
+
+#-------------------------------#
+# 1: ISSM general configuration #
+#-------------------------------#
+
+#MATLAB path
+MATLAB_PATH="/cygdrive/c/Programs/MATLAB/R2015a/"
+
+#ISSM CONFIGURATION
+ISSM_CONFIG='--prefix=$ISSM_DIR \
+	--disable-static \
+	--enable-standalone-executables \
+	--enable-standalone-libraries \
+	--with-matlab-dir=$MATLAB_PATH \
+	--with-vendor=MSVC-Win64 \
+	--with-fortran=no \
+	--without-GiaIvins \
+	--without-Love \
+	--without-kriging \
+	--without-kml \
+	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
+	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/lib  \
+	--with-mpi-libdir=$ISSM_DIR/externalpackages/petsc/install/lib \
+	--with-mpi-libflags="-Wl,libpetsc.lib" \
+	--with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
+	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
+	--with-math77-dir=$ISSM_DIR/externalpackages/math77/install \
+	--with-mpi-include="$ISSM_DIR/externalpackages/petsc/install/include/petsc/mpiuni" \
+	--with-cxxoptflags="-fp:strict"'
+
+#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-win.sh
+					petsc       install-3.6-win10.sh
+					metis       install-4.0-win10.sh
+					triangle    install-win10.sh
+					math77		install.sh
+					gmt			install-win64-precompiled.sh
+					gmsh 		install-win64-precompiled.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=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=""
Index: /issm/trunk-jpl/packagers/macosx/package.sh
===================================================================
--- /issm/trunk-jpl/packagers/macosx/package.sh	(revision 23392)
+++ /issm/trunk-jpl/packagers/macosx/package.sh	(revision 23393)
@@ -1,11 +1,28 @@
 #!/bin/bash
 
-echo "modify generic" 
+TARBALL_NAME='issm-mac-static_build'
+TARBALL=$TARBALL_NAME.tar.gz
+
+# Clean up from previous packaging
+echo "Cleaning up existing assets"
+cd $ISSM_DIR
+rm -rf trunk
+mkdir trunk
+
+# Add/modify required binaries
 cd $ISSM_DIR/bin
+
+echo "Modifying 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 .
@@ -14,5 +31,16 @@
 fi
 
-#Check that test101 runs
+# Copy gmt to trunk
+# NOTE: The following assumes the precompiled version of gmt
+echo "Moving gmt to externalpackages"
+if [ -f $ISSM_DIR/externalpackages/gmt/install/bin/gmt ]; then
+	mkdir $ISSM_DIR/trunk/externalpackages
+	mkdir $ISSM_DIR/trunk/externalpackages/gmt
+	cp -a $ISSM_DIR/externalpackages/gmt/install/. $ISSM_DIR/trunk/externalpackages/gmt
+else
+	echo "gmt not found"
+fi
+
+# Check that test101 runs
 cd $ISSM_DIR/test/NightlyRun
 rm matlab.log
@@ -26,17 +54,19 @@
 fi
 
-tarball_name='issm-mac-static_build.tar.gz'
+echo "Creating tarball: ${TARBALL_NAME}"
+cd $ISSM_DIR
+rm -f $TARBALL
+cp -rf bin lib test examples scripts trunk/
 
-echo "Cleanup first" 
+# Create link to gmt from bin
+# NOTE: It is important that we are in the destination dir when sym linking so that the path is relative
+if [ -f $ISSM_DIR/trunk/externalpackages/gmt/bin/gmt ]; then
+	cd $ISSM_DIR/trunk/bin
+	ln -s ../externalpackages/gmt/bin/gmt ./gmt
+fi
+
 cd $ISSM_DIR
-rm $tarball_name
-
-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
+tar -czf $TARBALL trunk
+ls -lah $TARBALL
 
 echo "Shipping binaries to website"
@@ -56,5 +86,5 @@
 ssh-add ~/.ssh/macosx-bins_richese-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
Index: /issm/trunk-jpl/packagers/win10/package64.sh
===================================================================
--- /issm/trunk-jpl/packagers/win10/package64.sh	(revision 23393)
+++ /issm/trunk-jpl/packagers/win10/package64.sh	(revision 23393)
@@ -0,0 +1,106 @@
+#!/bin/bash
+
+TARBALL_NAME='ISSM-Win10-64'
+TARBALL=$TARBALL_NAME.tar.gz
+MATLAB_PATH="/cygdrive/c/Programs/MATLAB/R2015a"
+
+# Source Windows environment
+source $ISSM_DIR/externalpackages/windows/windows_environment.sh
+
+# Clean up from previous packaging
+echo "Cleaning up existing assets"
+cd $ISSM_DIR
+rm -rf trunk
+mkdir trunk
+
+# Add/modify required binaries
+cd $ISSM_DIR/bin
+
+echo "Making generic_static.m work like generic.m"
+cat generic_static.m | sed -e "s/generic_static/generic/g" > generic.m
+
+echo "Copying scripts from /src to /bin"
+rm $ISSM_DIR/bin/*.m
+find $ISSM_DIR/src/m -name '*.m' | xargs cp -t $ISSM_DIR/bin
+
+echo "Copying gmsh to bin"
+if [ -f ../externalpackages/gmsh/install/gmsh.exe ]; then
+	cp ../externalpackages/gmsh/install/gmsh.exe .
+else
+	echo "gmsh not found"
+fi
+
+# Copy gmt to trunk
+# NOTE: The following assumes the precompiled version of gmt
+echo "Moving gmt to externalpackages"
+if [ -f $ISSM_DIR/externalpackages/gmt/install/bin/gmt ]; then
+	mkdir $ISSM_DIR/trunk/externalpackages
+	mkdir $ISSM_DIR/trunk/externalpackages/gmt
+	cp -a $ISSM_DIR/externalpackages/gmt/install/. $ISSM_DIR/trunk/externalpackages/gmt
+else
+	echo "gmt not found"
+fi
+
+# Check that test 101 runs
+cd $ISSM_DIR/test/NightlyRun
+rm matlab.log
+$MATLAB_PATH/bin/matlab -nodisplay -nosplash -r "try, addpath $ISSM_DIR_WIN/bin $ISSM_DIR_WIN/lib; runme('id',101); exit; catch me,fprintf('%s',getReport(me)); exit; end" -logfile matlab.log
+
+# Wait until MATLAB closes
+sleep 5
+pid=$(ps aux -W | grep MATLAB | awk '{printf("%s\n","MATLAB");}')
+while [ -n "$pid" ]
+do
+	pid=$(ps aux -W | grep MATLAB | awk '{printf("%s\n","MATLAB");}')
+	sleep 1
+done
+
+if [[ $(cat matlab.log | grep -c SUCCESS) -lt 10 ]]; then
+	echo "test101 FAILED"
+	exit 1;
+else
+	echo "test101 passed"
+fi
+
+# Create tarball
+echo "Creating tarball: ${TARBALL_NAME}"
+cd $ISSM_DIR
+rm -f $TARBALL
+cp -rf bin lib test examples scripts trunk/
+
+# Create link to gmt from bin
+# NOTE: It is important that we are in the destination dir when sym linking so that the path is relative
+if [ -f $ISSM_DIR/trunk/externalpackages/gmt/bin/gmt ]; then
+	cd $ISSM_DIR/trunk/bin
+	ln -s ../externalpackages/gmt/bin/gmt.exe ./gmt
+fi
+
+cd $ISSM_DIR
+tar -czf $TARBALL trunk
+ls -lah $TARBALL
+
+# Ship binaries to website
+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/win_bins-geidi_prime_to_ross
+
+scp $TARBALL jenkins@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
Index: /issm/trunk-jpl/scripts/DownloadExternalPackage.py
===================================================================
--- /issm/trunk-jpl/scripts/DownloadExternalPackage.py	(revision 23392)
+++ /issm/trunk-jpl/scripts/DownloadExternalPackage.py	(revision 23393)
@@ -1,139 +1,37 @@
 #!/usr/bin/env python
 # -*- coding: ISO-8859-1 -*-
-#
-# TODO: Improve upon extension recognition by checking for mismatches in found targets
-# and specified local file.
-#
 
-# imports {{{
-import os,sys,re
+import os,sys
 import urllib
-from HTMLParser import HTMLParser
-from urllib import FancyURLopener
-# }}}
-class MyHTMLParser(HTMLParser): #{{{
 
-    def __init__(self, pattern):
-        HTMLParser.__init__(self)
-        self.matcher = re.compile(pattern) 
-        self.targets = []
+#Check inputs
+if(len(sys.argv)!=3): raise NameError('usage: ./DownloadExternalPackage.py URL localfile')
 
-    def handle_starttag(self, tag, attrs):
-        for i in attrs:
-            if "href" == i[0] and str(self.matcher.match(i[1])) != "None":
-                self.targets.append(i[1])
-#}}}
-def main(argv=None): # {{{
-    # Separates the URL into a directory and the file or pattern based on the
-    # last appearance of '/'.
-	if len(sys.argv) > 1:
-	    pivot = sys.argv[1].rfind("/")
-	    url = (sys.argv[1])[:pivot]
-	    pivot += 1
-	    find = (sys.argv[1])[pivot:]
-	else:
-	    print "******************************************************************************************************************************"
-	    print "* Invalid input!                                                                                                             *"
-	    print "*                                                                                                                            *"
-	    print "* Try: 'DownloadExternalPackage.py url [localFile]'                                                                          *"
-	    print "*                                                                                                                            *"
-	    print "* Where 'URL' is the URL with an explicit package name or the URL followed by the truncated package name. And 'localFile' is *"
-	    print "* the file name (including extension) that you would like to save as.                                                        *"
-	    print "*                                                                                                                            *"
-	    print "* Examples:                                                                                                                  *" 
-	    print "*                                                                                                                            *"
-	    print "* DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-2.3.2-p3.tar.gz' 'petsc-2.3.2-p3.tar.gz' *"
-	    print "*                                                                                                                            *"
-	    print "*     This is the old style and the safest way to download a package.                                                        *"
-	    print "*                                                                                                                            *"
-	    print "* DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/libtool' 'libtool.tar.gz'                      *"
-	    print "*                                                                                                                            *"
-	    print "*     This is the new style. For packages like 'Libtool', which we never expect to be using multiple versions, this will     *"
-	    print "*     download the most recent version and save it as the generic 'libtool.tar.gz'.                                          *"
-	    print "*                                                                                                                            *"
-	    print "* DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/gsl-1.' 'gsl-1.15.tar.gz'                      *"
-	    print "*                                                                                                                            *"
-	    print "*     This is the new style. This is a demonstration of how this script can be used to disambiguate a package name if there  *"
-	    print "*     are more than once package matching 'gsl-'.                                                                            *"
-	    print "*                                                                                                                            *"
-	    print "* DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/libtool'                                       *"
-	    print "*                                                                                                                            *"
-	    print "*     This is the new style. This will download a package with 'libtool' as a prefix and save it as its canonical name.      *"
-	    print "*                                                                                                                            *"
-	    print "*                                                                                                                            *"
-	    print "******************************************************************************************************************************"
-	
-	if len(sys.argv) > 2:
-	    localFile=sys.argv[2]
-	    print "Downloaded file will be saved as: " + localFile
-	else:
-	    localFile = None
-	    print "Downloaded file will saved with the same file name."
-	
-	
-	print "Looking for: " + find
-	
-	# As an extra precaution, if no extension is given for a particular package
-	# such as '.../libtool', then ensure that files found are of appropriate
-	# file extensions. 
-	#
-	# WARNING: The external packages directory includes executable binaries with
-	# '.exe' extensions. As such, '.exe' is an acceptable suffix, but this is 
-	# inherently dangerous since this script can be used to download from any
-	# valid website. Furthermore, if an individual attempts a "man-in-the-middle"  
-	# attack, then the user would be capable of downloading executables from 
-	# an untrusted source.
-	pattern = find + "[\w.-]*(\.tar\.gz|tar\.gz2|tgz|zip|exe)?"
-	parser = MyHTMLParser(pattern)
-	
-	# Creates a 'FancyURL' which allows the script to fail gracefully by catching
-	# HTTP error codes 30X and several 40X(where 'X' is a natural number).
-	urlObject = FancyURLopener()
-	obj = urlObject.open(url)
-	parser.feed(obj.read())
-	
-	# If a file pattern was used to describe the file that should be downloaded,
-	# then there is the potential for multiple file matches. Currently, the script
-	# will detect this ambiguity and print out all the matches, while informing 
-	# the user that he must refine his search.
-	#
-	# TODO: Prompt the user to select from a list his/her preferred target.
-	if len(parser.targets) > 1:
-	    print "Could not resolve your download due to the number of hits."
-	    print "Refine your search."
-	    for i in parser.targets:
-	        print i
-	
-	elif len(parser.targets) == 1:
-	    print "Found: " + parser.targets[0]
-	    url += "/" + parser.targets[0]
-	
-	    if localFile is None:
-	        if os.path.exists(parser.targets[0]): 
-	            print "File " + parser.targets[0] + " already exists and will not be downloaded..."
-	        else:
-	            urllib.urlretrieve(url, parser.targets[0])
-	            print "File saved as: " + parser.targets[0]
-	    else:
-	        if os.path.exists(localFile): 
-	            print "File "+ localFile +" already exists and will not be downloaded..."
-	        else:
-	            if parser.targets[0] == localFile:
-	                print "File found and destination match."
-	            elif parser.matcher.match(localFile) != "None":
-	                print "File found matches destination pattern."
-	            else:
-	                print "WARNING: the file found \'" + parser.targets[0] + "\' does not match \'" + localFile + "\'"
-	                print "Ensure the downloaded version is suitable."
-	
-	            urllib.urlretrieve(url, localFile)
-	            print "File saved as: " + localFile
-	
-	else:
-	    print "No matches found!"
-	
-	obj.close()
-# End 'main' function. }}}
+url=sys.argv[1];
+localFile=sys.argv[2]
 
-if __name__ == "__main__":
-    main()
+#Remove file if it already exists
+if os.path.exists(localFile):
+	print "File "+ localFile +" already exists and will not be downloaded..."
+	sys.exit()
+
+#Try to download from url
+httpfail=-1
+try:
+	print "Fetching %s" % localFile
+	urllib.urlretrieve(url,localFile)
+	httpfail=0
+except Exception, e:
+	httpfail=1
+
+#Error message in case it failed
+if (httpfail):
+	failureMessage = '''
+===========================================================================
+Unable to download package %s from: %s
+* If URL specified manually - perhaps there is a typo?
+* If your network is disconnected - please reconnect 
+* Alternatively, you can download the above URL manually
+===========================================================================
+''' % (localFile,url)
+	raise RuntimeError(failureMessage)
Index: sm/trunk-jpl/scripts/DownloadExternalPackage2.py
===================================================================
--- /issm/trunk-jpl/scripts/DownloadExternalPackage2.py	(revision 23392)
+++ 	(revision )
@@ -1,37 +1,0 @@
-#!/usr/bin/env python
-# -*- coding: ISO-8859-1 -*-
-
-import os,sys
-import urllib
-
-#Check inputs
-if(len(sys.argv)!=3): raise NameError('usage: ./DownloadExternalPackage.py URL localfile')
-
-url=sys.argv[1];
-localFile=sys.argv[2]
-
-#Remove file if it already exists
-if os.path.exists(localFile):
-	print "File "+ localFile +" already exists and will not be downloaded..."
-	sys.exit()
-
-#Try to download from url
-httpfail=-1
-try:
-	print "Fetching %s" % localFile
-	urllib.urlretrieve(url,localFile)
-	httpfail=0
-except Exception, e:
-	httpfail=1
-
-#Error message in case it failed
-if (httpfail):
-	failureMessage = '''
-===========================================================================
-Unable to download package %s from: %s
-* If URL specified manually - perhaps there is a typo?
-* If your network is disconnected - please reconnect 
-* Alternatively, you can download the above URL manually
-===========================================================================
-''' % (localFile,url)
-	raise RuntimeError(failureMessage)
Index: /issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 23392)
+++ /issm/trunk-jpl/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp	(revision 23393)
@@ -80,5 +80,5 @@
 	/*launch the thread manager with InterpFromGridToMeshxt as a core: */
 	LaunchThread(InterpFromGridToMeshxt,(void*)&gate,_NUMTHREADS_);
-	_printf_("\r      interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%  \n");
+	//_printf_("\r      interpolation progress: "<<fixed<<setw(6)<<setprecision(2)<<100.<<"%  \n");
 
 	/*Assign output pointers:*/
@@ -133,5 +133,5 @@
 
 		if(debug && my_thread==0)
-		 _printf_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<double(i-i0)/double(i1-i0)*100<<"%   ");
+		 //_printf_("\r      interpolation progress: "<<setw(6)<<setprecision(2)<<double(i-i0)/double(i1-i0)*100<<"%   ");
 		x_grid=*(x_mesh+i);
 		y_grid=*(y_mesh+i);
Index: /issm/trunk-jpl/src/wrappers/matlab/io/ApiPrintf.cpp
===================================================================
--- /issm/trunk-jpl/src/wrappers/matlab/io/ApiPrintf.cpp	(revision 23392)
+++ /issm/trunk-jpl/src/wrappers/matlab/io/ApiPrintf.cpp	(revision 23393)
@@ -15,6 +15,6 @@
 
 	/*use mexPrintf in matlab: */
-	//mexPrintf(string); /*Messes up percentages (like "interpolation progress: 100.00%")*/
-	printf("%s",string);
+	mexPrintf(string); /*Messes up percentages (like "interpolation progress: 100.00%")*/
+	//printf("%s",string);
 	return;
 }
