mirror of
https://develop.openfoam.com/Development/ThirdParty-common.git
synced 2025-12-08 06:57:50 +00:00
CONFIG: respect existing value for WM_NUMCOMPPROCS (#59)
- avoids flooding a head-node during compilation.
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
# Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
# Copyright (C) 2016-2020 OpenCFD Ltd.
|
# Copyright (C) 2016-2021 OpenCFD Ltd.
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||||
@ -430,12 +430,15 @@ setBuildSuffix()
|
|||||||
#
|
#
|
||||||
# Mostly building without wmake
|
# Mostly building without wmake
|
||||||
# - disable wmakeScheduler variables
|
# - disable wmakeScheduler variables
|
||||||
# - use max number of cores for building
|
# - use max number of cores for building, unless already defined
|
||||||
#
|
#
|
||||||
unset WM_HOSTS WM_SCHEDULER
|
unset WM_HOSTS WM_SCHEDULER
|
||||||
|
|
||||||
WM_NCOMPPROCS=$(getconf _NPROCESSORS_ONLN 2>/dev/null) || WM_NCOMPPROCS=1
|
if [ -z "$WM_NCOMPPROCS" ]
|
||||||
: ${WM_NCOMPPROCS:=1}
|
then
|
||||||
|
WM_NCOMPPROCS=$(getconf _NPROCESSORS_ONLN 2>/dev/null)
|
||||||
|
: "${WM_NCOMPPROCS:=1}"
|
||||||
|
fi
|
||||||
export WM_NCOMPPROCS
|
export WM_NCOMPPROCS
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user