Commit cf4a5175 authored by Roland Fehrenbacher's avatar Roland Fehrenbacher

Add patches: Fix bashisms in sh scripts; use make instead of gmake

parent d77559e8
From: "Brian T. Smith" <bsmith@systemfabricworks.com>
Date: Thu, 14 Jun 2018 12:20:45 -0500
Subject: Fix bashisms in sh scripts
Some scripts in MpiApps/apps shbang sh, but have bashisms.
Corrected:
* Change == opeartor to =.
* Use func() {} instead of function func {}.
---
MpiApps/apps/prepare_run | 2 +-
MpiApps/apps/run_allhfilatency | 4 ++--
MpiApps/apps/run_app | 4 ++--
MpiApps/apps/run_cabletest | 4 ++--
MpiApps/apps/run_osu | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/MpiApps/apps/prepare_run b/MpiApps/apps/prepare_run
index d88d409..ce4ec21 100755
--- a/MpiApps/apps/prepare_run
+++ b/MpiApps/apps/prepare_run
@@ -104,7 +104,7 @@ fi
MIN_PROCESSES=${MIN_PROCESSES:-2}
MULT_PROCESSES=${MULT_PROCESSES:-1}
-if [ z"$NUM_PROCESSES" == zall ]
+if [ z"$NUM_PROCESSES" = zall ]
then
# skip comment and blank lines
NUM_PROCESSES=$(cat $MPI_HOSTS|egrep -v '^[[:space:]]*#'|egrep -v '^[[:space:]]*$'|wc -l)
diff --git a/MpiApps/apps/run_allhfilatency b/MpiApps/apps/run_allhfilatency
index ad56577..5b45941 100755
--- a/MpiApps/apps/run_allhfilatency
+++ b/MpiApps/apps/run_allhfilatency
@@ -47,7 +47,7 @@ MINUTES=1
VERBOSE=
CSV=
-function usage {
+usage() {
echo
echo "$0 is a specialized stress test for large fabrics. It iterates through"
echo "every possible pairing of HCAs and performs a latency test on each"
@@ -124,7 +124,7 @@ if [ $# -ge 1 ]; then
fi
shift
if [ $# -ge 1 ]; then
- if [ $1 == "infinite" ]; then
+ if [ $1 = "infinite" ]; then
MINUTES=0
elif [ $1 -eq $1 ]; then
MINUTES=$1
diff --git a/MpiApps/apps/run_app b/MpiApps/apps/run_app
index e32548e..3d82a2b 100755
--- a/MpiApps/apps/run_app
+++ b/MpiApps/apps/run_app
@@ -103,7 +103,7 @@ MONITOR_FILE=
CODE_FILES=
loop=n
-if [ x"$1" == "x-l" ]
+if [ x"$1" = "x-l" ]
then
loop=y
shift
@@ -126,7 +126,7 @@ else
chassis_arg=
fi
-if [ "x$APP" == "x" ]
+if [ "x$APP" = "x" ]
then
# get command name part of APP_CMD (eg. remove arguments)
app=`(set $APP_CMD; echo $1)`
diff --git a/MpiApps/apps/run_cabletest b/MpiApps/apps/run_cabletest
index 96e4845..aadd8fd 100755
--- a/MpiApps/apps/run_cabletest
+++ b/MpiApps/apps/run_cabletest
@@ -52,7 +52,7 @@ MINSIZE=4194304
MAXSIZE=4194304
VERBOSE=
-function usage {
+usage() {
echo
echo "$0 is a specialized stress test for large fabrics. It groups"
echo "MPI ranks into sets which are tested against other members of the set."
@@ -139,7 +139,7 @@ GROUP_SIZE=$((GROUP_SIZE * PROCS_PER_NODE))
export MPI_HOSTS=$MPI_GROUP_HOSTS
if [ $# -ge 1 ] ; then
- if [ $1 == "infinite" ]; then
+ if [ $1 = "infinite" ]; then
MINUTES=0
elif [ $1 -eq $1 ]; then
MINUTES=$1
diff --git a/MpiApps/apps/run_osu b/MpiApps/apps/run_osu
index 6e15fee..85bf0d8 100755
--- a/MpiApps/apps/run_osu
+++ b/MpiApps/apps/run_osu
@@ -38,7 +38,7 @@ MPICH_PREFIX=${MPICH_PREFIX:-`cat .prefix 2>/dev/null`}
trap "exit 1" SIGHUP SIGTERM SIGINT
-if [ -z "$1" -o "$1" == "-h" ]
+if [ -z "$1" -o "$1" = "-h" ]
then
echo " Usage: run_osu <number_of_processes> <command> <arg1> <arg2>...<argn> "
echo " For example: ./run_osu 2 osu_allgatherv"
From: "Brian T. Smith" <bsmith@systemfabricworks.com>
Date: Thu, 14 Jun 2018 12:23:19 -0500
Subject: Use make instead of gmake.
MpiApps/apps/Makefile uses gmake. gmake isn't available on Debian
and make works fine.
---
MpiApps/apps/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/MpiApps/apps/Makefile b/MpiApps/apps/Makefile
index 0052785..b8ae7b6 100644
--- a/MpiApps/apps/Makefile
+++ b/MpiApps/apps/Makefile
@@ -155,7 +155,7 @@ PMB: SHOWMPI
IMB: SHOWMPI
@echo "Building Intel Micro Benchmarks 4.0.2..."
- cd imb/src; gmake MPI_HOME=$(MPICH_PREFIX) -f make_mpich
+ cd imb/src; make MPI_HOME=$(MPICH_PREFIX) -f make_mpich
@echo
.PHONY: PMB
@@ -198,7 +198,7 @@ clobber::
rm -f latency/*.o latency/*.d latency/latency
rm -f bandwidth/*.o bandwidth/*.d bandwidth/bw
if [ -d "PMB2.2.1" ]; then make -C PMB2.2.1/SRC_PMB clean; fi
- if [ -f "imb/src/make_mpich" ]; then cd imb/src; gmake MPI_HOME=$(MPICH_PREFIX) -f make_mpich clean; fi
+ if [ -f "imb/src/make_mpich" ]; then cd imb/src; make MPI_HOME=$(MPICH_PREFIX) -f make_mpich clean; fi
if [ -d hpl-2.0 ]; then find hpl-2.0 -name ICS.`uname -s`.* | xargs rm -rf; rm -rf hpl-2.0/bin hpl-2.0/lib; fi
if [ -d hpl-2.0 ]; then find hpl-2.0 -name xerbla.o | xargs rm -rf; fi
if [ -d pgfile_test ]; then make -C pgfile_test clean; fi
......@@ -2,3 +2,5 @@
0002-Add-correct-version-links-for-libraries.patch
0003-Adjust-absolute-paths-for-some-executables.patch
0004-Allow-one-to-override-build-date-to-enable-reproduci.patch
0005-Fix-bashisms-in-sh-scripts.patch
0006-Use-make-instead-of-gmake.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment