Index: /issm/trunk-jpl/externalpackages/dakota/install-6.2-mac-static.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/dakota/install-6.2-mac-static.sh	(revision 27190)
+++ /issm/trunk-jpl/externalpackages/dakota/install-6.2-mac-static.sh	(revision 27191)
@@ -8,7 +8,4 @@
 
 PREFIX="${ISSM_DIR}/externalpackages/dakota/install" # Set to location where external package should be installed
-
-## Environment
-#
 
 # Find libgfortran and libgcc so we do not have to hardcode them.
@@ -22,8 +19,10 @@
 # - Otherwise, refactor this to work with other gfortran installations
 #
-LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | grep -n libgfortran.a | grep -v i386 | sed "s/[0-9]*://g" | head -1)
+LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | egrep -n libgfortran.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
 LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
-LIBGCC=$(mdfind -onlyin ${LIBGFORTRAN_ROOT} -name libgcc | grep -n libgcc.a | grep -v i386 | sed "s/[0-9]*://g" | head -1)
+LIBGCC=$(mdfind -onlyin ${LIBGFORTRAN_ROOT} -name libgcc | egrep -n libgcc.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
 
+## Environment
+#
 export BLAS_LIBS="-L${BLAS_ROOT}/lib -lfblas ${LIBGFORTRAN_ROOT}/libgfortran.a ${LIBGFORTRAN_ROOT}/libquadmath.a ${LIBGCC}" # Need to export BLAS_LIBS *and* pass it as an option to CMake to ensure that external packages also find it
 export DAK_BUILD=${ISSM_DIR}/externalpackages/dakota/build # DO NOT CHANGE THIS
Index: /issm/trunk-jpl/externalpackages/dakota/install-6.2-mac.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/dakota/install-6.2-mac.sh	(revision 27190)
+++ /issm/trunk-jpl/externalpackages/dakota/install-6.2-mac.sh	(revision 27191)
@@ -9,7 +9,4 @@
 PREFIX="${ISSM_DIR}/externalpackages/dakota/install" # Set to location where external package should be installed
 
-## Environment
-#
-
 # Find libgfortran so that we do not have to hardcode it.
 #
@@ -20,7 +17,9 @@
 # - Move this to etc/environment.sh
 #
-LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | grep -n libgfortran.a | grep -v i386 | sed "s/[0-9]*://g" | head -1)
+LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | egrep -n libgfortran.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
 LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
 
+## Environment
+#
 export BLAS_LIBS="-L${BLAS_ROOT}/lib -lfblas -L${LIBGFORTRAN_ROOT} -lgfortran" # Need to export BLAS_LIBS *and* pass it as an option to CMake to ensure that external packages also find it
 export DAK_BUILD=${ISSM_DIR}/externalpackages/dakota/build # DO NOT CHANGE THIS
Index: /issm/trunk-jpl/externalpackages/gmsh/install-4-linux.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmsh/install-4-linux.sh	(revision 27191)
+++ /issm/trunk-jpl/externalpackages/gmsh/install-4-linux.sh	(revision 27191)
@@ -0,0 +1,71 @@
+#!/bin/bash
+set -eu
+
+
+# TODO:
+# - Add support for,
+#	- BLAS_LAPACK
+#	- MUMPS
+#	- PETSC
+# (see configs/4/static/CMakeLists.txt)
+#
+
+## Constants
+#
+VER="4.5.6"
+
+PREFIX="${ISSM_DIR}/externalpackages/gmsh/install" # Set to location where external package should be installed
+
+# Cleanup
+rm -rf ${PREFIX} src
+mkdir -p ${PREFIX} src
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/gmsh-${VER}-source.tgz" "gmsh-${VER}-source.tgz"
+
+# Unpack source
+tar -xvzf gmsh-${VER}-source.tgz
+
+# Move source to 'src' directory
+mv gmsh-${VER}-source/* src
+rm -rf gmsh-${VER}-source
+
+# Configure
+#
+# NOTE:
+# - Option -DENABLE_FLTK=0 is used because we do not need GUI.
+# - Option -DENABLE_MPEG_ENCODE=0 is used because we do not need to record MPEG 
+#	movies.
+# - Option -DENABLE_OCC=0 is used because we do not need CAD kernel and are not 
+#	importing STEP/IGES files.
+# - Option -DENABLE_TOUCHBAR=0 is used because we do not have GUI, therefore we 
+#	do not need to support Apple Touch bar (does not affect compilation on 
+#	Linux).
+#
+cd src
+cmake \
+	-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
+	-DENABLE_BUILD_DYNAMIC=1 \
+	-DENABLE_BUILD_SHARED=1 \
+	-DENABLE_FLTK=0 \
+	-DENABLE_MPEG_ENCODE=0 \
+	-DENABLE_MPI=1 \
+	-DENABLE_OCC=0 \
+	-DENABLE_TOUCHBAR=0 \
+	-DBLAS_LAPACK_LIBRARIES="-L${LAPACK_ROOT}/lib -lflapack -L${BLAS_ROOT}/lib -lfblas" \
+	-DMETIS_ROOT="${METIS_ROOT}"
+
+# Compile and install
+if [ $# -eq 0 ]; then
+	make
+	make install
+else
+	make -j $1
+	make -j $1 install
+fi
+
+# Make necessary link on RHEL
+if [[ -d ${PREFIX}/lib64 && ! -d ${PREFIX}/lib ]]; then
+	cd ${PREFIX}
+	ln -s ./lib64 ./lib
+fi
Index: /issm/trunk-jpl/externalpackages/gmsh/install-4-mac-static.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmsh/install-4-mac-static.sh	(revision 27190)
+++ /issm/trunk-jpl/externalpackages/gmsh/install-4-mac-static.sh	(revision 27191)
@@ -24,7 +24,7 @@
 # - Otherwise, refactor this to work with other gfortran installations.
 #
-LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | grep -n libgfortran.a | grep -v i386 | sed "s/[0-9]*://g" | head -1)
+LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | egrep -n libgfortran.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
 LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
-LIBGCC=$(mdfind -onlyin ${LIBGFORTRAN_ROOT} -name libgcc | grep -n libgcc.a | grep -v i386 | sed "s/[0-9]*://g" | head -1)
+LIBGCC=$(mdfind -onlyin ${LIBGFORTRAN_ROOT} -name libgcc | egrep -n libgcc.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
 
 PREFIX="${ISSM_DIR}/externalpackages/gmsh/install" # Set to location where external package should be installed
Index: /issm/trunk-jpl/externalpackages/gmsh/install-4-mac.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmsh/install-4-mac.sh	(revision 27191)
+++ /issm/trunk-jpl/externalpackages/gmsh/install-4-mac.sh	(revision 27191)
@@ -0,0 +1,82 @@
+#!/bin/bash
+set -eu
+
+
+# TODO:
+# - Add support for,
+#	- BLAS_LAPACK
+#	- MUMPS
+#	- PETSC
+# (see configs/4/static/CMakeLists.txt)
+#
+
+## Constants
+#
+VER="4.5.6"
+
+PREFIX="${ISSM_DIR}/externalpackages/gmsh/install" # Set to location where external package should be installed
+
+# Find libgfortran so that we do not have to hardcode it.
+#
+# Should retrieve a copy of gfortran that is compiled from source before 
+# returning one that is installed via package manager.
+#
+# TODO:
+# - Move this to etc/environment.sh
+#
+LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | egrep -n libgfortran.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
+LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
+
+# Cleanup
+rm -rf ${PREFIX} src
+mkdir -p ${PREFIX} src
+
+# Download source
+$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/gmsh-${VER}-source.tgz" "gmsh-${VER}-source.tgz"
+
+# Unpack source
+tar -xvzf gmsh-${VER}-source.tgz
+
+# Move source to 'src' directory
+mv gmsh-${VER}-source/* src
+rm -rf gmsh-${VER}-source
+
+# Configure
+#
+# NOTE:
+# - Option -DENABLE_FLTK=0 is used because we do not need GUI.
+# - Option -DENABLE_MPEG_ENCODE=0 is used because we do not need to record MPEG 
+#	movies.
+# - Option -DENABLE_OCC=0 is used because we do not need CAD kernel and are not 
+#	importing STEP/IGES files.
+# - Option -DENABLE_TOUCHBAR=0 is used because we do not have GUI, therefore we 
+#	do not need to support Apple Touch bar (does not affect compilation on 
+#	Linux).
+#
+cd src
+cmake \
+	-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
+	-DENABLE_BUILD_DYNAMIC=1 \
+	-DENABLE_BUILD_SHARED=1 \
+	-DENABLE_FLTK=0 \
+	-DENABLE_MPEG_ENCODE=0 \
+	-DENABLE_MPI=1 \
+	-DENABLE_OCC=0 \
+	-DENABLE_TOUCHBAR=0 \
+	-DBLAS_LAPACK_LIBRARIES="-L${LAPACK_ROOT}/lib -lflapack -L${BLAS_ROOT}/lib -lfblas -L${LIBGFORTRAN_ROOT} -lgfortran" \
+	-DMETIS_ROOT="${METIS_ROOT}"
+
+# Compile and install
+if [ $# -eq 0 ]; then
+	make
+	make install
+else
+	make -j $1
+	make -j $1 install
+fi
+
+# Make necessary link on RHEL
+if [[ -d ${PREFIX}/lib64 && ! -d ${PREFIX}/lib ]]; then
+	cd ${PREFIX}
+	ln -s ./lib64 ./lib
+fi
Index: sm/trunk-jpl/externalpackages/gmsh/install-4.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmsh/install-4.sh	(revision 27190)
+++ 	(revision )
@@ -1,71 +1,0 @@
-#!/bin/bash
-set -eu
-
-
-# TODO:
-# - Add support for,
-#	- BLAS_LAPACK
-#	- MUMPS
-#	- PETSC
-# (see configs/4/static/CMakeLists.txt)
-#
-
-## Constants
-#
-VER="4.5.6"
-
-PREFIX="${ISSM_DIR}/externalpackages/gmsh/install" # Set to location where external package should be installed
-
-# Cleanup
-rm -rf ${PREFIX} src
-mkdir -p ${PREFIX} src
-
-# Download source
-$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/gmsh-${VER}-source.tgz" "gmsh-${VER}-source.tgz"
-
-# Unpack source
-tar -xvzf gmsh-${VER}-source.tgz
-
-# Move source to 'src' directory
-mv gmsh-${VER}-source/* src
-rm -rf gmsh-${VER}-source
-
-# Configure
-#
-# NOTE:
-# - Option -DENABLE_FLTK=0 is used because we do not need GUI.
-# - Option -DENABLE_MPEG_ENCODE=0 is used because we do not need to record MPEG 
-#	movies.
-# - Option -DENABLE_OCC=0 is used because we do not need CAD kernel and are not 
-#	importing STEP/IGES files.
-# - Option -DENABLE_TOUCHBAR=0 is used because we do not have GUI, therefore we 
-#	do not need to support Apple Touch bar (does not affect compilation on 
-#	Linux).
-#
-cd src
-cmake \
-	-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-	-DENABLE_BUILD_DYNAMIC=1 \
-	-DENABLE_BUILD_SHARED=1 \
-	-DENABLE_FLTK=0 \
-	-DENABLE_MPEG_ENCODE=0 \
-	-DENABLE_MPI=1 \
-	-DENABLE_OCC=0 \
-	-DENABLE_TOUCHBAR=0 \
-	-DBLAS_LAPACK_LIBRARIES="-L${LAPACK_ROOT}/lib -lflapack -L${BLAS_ROOT}/lib -lfblas" \
-	-DMETIS_ROOT="${METIS_ROOT}"
-
-# Compile and install
-if [ $# -eq 0 ]; then
-	make
-	make install
-else
-	make -j $1
-	make -j $1 install
-fi
-
-# Make necessary link on RHEL
-if [[ -d ${PREFIX}/lib64 && ! -d ${PREFIX}/lib ]]; then
-	cd ${PREFIX}
-	ln -s ./lib64 ./lib
-fi
Index: /issm/trunk-jpl/externalpackages/gmt/install-6-mac-static.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gmt/install-6-mac-static.sh	(revision 27190)
+++ /issm/trunk-jpl/externalpackages/gmt/install-6-mac-static.sh	(revision 27191)
@@ -16,7 +16,7 @@
 # - Otherwise, refactor this to work with other gfortran installations.
 #
-LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | grep -n libgfortran.a | grep -v i386 | sed "s/[0-9]*://g" | head -1)
+LIBGFORTRAN=$(mdfind -onlyin /usr -name libgfortran | egrep -n libgfortran.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
 LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
-LIBGCC=$(mdfind -onlyin ${LIBGFORTRAN_ROOT} -name libgcc | grep -n libgcc.a | grep -v i386 | sed "s/[0-9]*://g" | head -1)
+LIBGCC=$(mdfind -onlyin ${LIBGFORTRAN_ROOT} -name libgcc | egrep -n libgcc.a | egrep -v i386 | sed "s/[0-9]*://g" | head -1)
 
 GDAL_EXTRA_LIBS="-lc++" # `$GDAL_ROOT/bin/gdal-config --dep-libs` does not report need to link to libc++ (see also customized configuration file ./configs/6/static/cmake/modules/FindGDAL.cmake)
Index: /issm/trunk-jpl/jenkins/aws-amazon_linux-solid_earth
===================================================================
--- /issm/trunk-jpl/jenkins/aws-amazon_linux-solid_earth	(revision 27190)
+++ /issm/trunk-jpl/jenkins/aws-amazon_linux-solid_earth	(revision 27191)
@@ -46,5 +46,5 @@
 	gshhg			install.sh
 	gmt				install-6-linux.sh
-	gmsh			install-4.sh
+	gmsh			install-4-linux.sh
 	shell2junit		install.sh
 "
Index: /issm/trunk-jpl/jenkins/pine_island-mac-dakota
===================================================================
--- /issm/trunk-jpl/jenkins/pine_island-mac-dakota	(revision 27190)
+++ /issm/trunk-jpl/jenkins/pine_island-mac-dakota	(revision 27191)
@@ -56,5 +56,5 @@
 	gshhg		install.sh
 	gmt			install-6-mac.sh
-	gmsh		install-4.sh
+	gmsh		install-4-mac.sh
 	triangle	install-mac.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/pine_island-mac-examples
===================================================================
--- /issm/trunk-jpl/jenkins/pine_island-mac-examples	(revision 27190)
+++ /issm/trunk-jpl/jenkins/pine_island-mac-examples	(revision 27191)
@@ -57,5 +57,5 @@
 	gshhg		install.sh
 	gmt			install-6-mac.sh
-	gmsh		install-4.sh
+	gmsh		install-4-mac.sh
 	triangle	install-mac.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/pine_island-mac-full
===================================================================
--- /issm/trunk-jpl/jenkins/pine_island-mac-full	(revision 27190)
+++ /issm/trunk-jpl/jenkins/pine_island-mac-full	(revision 27191)
@@ -44,5 +44,5 @@
 	autotools	install-mac.sh
 	cmake		install.sh
-	petsc		install-3.12-mac.sh
+	petsc		install-3.16-mac.sh
 	gsl			install.sh
 	boost		install-1.7-mac.sh
@@ -54,5 +54,5 @@
 	gshhg		install.sh
 	gmt			install-6-mac.sh
-	gmsh		install-4.sh
+	gmsh		install-4-mac.sh
 	triangle	install-mac.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/pine_island-mac-full-valgrind
===================================================================
--- /issm/trunk-jpl/jenkins/pine_island-mac-full-valgrind	(revision 27190)
+++ /issm/trunk-jpl/jenkins/pine_island-mac-full-valgrind	(revision 27191)
@@ -44,5 +44,5 @@
 	autotools	install-mac.sh
 	cmake		install.sh
-	petsc		install-3.12-mac.sh
+	petsc		install-3.16-mac.sh
 	gsl			install.sh
 	boost		install-1.7-mac.sh
@@ -54,5 +54,5 @@
 	gshhg		install.sh
 	gmt			install-6-mac.sh
-	gmsh		install-4.sh
+	gmsh		install-4-mac.sh
 	triangle	install-mac.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/pine_island-mac-solid_earth
===================================================================
--- /issm/trunk-jpl/jenkins/pine_island-mac-solid_earth	(revision 27190)
+++ /issm/trunk-jpl/jenkins/pine_island-mac-solid_earth	(revision 27191)
@@ -56,5 +56,5 @@
 	gshhg		install.sh
 	gmt			install-6-mac.sh
-	gmsh		install-4.sh
+	gmsh		install-4-mac.sh
 	triangle	install-mac.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/pine_island-mac-solid_earth-lambert
===================================================================
--- /issm/trunk-jpl/jenkins/pine_island-mac-solid_earth-lambert	(revision 27190)
+++ /issm/trunk-jpl/jenkins/pine_island-mac-solid_earth-lambert	(revision 27191)
@@ -56,5 +56,5 @@
 	gshhg		install.sh
 	gmt			install-6-mac.sh
-	gmsh		install-4.sh
+	gmsh		install-4-mac.sh
 	triangle	install-mac.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/pleiades-solid_earth
===================================================================
--- /issm/trunk-jpl/jenkins/pleiades-solid_earth	(revision 27190)
+++ /issm/trunk-jpl/jenkins/pleiades-solid_earth	(revision 27191)
@@ -49,5 +49,5 @@
 	gshhg		install.sh
 	gmt			install-6-linux.sh
-	gmsh		install-4.sh
+	gmsh		install-4-linux.sh
 	triangle	install-linux.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/ross-debian_linux-dakota
===================================================================
--- /issm/trunk-jpl/jenkins/ross-debian_linux-dakota	(revision 27190)
+++ /issm/trunk-jpl/jenkins/ross-debian_linux-dakota	(revision 27191)
@@ -53,5 +53,5 @@
 	gshhg			install.sh
 	gmt				install-6-linux.sh
-	gmsh			install-4.sh
+	gmsh			install-4-linux.sh
 	triangle		install-linux.sh
 	chaco			install.sh
Index: /issm/trunk-jpl/jenkins/ross-debian_linux-full
===================================================================
--- /issm/trunk-jpl/jenkins/ross-debian_linux-full	(revision 27190)
+++ /issm/trunk-jpl/jenkins/ross-debian_linux-full	(revision 27191)
@@ -54,5 +54,5 @@
 	gshhg		install.sh
 	gmt			install-6-linux.sh
-	gmsh		install-4.sh
+	gmsh		install-4-linux.sh
 	triangle	install-linux.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/ross-debian_linux-full-mplapack
===================================================================
--- /issm/trunk-jpl/jenkins/ross-debian_linux-full-mplapack	(revision 27190)
+++ /issm/trunk-jpl/jenkins/ross-debian_linux-full-mplapack	(revision 27191)
@@ -57,5 +57,5 @@
 	gshhg		install.sh
 	gmt			install-6-linux.sh
-	gmsh		install-4.sh
+	gmsh		install-4-linux.sh
 	triangle	install-linux.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/ross-debian_linux-full-valgrind
===================================================================
--- /issm/trunk-jpl/jenkins/ross-debian_linux-full-valgrind	(revision 27190)
+++ /issm/trunk-jpl/jenkins/ross-debian_linux-full-valgrind	(revision 27191)
@@ -54,5 +54,5 @@
 	gshhg		install.sh
 	gmt			install-6-linux.sh
-	gmsh		install-4.sh
+	gmsh		install-4-linux.sh
 	triangle	install-linux.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/ross-debian_linux-gia
===================================================================
--- /issm/trunk-jpl/jenkins/ross-debian_linux-gia	(revision 27190)
+++ /issm/trunk-jpl/jenkins/ross-debian_linux-gia	(revision 27191)
@@ -37,5 +37,5 @@
 	triangle	install-linux.sh
 	math77		install.sh
-	gmsh		install-4.sh
+	gmsh		install-4-linux.sh
 	shell2junit	install.sh
 "
Index: /issm/trunk-jpl/jenkins/ross-debian_linux-python
===================================================================
--- /issm/trunk-jpl/jenkins/ross-debian_linux-python	(revision 27190)
+++ /issm/trunk-jpl/jenkins/ross-debian_linux-python	(revision 27191)
@@ -49,5 +49,5 @@
 	gshhg		install.sh
 	gmt			install-6-linux.sh
-	gmsh		install-4.sh
+	gmsh		install-4-linux.sh
 	triangle	install-linux.sh
 	chaco		install.sh
Index: /issm/trunk-jpl/jenkins/ross-debian_linux-solid_earth
===================================================================
--- /issm/trunk-jpl/jenkins/ross-debian_linux-solid_earth	(revision 27190)
+++ /issm/trunk-jpl/jenkins/ross-debian_linux-solid_earth	(revision 27191)
@@ -51,5 +51,5 @@
 	gshhg			install.sh
 	gmt				install-6-linux.sh
-	gmsh			install-4.sh
+	gmsh			install-4-linux.sh
 	triangle		install-linux.sh
 	chaco			install.sh
