Skip to content

Commit

Permalink
use default behavior if MOOSE_JOBS not set, ref idaholab#16179
Browse files Browse the repository at this point in the history
  • Loading branch information
jessecarterMOOSE committed Nov 13, 2020
1 parent 66afe4a commit 5c6fc3a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/update_and_rebuild_petsc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,19 @@ if [ ! -z "$PETSC_PREFIX" ]; then
PFX_STR="--prefix=$PETSC_PREFIX"
fi

# Use --with-make-np if MOOSE_JOBS is given
MAKE_NP_STR=""
if [ ! -z "$MOOSE_JOBS" ]; then
MAKE_NP_STR="--with-make-np=$MOOSE_JOBS"
fi

cd $SCRIPT_DIR/../petsc

# If we're not going fast, remove the build directory and reconfigure
if [ -z "$go_fast" ]; then
rm -rf $SCRIPT_DIR/../petsc/$PETSC_ARCH

./configure $(echo $PFX_STR) \
./configure $(echo $PFX_STR) $(echo $MAKE_NP_STR) \
--download-hypre=1 \
--with-debugging=no \
--with-shared-libraries=1 \
Expand All @@ -111,13 +117,12 @@ if [ -z "$go_fast" ]; then
--with-cxx-dialect=C++11 \
--with-fortran-bindings=0 \
--with-sowing=0 \
--with-make-np=${MOOSE_JOBS:-1} \
$*

exitIfExitCode $?
fi

make all -j ${MOOSE_JOBS:-1}
make all
exitIfExitCode $?

if [ ! -z "$PFX_STR" ]; then
Expand Down

0 comments on commit 5c6fc3a

Please sign in to comment.