Index: /issm/trunk-jpl/etc/environment.sh
===================================================================
--- /issm/trunk-jpl/etc/environment.sh	(revision 26949)
+++ /issm/trunk-jpl/etc/environment.sh	(revision 26950)
@@ -507,7 +507,8 @@
 SQLITE_ROOT="${ISSM_EXT_DIR}/sqlite/install"
 if [ -d "${SQLITE_ROOT}" ]; then
-	path_append "${SQLITE_ROOT}/bin"
-	library_path_append "${SQLITE_ROOT}/lib"
-	ld_library_path_append "${SQLITE_ROOT}/lib"
+	path_prepend "${SQLITE_ROOT}/bin"
+	cpath_prepend "${SQLITE_ROOT}/include"
+	library_path_prepend "${SQLITE_ROOT}/lib"
+	ld_library_path_prepend "${SQLITE_ROOT}/lib"
 fi
 
Index: /issm/trunk-jpl/externalpackages/dakota/configs/6.2/linux/cmake/BuildDakotaCustom.pleiades.cmake
===================================================================
--- /issm/trunk-jpl/externalpackages/dakota/configs/6.2/linux/cmake/BuildDakotaCustom.pleiades.cmake	(revision 26950)
+++ /issm/trunk-jpl/externalpackages/dakota/configs/6.2/linux/cmake/BuildDakotaCustom.pleiades.cmake	(revision 26950)
@@ -0,0 +1,93 @@
+##############################################################################
+#
+# Template CMake Configuration File.
+#
+##############################################################################
+# The following CMake variables represent the minimum set of variables
+# that are required to allow Dakota to
+#   * find all prerequisite third party libraries (TPLs)
+#   * configure compiler and MPI options
+#   * set Dakota install path
+#
+# Instructions:
+# 1. Read Dakota/INSTALL - Source Quick Start to use this template file.
+#
+# 2. Uncomment CMake variables below ONLY for values you need to change for
+#    your platform. Edit variables as needed.
+#
+#    For example, if you are using a custom install of Boost, installed in
+#    /home/me/usr/boost, uncomment both CMake Boost variables  and edit
+#    paths:
+#       set(BOOST_ROOT
+#           "/home/me/usr/boost"
+#           CACHE PATH "Use non-standard Boost install" FORCE)
+#       set( Boost_NO_SYSTEM_PATHS TRUE
+#            CACHE BOOL "Supress search paths other than BOOST_ROOT" FORCE)
+#
+#    Save file and exit.
+#
+# 6. Run CMake with script file. At terminal window, type:
+#      $ cmake -C BuildCustom.cmake $DAK_SRC
+#
+#    If you have not followed instructions in INSTALL -Source Quick Start,
+#    you will need to replace BuildCustom.cmake with the actual filename of
+#    this file and $DAK_SRC with the actual path to Dakota source.
+#
+##############################################################################
+
+##############################################################################
+# Set BLAS, LAPACK library paths ONLY if in non-standard locations
+##############################################################################
+set( BLAS_LIBS
+      "$ENV{BLAS_LIBS}"
+      CACHE FILEPATH "Use non-standard BLAS library path" FORCE )
+set( LAPACK_LIBS
+      "$ENV{LAPACK_LIBS}"
+      CACHE FILEPATH "Use non-standard BLAS library path" FORCE )
+
+##############################################################################
+# Set additional compiler options
+# Uncomment and replace <flag> with actual compiler flag, e.g. -xxe4.2
+##############################################################################
+#set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} <flag>" 
+#     CACHE STRING "C Flags my platform" )
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMPICH_IGNORE_CXX_SEEK"
+     CACHE STRING "CXX Flags for my platform" )
+#set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} <flag>"
+#     CACHE STRING "Fortran Flags for my platform" )
+
+##############################################################################
+# Set MPI options
+# Recommended practice is to set DAKOTA_HAVE_MPI and set MPI_CXX_COMPILER
+# to a compiler wrapper.
+##############################################################################
+set( DAKOTA_HAVE_MPI ON
+     CACHE BOOL "Build with MPI enabled" FORCE)
+#set( MPI_CXX_COMPILER "path/to/mpicxx"
+#     CACHE FILEPATH "Use MPI compiler wrapper" FORCE)
+
+##############################################################################
+# Set Boost path if CMake cannot find your installed version of Boost or
+# if you have a custom Boost install location.
+##############################################################################
+set(BOOST_ROOT
+    $ENV{BOOST_ROOT}
+    CACHE PATH "Use non-standard Boost install" FORCE)
+set( Boost_NO_SYSTEM_PATHS TRUE
+     CACHE BOOL "Supress search paths other than BOOST_ROOT" FORCE)
+
+##############################################################################
+# Set Trilinos path if you want have a custom Trilinos install location. If
+# not set, the Trilinos package, teuchos, will be build during the Dakota
+# build.
+##############################################################################
+#set( Trilinos_DIR
+#      "path/to/Trilinos/install"
+#      CACHE PATH "Path to installed Trilinos" FORCE )
+
+##############################################################################
+# Customize DAKOTA
+##############################################################################
+set( CMAKE_INSTALL_PREFIX
+     $ENV{DAK_INSTALL}
+     CACHE PATH "Path to Dakota installation" )
Index: /issm/trunk-jpl/externalpackages/dakota/install-6.2-pleiades.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/dakota/install-6.2-pleiades.sh	(revision 26949)
+++ /issm/trunk-jpl/externalpackages/dakota/install-6.2-pleiades.sh	(revision 26950)
@@ -2,47 +2,50 @@
 set -eu
 
-#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-6.2-public.src.tar.gz' 'dakota-6.2-public-src.tar.gz'
+## Constants
+#
+VER="6.2"
 
-#Untar 
-tar -zxvf dakota-6.2-public-src.tar.gz
+PREFIX="${ISSM_DIR}/externalpackages/dakota/install" # Set to location where external package should be installed
 
-#Move Dakota to src directory
-mv dakota-6.2.0.src/* src
-rm -rf dakota-6.2.0.src
+## Environment
+#
+export BLAS_LIBS="-L/nasa/intel/Compiler/2018.3.222/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64/ -lmkl_intel_lp64 -lmkl_sequential -lmkl_core" # Need to export BLAS_LIBS *and* pass it as an option to CMake to ensure that external packages also find it; should upate to /nasa/intel/Compiler/2021.4.0/mkl/2021.4.0/lib/intel64
+export CXXFLAGS='-std=c++11'
+export DAK_BUILD=${ISSM_DIR}/externalpackages/dakota/build # DO NOT CHANGE THIS
+export DAK_INSTALL=${PREFIX} # DO NOT CHANGE THIS
+export DAK_SRC=${ISSM_DIR}/externalpackages/dakota/src # DO NOT CHANGE THIS
+export LAPACK_LIBS="-L/nasa/intel/Compiler/2018.3.222/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64/lib/intel64/ -lmkl_intel_lp64 -lmkl_sequential -lmkl_core" # Need to export LAPACK_LIBS *and* pass it as an option to CMake to ensure that external packages also find it; should upate to /nasa/intel/Compiler/2021.4.0/mkl/2021.4.0/lib/intel64
 
-#Set up Dakota cmake variables and config
-export DAK_SRC=$ISSM_DIR/externalpackages/dakota/src
-export DAK_BUILD=$ISSM_DIR/externalpackages/dakota/build
-export BOOST_ROOT=$ISSM_DIR/externalpackages/boost/install
+# Cleanup
+rm -rf ${DAK_BUILD} ${DAK_INSTALL} ${DAK_SRC}
+mkdir -p ${DAK_BUILD} ${DAK_INSTALL} ${DAK_SRC}
 
-export CXXFLAGS='-std=c++11' # Setting CXXFLAGS to deal with C++11 incompatibility with MATLAB's Boost (absolutely necessary for this version)
+# Download source
+${ISSM_DIR}/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/dakota-${VER}-public.src.tar.gz" "dakota-${VER}-public-src.tar.gz"
 
-cp $DAK_SRC/cmake/BuildDakotaTemplate.cmake $DAK_SRC/cmake/BuildDakotaCustom.cmake
-patch $DAK_SRC/cmake/BuildDakotaCustom.cmake configs/6.2/BuildDakotaCustom.cmake.pfe.patch
-patch $DAK_SRC/cmake/DakotaDev.cmake configs/6.2/DakotaDev.cmake.patch
-patch $DAK_SRC/CMakeLists.txt configs/6.2/CMakeLists.txt.pfe.patch
+# Unpack source
+tar -zxvf dakota-${VER}-public-src.tar.gz
 
-#Apply patches
-patch src/src/NonDSampling.cpp configs/6.2/NonDSampling.cpp.patch
-patch src/src/NonDLocalReliability.cpp configs/6.2/NonDLocalReliability.cpp.patch
-patch src/packages/pecos/src/pecos_global_defs.hpp configs/6.2/pecos_global_defs.hpp.patch
+# Move source to 'src' directory
+mv dakota-${VER}.0.src/* ${DAK_SRC}
+rm -rf dakota-${VER}.0.src
 
-#Configure dakota
-cd $DAK_BUILD
+# Copy customized source and configuration files to 'src' directory
+cp configs/${VER}/packages/DDACE/src/Analyzer/MainEffectsExcelOutput.cpp ${DAK_SRC}/packages/DDACE/src/Analyzer
+cp configs/${VER}/packages/queso/src/misc/src/1DQuadrature.C ${DAK_SRC}/packages/queso/src/misc/src
+cp configs/${VER}/packages/surfpack/src/surfaces/nkm/NKM_KrigingModel.cpp ${DAK_SRC}/packages/surfpack/src/surfaces/nkm
+cp configs/${VER}/packages/VPISparseGrid/src/sandia_rules.cpp ${DAK_SRC}/packages/VPISparseGrid/src
+cp configs/${VER}/src/DakotaInterface.cpp ${DAK_SRC}/src
+cp configs/${VER}/src/NonDLocalReliability.cpp ${DAK_SRC}/src
+cp configs/${VER}/src/NonDSampling.cpp ${DAK_SRC}/src
 
+# Copy customized source and configuration files specific to Linux to 'src' directory
+cp configs/${VER}/linux/cmake/BuildDakotaCustom.pleiades.cmake ${DAK_SRC}/cmake/BuildDakotaCustom.cmake
+cp configs/${VER}/linux/cmake/DakotaDev.cmake ${DAK_SRC}/cmake
+
+# Configure
+cd ${DAK_BUILD}
 cmake \
-	-DBOOST_ROOT:PATHNAME=$BOOST_ROOT \
-	-DBoost_LIBRARY_DIRS:FILEPATH=${BOOST_ROOT}/lib \
-	-DBoost_INCLUDE_DIR:FILEPATH=${BOOST_ROOT}/include \
-	-DBoost_NO_BOOST_CMAKE=TRUE \
-	-DBoost_NO_SYSTEM_PATHS=TRUE \
 	-DBUILD_SHARED_LIBS=ON \
 	-DBUILD_STATIC_LIBS=OFF \
@@ -50,6 +53,6 @@
 	-DCMAKE_C_FLAGS="-Wno-error=implicit-function-declaration" \
 	-DCMAKE_CXX_COMPILER=mpicxx \
-	-DCMAKE_CXX_FLAGS="-lstdc++" \
 	-DCMAKE_Fortran_COMPILER=/usr/bin/gfortran \
+	-DBoost_NO_BOOST_CMAKE=TRUE \
 	-DHAVE_ACRO=OFF \
 	-DHAVE_JEGA=OFF \
@@ -60,10 +63,6 @@
 	${DAK_SRC}
 
-cd ..
-
-#Compile and install dakota
-cd $DAK_BUILD
-if [ $# -eq 0 ];
-then
+# Compile and install
+if [ $# -eq 0 ]; then
 	make
 	make install
@@ -72,3 +71,8 @@
 	make -j $1 install
 fi
-cd ..
+
+cd ${DAK_INSTALL}
+
+# Comment out definition of HAVE_MPI in Teuchos config header file in order to
+# avoid conflict with our definition
+sed -i -e "s/#define HAVE_MPI/\/* #define HAVE_MPI *\//g" include/Teuchos_config.h
Index: /issm/trunk-jpl/externalpackages/hdf5/install-1-parallel-with_tests.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/hdf5/install-1-parallel-with_tests.sh	(revision 26950)
+++ /issm/trunk-jpl/externalpackages/hdf5/install-1-parallel-with_tests.sh	(revision 26950)
@@ -0,0 +1,47 @@
+#!/bin/bash
+set -eu
+
+
+# Constants
+#
+VER="1.10.5"
+
+PREFIX="${ISSM_DIR}/externalpackages/hdf5/install" # Set to location where external package should be installed
+
+## Environnment
+#
+export CC=mpicc
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/hdf5-${VER}.tar.gz" "hdf5-${VER}.tar.gz"
+
+# Untar source
+tar -zxvf hdf5-${VER}.tar.gz
+
+# Cleanup
+rm -rf install src
+mkdir install src
+
+# Move source to 'src' directory
+mv hdf5-${VER}/* src/
+rm -rf hdf5-${VER}
+
+# Configure
+cd src
+./configure \
+	--prefix="${PREFIX}" \
+	--enable-parallel \
+	--with-zlib="${ZLIB_ROOT}" \
+	--enable-hl
+
+# Compile, test, and install
+#
+if [ $# -eq 0 ]; then
+	make
+	make check
+	make install
+else
+	make -j $1
+	make -j $1 check
+	make -j $1 install
+fi
Index: /issm/trunk-jpl/externalpackages/hdf5/install-1-parallel.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/hdf5/install-1-parallel.sh	(revision 26950)
+++ /issm/trunk-jpl/externalpackages/hdf5/install-1-parallel.sh	(revision 26950)
@@ -0,0 +1,45 @@
+#!/bin/bash
+set -eu
+
+
+# Constants
+#
+VER="1.10.5"
+
+PREFIX="${ISSM_DIR}/externalpackages/hdf5/install" # Set to location where external package should be installed
+
+## Environnment
+#
+export CC=mpicc
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/hdf5-${VER}.tar.gz" "hdf5-${VER}.tar.gz"
+
+# Untar source
+tar -zxvf hdf5-${VER}.tar.gz
+
+# Cleanup
+rm -rf install src
+mkdir install src
+
+# Move source to 'src' directory
+mv hdf5-${VER}/* src/
+rm -rf hdf5-${VER}
+
+# Configure
+cd src
+./configure \
+	--prefix="${PREFIX}" \
+	--enable-parallel \
+	--with-zlib="${ZLIB_ROOT}" \
+	--enable-hl
+
+# Compile and install
+#
+if [ $# -eq 0 ]; then
+	make
+	make install
+else
+	make -j $1
+	make -j $1 install
+fi
Index: /issm/trunk-jpl/externalpackages/hdf5/install-1-with_tests.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/hdf5/install-1-with_tests.sh	(revision 26950)
+++ /issm/trunk-jpl/externalpackages/hdf5/install-1-with_tests.sh	(revision 26950)
@@ -0,0 +1,42 @@
+#!/bin/bash
+set -eu
+
+
+## Constants
+#
+VER="1.10.5"
+
+PREFIX="${ISSM_DIR}/externalpackages/hdf5/install" # Set to location where external package should be installed
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/hdf5-${VER}.tar.gz" "hdf5-${VER}.tar.gz"
+
+# Untar source
+tar -zxvf hdf5-${VER}.tar.gz
+
+# Cleanup
+rm -rf install src
+mkdir install src
+
+# Move source to 'src' directory
+mv hdf5-${VER}/* src/
+rm -rf hdf5-${VER}
+
+# Configure
+cd src
+./configure \
+	--prefix="${PREFIX}" \
+	--with-zlib="${ZLIB_ROOT}" \
+	--enable-hl
+
+# Compile, test, and install
+#
+if [ $# -eq 0 ]; then
+	make
+	make check
+	make install
+else
+	make -j $1
+	make -j $1 check
+	make -j $1 install
+fi
Index: sm/trunk-jpl/externalpackages/hdf5/install-1.10-parallel-with_tests.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/hdf5/install-1.10-parallel-with_tests.sh	(revision 26949)
+++ 	(revision )
@@ -1,49 +1,0 @@
-#!/bin/bash
-set -eu
-
-
-# Constants
-#
-VER="1.10.5"
-ZLIB_ROOT="${ISSM_DIR}/externalpackages/zlib/install"
-
-## Environnment
-#
-export CC=mpicc
-
-# Download source
-$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/hdf5-${VER}.tar.gz" "hdf5-${VER}.tar.gz"
-
-# Untar source
-tar -zxvf hdf5-$VER.tar.gz
-
-# Cleanup
-rm -rf install src
-mkdir install src
-
-# Move source to 'src' directory
-mv hdf5-$VER/* src/
-rm -rf hdf5-$VER
-
-# Configure
-cd src
-./configure \
-	--prefix="${ISSM_DIR}/externalpackages/hdf5/install" \
-	--enable-parallel \
-	--with-zlib=${ZLIB_ROOT} \
-	--enable-hl
-
-# Compile, test, and install
-#
-if [ $# -eq 0 ]; then
-	make
-	make check
-	make install
-else
-	make -j $1
-	make -j $1 check
-	make -j $1 install
-fi
-
-# Return to initial directory
-cd ..
Index: sm/trunk-jpl/externalpackages/hdf5/install-1.10-parallel.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/hdf5/install-1.10-parallel.sh	(revision 26949)
+++ 	(revision )
@@ -1,47 +1,0 @@
-#!/bin/bash
-set -eu
-
-
-# Constants
-#
-VER="1.10.5"
-ZLIB_ROOT="${ISSM_DIR}/externalpackages/zlib/install"
-
-## Environnment
-#
-export CC=mpicc
-
-# Download source
-$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/hdf5-${VER}.tar.gz" "hdf5-${VER}.tar.gz"
-
-# Untar source
-tar -zxvf hdf5-$VER.tar.gz
-
-# Cleanup
-rm -rf install src
-mkdir install src
-
-# Move source to 'src' directory
-mv hdf5-$VER/* src/
-rm -rf hdf5-$VER
-
-# Configure
-cd src
-./configure \
-	--prefix="${ISSM_DIR}/externalpackages/hdf5/install" \
-	--enable-parallel \
-	--with-zlib=${ZLIB_ROOT} \
-	--enable-hl
-
-# Compile and install
-#
-if [ $# -eq 0 ]; then
-	make
-	make install
-else
-	make -j $1
-	make -j $1 install
-fi
-
-# Return to initial directory
-cd ..
Index: sm/trunk-jpl/externalpackages/hdf5/install-1.10-with_tests.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/hdf5/install-1.10-with_tests.sh	(revision 26949)
+++ 	(revision )
@@ -1,44 +1,0 @@
-#!/bin/bash
-set -eu
-
-
-## Constants
-#
-VER="1.10.5"
-ZLIB_ROOT="${ISSM_DIR}/externalpackages/zlib/install"
-
-# Download source
-$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/hdf5-${VER}.tar.gz" "hdf5-${VER}.tar.gz"
-
-# Untar source
-tar -zxvf hdf5-$VER.tar.gz
-
-# Cleanup
-rm -rf install src
-mkdir install src
-
-# Move source to 'src' directory
-mv hdf5-$VER/* src/
-rm -rf hdf5-$VER
-
-# Configure
-cd src
-./configure \
-	--prefix="${ISSM_DIR}/externalpackages/hdf5/install" \
-	--with-zlib=${ZLIB_ROOT} \
-	--enable-hl
-
-# Compile, test, and install
-#
-if [ $# -eq 0 ]; then
-	make
-	make check
-	make install
-else
-	make -j $1
-	make -j $1 check
-	make -j $1 install
-fi
-
-# Return to initial directory
-cd ..
Index: sm/trunk-jpl/externalpackages/hdf5/install-1.10.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/hdf5/install-1.10.sh	(revision 26949)
+++ 	(revision )
@@ -1,42 +1,0 @@
-#!/bin/bash
-set -eu
-
-
-## Constants
-#
-VER="1.10.5"
-ZLIB_ROOT="${ISSM_DIR}/externalpackages/zlib/install"
-
-# Download source
-$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/hdf5-${VER}.tar.gz" "hdf5-${VER}.tar.gz"
-
-# Untar source
-tar -zxvf hdf5-$VER.tar.gz
-
-# Cleanup
-rm -rf install src
-mkdir install src
-
-# Move source to 'src' directory
-mv hdf5-$VER/* src/
-rm -rf hdf5-$VER
-
-# Configure
-cd src
-./configure \
-	--prefix="${ISSM_DIR}/externalpackages/hdf5/install" \
-	--with-zlib=${ZLIB_ROOT} \
-	--enable-hl
-
-# Compile and install
-#
-if [ $# -eq 0 ]; then
-	make
-	make install
-else
-	make -j $1
-	make -j $1 install
-fi
-
-# Return to initial directory
-cd ..
Index: /issm/trunk-jpl/externalpackages/hdf5/install-1.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/hdf5/install-1.sh	(revision 26950)
+++ /issm/trunk-jpl/externalpackages/hdf5/install-1.sh	(revision 26950)
@@ -0,0 +1,40 @@
+#!/bin/bash
+set -eu
+
+
+## Constants
+#
+VER="1.10.5"
+
+PREFIX="${ISSM_DIR}/externalpackages/hdf5/install" # Set to location where external package should be installed
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/hdf5-${VER}.tar.gz" "hdf5-${VER}.tar.gz"
+
+# Untar source
+tar -zxvf hdf5-${VER}.tar.gz
+
+# Cleanup
+rm -rf install src
+mkdir install src
+
+# Move source to 'src' directory
+mv hdf5-${VER}/* src/
+rm -rf hdf5-${VER}
+
+# Configure
+cd src
+./configure \
+	--prefix="${PREFIX}" \
+	--with-zlib="${ZLIB_ROOT}" \
+	--enable-hl
+
+# Compile and install
+#
+if [ $# -eq 0 ]; then
+	make
+	make install
+else
+	make -j $1
+	make -j $1 install
+fi
Index: sm/trunk-jpl/externalpackages/hdf5/install.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/hdf5/install.sh	(revision 26949)
+++ 	(revision )
@@ -1,36 +1,0 @@
-#!/bin/bash
-set -eu
-
-VER="1.8.9"
-
-# Cleanup
-rm -rf src install hdf5-${VER}
-mkdir src install
-
-# Download source
-$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/hdf5-${VER}.tar.gz" "hdf5-${VER}.tar.gz"
-
-# Untar source
-tar -zxvf  hdf5-${VER}.tar.gz
-
-# Move source to src directory
-rm -rf src/*
-mv hdf5-${VER}/* src/
-rm -rf hdf5-${VER}
-
-# This project uses C code with C++-style comments. As such, we need to specify
-# a C standard that supports them.
-export CFLAGS='-std=c99'
-
-# Configure, compile, and install
-cd src
-./configure \
-	--prefix="$ISSM_DIR/externalpackages/hdf5/install"
-
-if [ $# -eq 0 ]; then
-	make
-	make install
-else
-	make -j $1
-	make -j $1 install
-fi
Index: /issm/trunk-jpl/externalpackages/petsc/install-3.14-linux.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/petsc/install-3.14-linux.sh	(revision 26949)
+++ /issm/trunk-jpl/externalpackages/petsc/install-3.14-linux.sh	(revision 26950)
@@ -11,5 +11,5 @@
 
 # Download source
-$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
 
 # Unpack source
Index: /issm/trunk-jpl/externalpackages/petsc/install-3.14-mac.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/petsc/install-3.14-mac.sh	(revision 26949)
+++ /issm/trunk-jpl/externalpackages/petsc/install-3.14-mac.sh	(revision 26950)
@@ -4,8 +4,12 @@
 
 ## Constants
+#
 VER="3.14.0"
 
+PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" # DO NOT CHANGE THIS
+PREFIX="${ISSM_DIR}/externalpackages/petsc/install" # Set to location where external package should be installed
+
 # Download source
-$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
 
 # Unpack source
@@ -13,9 +17,9 @@
 
 # Cleanup
-rm -rf install src
-mkdir install src
+rm -rf ${PREFIX} ${PETSC_DIR}
+mkdir ${PETSC_DIR}
 
-# Move source to 'src' directory
-mv petsc-${VER}/* src/
+# Move source to $PETSC_DIR
+mv petsc-${VER}/* ${PETSC_DIR}
 rm -rf petsc-${VER}
 
@@ -23,4 +27,6 @@
 #
 # NOTE:
+# - Added -Wno-error=implicit-function-declaration to CFLAGS for Clang >= 12. 
+#	(may need to remove it for earlier versions not using the C99 standard).
 # - Added -fallow-argument-mismatch to FFLAGS in order to clear,
 #
@@ -29,11 +35,9 @@
 #
 #	for gfortran 10 or later (may need to remove it for earlier versions).
-# - Added -Wno-error=implicit-function-declaration to CFLAGS for Clang >= 12. 
-#	(may need to remove it for earlier versions not using the C99 standard).
 #
-cd src
+cd ${PETSC_DIR}
 ./config/configure.py \
-	--prefix="${ISSM_DIR}/externalpackages/petsc/install" \
-	--PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" \
+	--prefix="${PREFIX}" \
+	--PETSC_DIR="${PETSC_DIR}" \
 	--CFLAGS="-Wno-error=implicit-function-declaration" \
 	--FFLAGS="-fallow-argument-mismatch" \
Index: /issm/trunk-jpl/externalpackages/petsc/install-3.14-pleiades.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/petsc/install-3.14-pleiades.sh	(revision 26949)
+++ /issm/trunk-jpl/externalpackages/petsc/install-3.14-pleiades.sh	(revision 26950)
@@ -3,15 +3,13 @@
 
 
-# NOTE: There is a single difference between the Linux and macOS 
-#		configurations, which is the addition of the -static-libgfortran 
-#		option to FFLAGS on the macOS static configurations. For the sake of 
-#		consistency, we maintain separate files for each, respective Linux and 
-#		macOS configuration.
-
-# Constants
+## Constants
+#
 VER="3.14.0"
 
+PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" # DO NOT CHANGE THIS
+PREFIX="${ISSM_DIR}/externalpackages/petsc/install" # Set to location where external package should be installed
+
 # Download source
-$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
 
 # Unpack source
@@ -19,17 +17,19 @@
 
 # Cleanup
-rm -rf install src
-mkdir install src
+rm -rf ${PREFIX} ${PETSC_DIR}
+mkdir ${PETSC_DIR}
 
-# Move source to 'src' directory
-mv petsc-${VER}/* src/
+# Move source to $PETSC_DIR
+mv petsc-${VER}/* ${PETSC_DIR}
 rm -rf petsc-${VER}
 
 # Configure
-cd src
+cd ${PETSC_DIR}
 ./config/configure.py \
-	COPTFLAGS="-g -O3" CXXOPTFLAGS="-g -O3" FOPTFLAGS="-g -O3" \
-	--prefix="${ISSM_DIR}/externalpackages/petsc/install" \
-	--PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" \
+	--prefix="${PREFIX}" \
+	--PETSC_DIR="${PETSC_DIR}" \
+	--CFLAGS="-g -O3" \
+	--CXXFLAGS="-g -O3" \
+	--FFLAGS="-g -O3" \
 	--with-debugging=0 \
 	--with-valgrind=0 \
@@ -41,9 +41,7 @@
 	--with-scalapack-include=/nasa/intel/Compiler/2018.3.222/mkl/include \
 	--with-scalapack-lib="/nasa/intel/Compiler/2018.3.222/mkl/lib/intel64/libmkl_scalapack_lp64.so /nasa/intel/Compiler/2018.3.222/mkl/lib/intel64/libmkl_blacs_intelmpi_lp64.so" \
-	--with-shared-libraries=1 \
 	--download-metis=1 \
 	--download-parmetis=1 \
-	--download-scalapack=0 \
-	--download-mumps=1
+	--download-scalapack=0
 
 # Compile and install
Index: /issm/trunk-jpl/externalpackages/petsc/install-3.15-pleiades.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/petsc/install-3.15-pleiades.sh	(revision 26949)
+++ /issm/trunk-jpl/externalpackages/petsc/install-3.15-pleiades.sh	(revision 26950)
@@ -7,6 +7,9 @@
 VER="3.15.0"
 
+PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" # DO NOT CHANGE THIS
+PREFIX="${ISSM_DIR}/externalpackages/petsc/install" # Set to location where external package should be installed
+
 # Download source
-$ISSM_DIR/scripts/DownloadExternalPackage.sh 'https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.15.0.tar.gz' 'petsc-3.15.0.tar.gz'
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
 
 # Unpack source
@@ -28,6 +31,6 @@
 cd src
 ./config/configure.py \
-	--prefix="${ISSM_DIR}/externalpackages/petsc/install" \
-	--PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" \
+	--prefix="${PREFIX}" \
+	--PETSC_DIR="${PETSC_DIR}" \
 	--with-blas-lapack-dir="/nasa/intel/Compiler/2018.3.222/compilers_and_libraries_2018.3.222/linux/mkl" \
 	--with-scalapack-include=/nasa/intel/Compiler/2018.3.222/mkl/include \
Index: /issm/trunk-jpl/externalpackages/petsc/install-3.16-pleiades.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/petsc/install-3.16-pleiades.sh	(revision 26950)
+++ /issm/trunk-jpl/externalpackages/petsc/install-3.16-pleiades.sh	(revision 26950)
@@ -0,0 +1,53 @@
+#!/bin/bash
+set -eu
+
+
+## Constants
+#
+VER="3.16.4"
+
+PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" # DO NOT CHANGE THIS
+PREFIX="${ISSM_DIR}/externalpackages/petsc/install" # Set to location where external package should be installed
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
+
+# Unpack source
+tar -zxvf petsc-${VER}.tar.gz
+
+# Cleanup
+rm -rf install src
+mkdir install src
+
+# Move source to $PETSC_DIR
+mv petsc-${VER}/* src/
+rm -rf petsc-${VER}
+
+
+# Configure
+#
+# NOTE: Based on /nasa/petsc/3.7.5/intel_mpt/lib/petsc/conf/petscvariables; look for CONFIGURE_OPTIONS
+#
+cd src
+./config/configure.py \
+	--prefix="${PREFIX}" \
+	--PETSC_DIR="${PETSC_DIR}" \
+	--with-blas-lapack-dir="/nasa/intel/Compiler/2018.3.222/compilers_and_libraries_2018.3.222/linux/mkl" \
+	--with-scalapack-include=/nasa/intel/Compiler/2018.3.222/mkl/include \
+	--with-scalapack-lib="/nasa/intel/Compiler/2018.3.222/mkl/lib/intel64/libmkl_scalapack_lp64.so /nasa/intel/Compiler/2018.3.222/mkl/lib/intel64/libmkl_blacs_intelmpi_lp64.so" \
+	--with-make-np=10 \
+	--known-mpi-shared-libraries=1 \
+	--with-debugging=0 \
+	--with-valgrind=0 \
+	--with-x=0 \
+	--with-ssl=0 \
+	--with-batch=1  \
+	--with-shared-libraries=1 \
+	--download-metis=1 \
+	--download-parmetis=1 \
+	--download-mumps=1 \
+	--download-scalapack=0
+
+# Compile and install
+make
+make install
Index: /issm/trunk-jpl/externalpackages/python/install-2-linux.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/python/install-2-linux.sh	(revision 26950)
+++ /issm/trunk-jpl/externalpackages/python/install-2-linux.sh	(revision 26950)
@@ -0,0 +1,33 @@
+#!/bin/bash
+set -eu
+
+#Some cleanup
+rm -rf install src
+rm -rf Python-2.7.3
+mkdir install src
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.sh https://issm.ess.uci.edu/files/externalpackages/Python-2.7.3.tgz Python-2.7.3.tgz
+
+#Untar and move python into install directory
+tar -zxvf  Python-2.7.3.tgz
+mv Python-2.7.3/* src
+rm -rf Python-2.7.3
+
+#Configure python
+cd src 
+./configure \
+ --prefix="$ISSM_DIR/externalpackages/python/install" \
+ --enable-shared
+
+if [ $# -eq 0 ]; then
+	make
+else
+	make -j $1
+fi
+make install
+
+cd ../install/include
+cp python2.7/* ./
+cd ../lib
+ln -s  libpython2.7.so.1.0 libpython.so
Index: /issm/trunk-jpl/externalpackages/python/install-2-mac-snowleopard.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/python/install-2-mac-snowleopard.sh	(revision 26950)
+++ /issm/trunk-jpl/externalpackages/python/install-2-mac-snowleopard.sh	(revision 26950)
@@ -0,0 +1,41 @@
+#!/bin/bash
+set -eu
+
+#Some cleanup
+rm -rf install src
+rm -rf Python-2.7.3
+mkdir install src
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.sh https://issm.ess.uci.edu/files/externalpackages/Python-2.7.3.tgz Python-2.7.3.tgz
+
+#exports
+export MACOSX_DEPLOYMENT_TARGET=10.6
+
+#Untar and move python into install directory
+tar -zxvf  Python-2.7.3.tgz
+mv Python-2.7.3/* src
+rm -rf Python-2.7.3
+
+#Configure doxygen
+cd src 
+# --enable-framework needs to have the form "$SOME_PATH/Library/Frameworks" to avoid installing components in /Applications directory
+# --prefix is recognized as $SOME_PATH as long as this form is taken, so it's not necessary to include
+./configure --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks" \
+	LDFLAGS="-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10/4.6.2/ -lgfortran "
+
+#make
+if [ $# -eq 0 ]; then
+	make
+else
+	make -j $1
+fi
+make install
+
+cd ../install
+ln -s Library/Frameworks/Python.framework/Headers include
+ln -s Library/Frameworks/Python.framework/Versions/2.7/lib lib
+
+#Patch pyport.h:
+cd include
+patch pyport.h $ISSM_DIR/externalpackages/python/patches/pyport.h.patch
Index: /issm/trunk-jpl/externalpackages/python/install-2-mac.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/python/install-2-mac.sh	(revision 26950)
+++ /issm/trunk-jpl/externalpackages/python/install-2-mac.sh	(revision 26950)
@@ -0,0 +1,40 @@
+#!/bin/bash
+set -eu
+
+#Some cleanup
+rm -rf install src
+rm -rf Python-2.7.3
+mkdir install src
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.sh https://issm.ess.uci.edu/files/externalpackages/Python-2.7.3.tgz Python-2.7.3.tgz
+
+#Untar and move python into install directory
+tar -zxvf  Python-2.7.3.tgz
+mv Python-2.7.3/* src
+rm -rf Python-2.7.3
+
+#Configure and compile
+cd src 
+./configure \
+ --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks" 
+if [ $# -eq 0 ]; then
+	make
+else
+	make -j $1
+fi
+make install
+
+cd ../install
+
+#get rid of bin, because it's just a copy of
+#Library/Frameworks/Python.framework/Versions/2.7/bin, and will not reflect
+#new changes being made
+rm -rf bin
+ln -s Library/Frameworks/Python.framework/Headers include
+ln -s Library/Frameworks/Python.framework/Versions/2.7/lib lib
+ln -s Library/Frameworks/Python.framework/Versions/2.7/bin bin
+
+#Patch pyport.h:
+cd include
+patch pyport.h $ISSM_DIR/externalpackages/python/patches/pyport.h.patch
Index: sm/trunk-jpl/externalpackages/python/install-2.7.3-linux64.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/python/install-2.7.3-linux64.sh	(revision 26949)
+++ 	(revision )
@@ -1,33 +1,0 @@
-#!/bin/bash
-set -eu
-
-#Some cleanup
-rm -rf install src
-rm -rf Python-2.7.3
-mkdir install src
-
-#Download from ISSM server
-$ISSM_DIR/scripts/DownloadExternalPackage.sh https://issm.ess.uci.edu/files/externalpackages/Python-2.7.3.tgz Python-2.7.3.tgz
-
-#Untar and move python into install directory
-tar -zxvf  Python-2.7.3.tgz
-mv Python-2.7.3/* src
-rm -rf Python-2.7.3
-
-#Configure python
-cd src 
-./configure \
- --prefix="$ISSM_DIR/externalpackages/python/install" \
- --enable-shared
-
-if [ $# -eq 0 ]; then
-	make
-else
-	make -j $1
-fi
-make install
-
-cd ../install/include
-cp python2.7/* ./
-cd ../lib
-ln -s  libpython2.7.so.1.0 libpython.so
Index: sm/trunk-jpl/externalpackages/python/install-2.7.3-macosx-snowleopard.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/python/install-2.7.3-macosx-snowleopard.sh	(revision 26949)
+++ 	(revision )
@@ -1,41 +1,0 @@
-#!/bin/bash
-set -eu
-
-#Some cleanup
-rm -rf install src
-rm -rf Python-2.7.3
-mkdir install src
-
-#Download from ISSM server
-$ISSM_DIR/scripts/DownloadExternalPackage.sh https://issm.ess.uci.edu/files/externalpackages/Python-2.7.3.tgz Python-2.7.3.tgz
-
-#exports
-export MACOSX_DEPLOYMENT_TARGET=10.6
-
-#Untar and move python into install directory
-tar -zxvf  Python-2.7.3.tgz
-mv Python-2.7.3/* src
-rm -rf Python-2.7.3
-
-#Configure doxygen
-cd src 
-# --enable-framework needs to have the form "$SOME_PATH/Library/Frameworks" to avoid installing components in /Applications directory
-# --prefix is recognized as $SOME_PATH as long as this form is taken, so it's not necessary to include
-./configure --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks" \
-	LDFLAGS="-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10/4.6.2/ -lgfortran "
-
-#make
-if [ $# -eq 0 ]; then
-	make
-else
-	make -j $1
-fi
-make install
-
-cd ../install
-ln -s Library/Frameworks/Python.framework/Headers include
-ln -s Library/Frameworks/Python.framework/Versions/2.7/lib lib
-
-#Patch pyport.h:
-cd include
-patch pyport.h $ISSM_DIR/externalpackages/python/patches/pyport.h.patch
Index: sm/trunk-jpl/externalpackages/python/install-2.7.3-macosx.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/python/install-2.7.3-macosx.sh	(revision 26949)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#!/bin/bash
-set -eu
-
-#Some cleanup
-rm -rf install src
-rm -rf Python-2.7.3
-mkdir install src
-
-#Download from ISSM server
-$ISSM_DIR/scripts/DownloadExternalPackage.sh https://issm.ess.uci.edu/files/externalpackages/Python-2.7.3.tgz Python-2.7.3.tgz
-
-#Untar and move python into install directory
-tar -zxvf  Python-2.7.3.tgz
-mv Python-2.7.3/* src
-rm -rf Python-2.7.3
-
-#Configure and compile
-cd src 
-./configure \
- --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks" 
-if [ $# -eq 0 ]; then
-	make
-else
-	make -j $1
-fi
-make install
-
-cd ../install
-
-#get rid of bin, because it's just a copy of
-#Library/Frameworks/Python.framework/Versions/2.7/bin, and will not reflect
-#new changes being made
-rm -rf bin
-ln -s Library/Frameworks/Python.framework/Headers include
-ln -s Library/Frameworks/Python.framework/Versions/2.7/lib lib
-ln -s Library/Frameworks/Python.framework/Versions/2.7/bin bin
-
-#Patch pyport.h:
-cd include
-patch pyport.h $ISSM_DIR/externalpackages/python/patches/pyport.h.patch
Index: /issm/trunk-jpl/externalpackages/python/install-3-linux.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/python/install-3-linux.sh	(revision 26950)
+++ /issm/trunk-jpl/externalpackages/python/install-3-linux.sh	(revision 26950)
@@ -0,0 +1,37 @@
+#!/bin/bash
+set -eu
+
+#Some cleanup
+rm -rf install src
+rm -rf Python-3.2.2
+mkdir install src
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.sh https://issm.ess.uci.edu/files/externalpackages/Python-3.2.2.tgz Python-3.2.2.tgz
+
+#exports
+export CC
+
+#Untar and move python into install directory
+tar -zxvf  Python-3.2.2.tgz
+mv Python-3.2.2/* src
+rm -rf Python-3.2.2
+
+#Configure python
+cd src 
+./configure \
+ --prefix="$ISSM_DIR/externalpackages/python/install" \
+ --enable-shared
+
+if [ $# -eq 0 ]; then
+	make
+else
+	make -j $1
+fi
+make install
+
+cd ../install/bin
+ln -s python3.2 python 
+cd ../
+ln -s Python.framework/Versions/3.2/include/python3.2m include
+ln -s Python.framework/Versions/3.2/lib/ lib
Index: /issm/trunk-jpl/externalpackages/python/install-3-mac-snowleopard.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/python/install-3-mac-snowleopard.sh	(revision 26950)
+++ /issm/trunk-jpl/externalpackages/python/install-3-mac-snowleopard.sh	(revision 26950)
@@ -0,0 +1,41 @@
+#!/bin/bash
+set -eu
+
+#Some cleanup
+rm -rf install src
+rm -rf Python-3.2.2
+mkdir install src
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.sh https://issm.ess.uci.edu/files/externalpackages/Python-3.2.2.tgz Python-3.2.2.tgz
+
+#exports
+export CC
+export MACOSX_DEPLOYMENT_TARGET=10.6
+
+#Untar and move python into install directory
+tar -zxvf  Python-3.2.2.tgz
+mv Python-3.2.2/* src
+rm -rf Python-3.2.2
+
+#Configure doxygen
+cd src 
+# --enable-framework needs to have the form "$SOME_PATH/Library/Frameworks" to avoid installing components in /Applications directory
+# --prefix is recognized as $SOME_PATH as long as this form is taken, so it's not necessary to include
+./configure \
+ --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks" 
+
+#make
+if [ $# -eq 0 ]; then
+	make
+else
+	make -j $1
+fi
+make install
+cd ..
+
+cd install/bin
+ln -s python3.2 python 
+cd ../
+ln -s Python.framework/Versions/3.2/include/python3.2m include
+ln -s Python.framework/Versions/3.2/lib/ lib
Index: /issm/trunk-jpl/externalpackages/python/install-3-mac.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/python/install-3-mac.sh	(revision 26950)
+++ /issm/trunk-jpl/externalpackages/python/install-3-mac.sh	(revision 26950)
@@ -0,0 +1,40 @@
+#!/bin/bash
+set -eu
+
+#Some cleanup
+rm -rf install src
+rm -rf Python-3.2.2
+mkdir install src
+
+#Download from ISSM server
+$ISSM_DIR/scripts/DownloadExternalPackage.sh https://issm.ess.uci.edu/files/externalpackages/Python-3.2.2.tgz Python-3.2.2.tgz
+
+#exports
+export CC
+
+#Untar and move python into install directory
+tar -zxvf  Python-3.2.2.tgz
+mv Python-3.2.2/* src
+rm -rf Python-3.2.2
+
+#Configure doxygen
+cd src 
+./configure \
+ --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks" 
+
+#obsolete? 
+#./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-framework="$ISSM_DIR/externalpackages/python/install"
+
+#make
+if [ $# -eq 0 ]; then
+	make
+else
+	make -j $1
+fi
+make install
+
+cd install/bin
+ln -s python3.2 python 
+cd ../
+ln -s Python.framework/Versions/3.2/include/python3.2m include
+ln -s Python.framework/Versions/3.2/lib/ lib
Index: sm/trunk-jpl/externalpackages/python/install-3.2.2-linux64.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/python/install-3.2.2-linux64.sh	(revision 26949)
+++ 	(revision )
@@ -1,37 +1,0 @@
-#!/bin/bash
-set -eu
-
-#Some cleanup
-rm -rf install src
-rm -rf Python-3.2.2
-mkdir install src
-
-#Download from ISSM server
-$ISSM_DIR/scripts/DownloadExternalPackage.sh https://issm.ess.uci.edu/files/externalpackages/Python-3.2.2.tgz Python-3.2.2.tgz
-
-#exports
-export CC
-
-#Untar and move python into install directory
-tar -zxvf  Python-3.2.2.tgz
-mv Python-3.2.2/* src
-rm -rf Python-3.2.2
-
-#Configure python
-cd src 
-./configure \
- --prefix="$ISSM_DIR/externalpackages/python/install" \
- --enable-shared
-
-if [ $# -eq 0 ]; then
-	make
-else
-	make -j $1
-fi
-make install
-
-cd ../install/bin
-ln -s python3.2 python 
-cd ../
-ln -s Python.framework/Versions/3.2/include/python3.2m include
-ln -s Python.framework/Versions/3.2/lib/ lib
Index: sm/trunk-jpl/externalpackages/python/install-3.2.2-macosx-snowleopard.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/python/install-3.2.2-macosx-snowleopard.sh	(revision 26949)
+++ 	(revision )
@@ -1,41 +1,0 @@
-#!/bin/bash
-set -eu
-
-#Some cleanup
-rm -rf install src
-rm -rf Python-3.2.2
-mkdir install src
-
-#Download from ISSM server
-$ISSM_DIR/scripts/DownloadExternalPackage.sh https://issm.ess.uci.edu/files/externalpackages/Python-3.2.2.tgz Python-3.2.2.tgz
-
-#exports
-export CC
-export MACOSX_DEPLOYMENT_TARGET=10.6
-
-#Untar and move python into install directory
-tar -zxvf  Python-3.2.2.tgz
-mv Python-3.2.2/* src
-rm -rf Python-3.2.2
-
-#Configure doxygen
-cd src 
-# --enable-framework needs to have the form "$SOME_PATH/Library/Frameworks" to avoid installing components in /Applications directory
-# --prefix is recognized as $SOME_PATH as long as this form is taken, so it's not necessary to include
-./configure \
- --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks" 
-
-#make
-if [ $# -eq 0 ]; then
-	make
-else
-	make -j $1
-fi
-make install
-cd ..
-
-cd install/bin
-ln -s python3.2 python 
-cd ../
-ln -s Python.framework/Versions/3.2/include/python3.2m include
-ln -s Python.framework/Versions/3.2/lib/ lib
Index: sm/trunk-jpl/externalpackages/python/install-3.2.2-macosx.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/python/install-3.2.2-macosx.sh	(revision 26949)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#!/bin/bash
-set -eu
-
-#Some cleanup
-rm -rf install src
-rm -rf Python-3.2.2
-mkdir install src
-
-#Download from ISSM server
-$ISSM_DIR/scripts/DownloadExternalPackage.sh https://issm.ess.uci.edu/files/externalpackages/Python-3.2.2.tgz Python-3.2.2.tgz
-
-#exports
-export CC
-
-#Untar and move python into install directory
-tar -zxvf  Python-3.2.2.tgz
-mv Python-3.2.2/* src
-rm -rf Python-3.2.2
-
-#Configure doxygen
-cd src 
-./configure \
- --enable-framework="$ISSM_DIR/externalpackages/python/install/Library/Frameworks" 
-
-#obsolete? 
-#./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-framework="$ISSM_DIR/externalpackages/python/install"
-
-#make
-if [ $# -eq 0 ]; then
-	make
-else
-	make -j $1
-fi
-make install
-
-cd install/bin
-ln -s python3.2 python 
-cd ../
-ln -s Python.framework/Versions/3.2/include/python3.2m include
-ln -s Python.framework/Versions/3.2/lib/ lib
Index: /issm/trunk-jpl/externalpackages/sqlite/install.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/sqlite/install.sh	(revision 26949)
+++ /issm/trunk-jpl/externalpackages/sqlite/install.sh	(revision 26950)
@@ -3,9 +3,13 @@
 
 
+# Constants
+#
 VER="3300100"
 
+PREFIX="${ISSM_DIR}/externalpackages/sqlite/install" # Set to location where external package should be installed
+
 # Cleanup
-rm -rf install src
-mkdir install src
+rm -rf ${PREFIX} src
+mkdir -p ${PREFIX} src
 
 # Download source
@@ -13,14 +17,14 @@
 
 # Unpack source
-tar -zxvf sqlite-autoconf-$VER.tar.gz
+tar -zxvf sqlite-autoconf-${VER}.tar.gz
 
 # Move source into 'src' directory
-mv sqlite-autoconf-$VER/* src
-rm -rf sqlite-autoconf-$VER
+mv sqlite-autoconf-${VER}/* src
+rm -rf sqlite-autoconf-${VER}
 
 # Configure
 cd src
 ./configure \
-	--prefix="${ISSM_DIR}/externalpackages/sqlite/install"
+	--prefix="${PREFIX}"
 
 # Compile and install
Index: /issm/trunk-jpl/jenkins/pleiades-dakota
===================================================================
--- /issm/trunk-jpl/jenkins/pleiades-dakota	(revision 26949)
+++ /issm/trunk-jpl/jenkins/pleiades-dakota	(revision 26950)
@@ -9,18 +9,19 @@
 	--with-wrappers=no \
 	--with-vendor="intel-pleiades-mpi" \
+	--with-cxxoptflags="-O3 " \
 	--with-petsc-dir="${ISSM_DIR}/externalpackages/petsc/install" \
 	--with-m1qn3-dir="${ISSM_DIR}/externalpackages/m1qn3/install" \
-	--with-boost-dir=/nasa/pkgsrc/sles12/2018Q3 \
+	--with-boost-dir="${ISSM_DIR}/externalpackages/boost/install" \
 	--with-dakota-dir="${ISSM_DIR}/externalpackages/dakota/install" \
-	--with-gsl-dir=/nasa/pkgsrc/sles12/2018Q3 \
+	--with-gsl-dir=${ISSM_DIR}/externalpackages/gsl/install \
 	--with-mpi-include=" " \
 	--with-mpi-libflags=" -lmpi" \
-	--with-mkl-libflags="-L/nasa/intel/Compiler/2016.2.181/compilers_and_libraries_2016.2.181/linux/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -limf -lsvml -lirc" \
+	--with-mkl-libflags="-L/nasa/intel/Compiler/2018.3.222/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm" \
 	--with-metis-dir="${ISSM_DIR}/externalpackages/petsc/install" \
 	--with-parmetis-dir=${ISSM_DIR}/externalpackages/petsc/install \
 	--with-mumps-dir="${ISSM_DIR}/externalpackages/petsc/install" \
-	--with-scalapack-dir=/nasa/pkgsrc/sles12/2018Q3 \
+	--with-scalapack-lib="-L/nasa/intel/Compiler/2018.3.222/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64/libmkl_scalapack_lp64.so" \
 	--with-graphics-lib="/usr/lib64/libX11.so" \
-	--with-fortran-lib="-L/nasa/intel/Compiler/2016.2.181/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64/ -lifcore -lifport" \
+	--with-fortran-lib="-L/nasa/intel/Compiler/2018.3.222/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/ -lifcore -lifport -lgfortran" \
 '
 
@@ -29,6 +30,10 @@
 #-------------------#
 
+# NOTE: Python 3 is installed only as a build system for GSL
 EXTERNALPACKAGES="
-	petsc	install-3.13-pleiades.sh
+	python	install-3-linux.sh
+	petsc	install-3.14-pleiades.sh
+	gsl		install-pleiades.sh
+	boost	install-1.55-pleiades.sh
 	dakota	install-6.2-pleiades.sh
 	m1qn3	install.sh
@@ -53,5 +58,5 @@
 
 # Number of CPUs used in the nightly runs
-NUMCPUS_RUN=2
+NUMCPUS_RUN=1
 
 # Nightly run options
Index: /issm/trunk-jpl/jenkins/pleiades-solid_earth
===================================================================
--- /issm/trunk-jpl/jenkins/pleiades-solid_earth	(revision 26950)
+++ /issm/trunk-jpl/jenkins/pleiades-solid_earth	(revision 26950)
@@ -0,0 +1,83 @@
+#--------------------#
+# ISSM Configuration #
+#--------------------#
+
+ISSM_CONFIG='\
+	--prefix=$ISSM_DIR \
+	--enable-development \
+	--enable-standalone-libraries \
+	--with-wrappers=no \
+	--with-vendor="intel-pleiades-mpi" \
+	--with-cxxoptflags="-O3 " \
+	--with-petsc-dir="${ISSM_DIR}/externalpackages/petsc/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-gsl-dir=${ISSM_DIR}/externalpackages/gsl/install \
+	--with-mpi-include=" " \
+	--with-mpi-libflags=" -lmpi" \
+	--with-mkl-libflags="-L/nasa/intel/Compiler/2018.3.222/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm" \
+	--with-metis-dir="${ISSM_DIR}/externalpackages/petsc/install" \
+	--with-parmetis-dir=${ISSM_DIR}/externalpackages/petsc/install \
+	--with-mumps-dir="${ISSM_DIR}/externalpackages/petsc/install" \
+	--with-scalapack-lib="-L/nasa/intel/Compiler/2018.3.222/compilers_and_libraries_2018.3.222/linux/mkl/lib/intel64/libmkl_scalapack_lp64.so" \
+	--with-graphics-lib="/usr/lib64/libX11.so" \
+	--with-fortran-lib="-L/nasa/intel/Compiler/2018.3.222/compilers_and_libraries_2018.3.222/linux/compiler/lib/intel64_lin/ -lifcore -lifport -lgfortran" \
+'
+
+#-------------------#
+# External Packages #
+#-------------------#
+
+# NOTE:
+# - Python 3 is installed only as a build system for GSL
+# - shell2junit is included to run test suites via jenkins.sh
+#
+EXTERNALPACKAGES="
+	python		install-3-linux.sh
+	petsc		install-3.14-pleiades.sh
+	zlib		install-1.sh
+	hdf5		install-1-parallel.sh
+	gsl			install-pleiades.sh
+	boost		install-1.55-pleiades.sh
+	dakota		install-6.2-pleiades.sh
+	curl		install-7-linux.sh
+	netcdf		install-4.7-parallel.sh
+	sqlite		install.sh
+	proj		install-6.sh
+	gdal		install-3-python.sh
+	gshhg		install.sh
+	gmt			install-6-linux.sh
+	gmsh		install-4.sh
+	triangle	install-linux.sh
+	chaco		install.sh
+	m1qn3		install.sh
+	semic		install.sh
+"
+
+#---------#
+# Testing #
+#---------#
+
+# Test suites
+MATLAB_TEST=0
+PYTHON_TEST=0
+JAVASCRIPT_TEST=0
+EXAMPLES_TEST=0
+
+# Number of CPUs used in ISSM compilation
+#
+# NOTE: 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=1
+
+# Nightly run options
+#
+# See documentation in test/NightlyRun/runme.* for more information.
+#
+MATLAB_NROPTIONS=""
+PYTHON_NROPTIONS=""
Index: /issm/trunk-jpl/m4/issm_options.m4
===================================================================
--- /issm/trunk-jpl/m4/issm_options.m4	(revision 26949)
+++ /issm/trunk-jpl/m4/issm_options.m4	(revision 26950)
@@ -292,6 +292,6 @@
 			export CFLAGS="-O3 -D_INTEL_LINUX_ -DMPICH_IGNORE_CXX_SEEK"
 		elif test "${VENDOR}" == "intel-discover"; then
-		   export CC=mpicc
-		   export CXX=mpicxx
+			export CC=mpicc
+			export CXX=mpicxx
 			export CXXFLAGS="-O3 -D_INTEL_LINUX_ -DMPICH_IGNORE_CXX_SEEK -std=c++11"
 			export CFLAGS="-O3 -D_INTEL_LINUX_ -DMPICH_IGNORE_CXX_SEEK"
Index: /issm/trunk-jpl/packagers/mac/sign-issm-mac-binaries-matlab.sh
===================================================================
--- /issm/trunk-jpl/packagers/mac/sign-issm-mac-binaries-matlab.sh	(revision 26949)
+++ /issm/trunk-jpl/packagers/mac/sign-issm-mac-binaries-matlab.sh	(revision 26950)
@@ -67,5 +67,5 @@
 # NOTE: May be able to remove this after updating macOS.
 #
-alias svn='/usr/local/bin/svn'
+#alias svn='/usr/local/bin/svn'
 
 ## Override certain other aliases
Index: /issm/trunk-jpl/packagers/mac/sign-issm-mac-binaries-python.sh
===================================================================
--- /issm/trunk-jpl/packagers/mac/sign-issm-mac-binaries-python.sh	(revision 26949)
+++ /issm/trunk-jpl/packagers/mac/sign-issm-mac-binaries-python.sh	(revision 26950)
@@ -67,5 +67,5 @@
 # NOTE: May be able to remove this after updating macOS.
 #
-alias svn='/usr/local/bin/svn'
+#alias svn='/usr/local/bin/svn'
 
 ## Override certain other aliases
Index: /issm/trunk-jpl/scripts/DownloadExternalPackage.sh
===================================================================
--- /issm/trunk-jpl/scripts/DownloadExternalPackage.sh	(revision 26949)
+++ /issm/trunk-jpl/scripts/DownloadExternalPackage.sh	(revision 26950)
@@ -41,15 +41,25 @@
 
 ## Download file
+#
+if [ ! -z `which curl` ]; then
+	curl --silent $URL -o $OUT_FILE
 
-if [ ! -z `which curl` ]
-then
-	curl --silent $URL -o $OUT_FILE
-elif [ ! -z `which wget` ]
-then
+	# Try wget if curl exists but fails
+	if [ $? -ne 0 ]; then
+		if [ ! -z `which wget` ]; then
+			wget --quiet -O $OUT_FILE $URL
+
+			if [ $? -ne 0 ]; then
+				echo "Error: both curl and wget failed. To debug, download package manually using curl without '--silent' option and/or wget without '--quiet' option."
+				exit 0
+			fi
+		else
+			echo $MSG_ERR_NO_GET_CMD
+			exit 0
+		fi
+	fi
+elif [ ! -z `which wget` ]; then
 	wget --quiet -O $OUT_FILE $URL
 else
 	echo $MSG_ERR_NO_GET_CMD
-	exit 0
 fi
-
-exit 0
