Skip to content

Commit

Permalink
SCRIPTS: Better support for parallel not in ACCESS/bin
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar authored and mvlopri committed Sep 26, 2024
1 parent f5549fe commit 459186c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
21 changes: 18 additions & 3 deletions packages/seacas/scripts/epup.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright(C) 1999-2020 National Technology & Engineering Solutions
# Copyright(C) 1999-2024 National Technology & Engineering Solutions
# of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
# NTESS, the U.S. Government retains certain rights in this software.
#
Expand All @@ -15,6 +15,10 @@ Usage: epup --subcycle <cycle_count> ...normal epu options...
->->-> Send email to gdsjaar@sandia.gov for epup support.<-<-<-
Uses: GNU Parallel,
O. Tange (2018): GNU Parallel 2018, Mar 2018, ISBN 9781387509881,
DOI https://doi.org/10.5281/zenodo.1146014
EPU_USAGE_EOF
exit 1
}
Expand Down Expand Up @@ -49,16 +53,27 @@ cycles=-1
pushd $(dirname "${0}") > /dev/null
basedir=$(pwd -P)
popd > /dev/null
if [ -x ${basedir}/epu -a -x ${basedir}/parallel -a -x ${basedir}/getopt.seacas ]; then

if [ -x ${basedir}/epu -a -x ${basedir}/getopt.seacas ]; then
ACCESS_BIN=$basedir
elif [ "$ACCESS" == "" ]; then
ACCESS_BIN=@ACCESSDIR@/bin
else
ACCESS_BIN=${ACCESS}/bin
fi

if command -v ${basedir}/parallel >/dev/null 2>&1; then
PARALLEL=$basedir/parallel
elif command -v parallel >/dev/null 2>&1; then
PARALLEL=parallel
elif command -v ${ACCESS_BIN}/parallel >/dev/null 2>&1; then
PARALLEL=${ACCESS_BIN}/parallel
else
echo "ERROR: Could not find an executable named \"parallel\" for use with the script"
exit 1
fi

EPU=${ACCESS_BIN}/epu
PARALLEL=${ACCESS_BIN}/parallel
SEQ="seq -w"
if [ $# -eq 0 ] ; then
usage
Expand Down
16 changes: 13 additions & 3 deletions packages/seacas/scripts/pconjoin.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright(C) 1999-2021, 2023 National Technology & Engineering Solutions
# Copyright(C) 1999-2024 National Technology & Engineering Solutions
# of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
# NTESS, the U.S. Government retains certain rights in this software.
#
Expand Down Expand Up @@ -79,16 +79,26 @@ cycles=-1
pushd $(dirname "${0}") > /dev/null
basedir=$(pwd -P)
popd > /dev/null
if [ -x ${basedir}/conjoin -a -x ${basedir}/parallel -a -x ${basedir}/getopt.seacas ]; then
if [ -x ${basedir}/conjoin -a -x ${basedir}/getopt.seacas ]; then
ACCESS_BIN=$basedir
elif [ "$ACCESS" == "" ]; then
ACCESS_BIN=@ACCESSDIR@/bin
else
ACCESS_BIN=${ACCESS}/bin
fi

if command -v ${basedir}/parallel >/dev/null 2>&1; then
PARALLEL=$basedir/parallel
elif command -v parallel >/dev/null 2>&1; then
PARALLEL=parallel
elif command -v ${ACCESS_BIN}/parallel >/dev/null 2>&1; then
PARALLEL=${ACCESS_BIN}/parallel
else
echo "ERROR: Could not find an executable named \"parallel\" for use with the script"
exit 1
fi

CONJOIN=${ACCESS_BIN}/conjoin
PARALLEL=${ACCESS_BIN}/parallel
SEQ="seq -w"
if [ $# -eq 0 ] ; then
usage
Expand Down

0 comments on commit 459186c

Please sign in to comment.