COMP: add -pthread for AMD compiler rule

- https://github.com/spack/spack/pull/27949

COMP: respect FOAM_BUILDROOT for wmake -queue

STYLE: fix stray paraview setting
This commit is contained in:
Mark Olesen 2021-12-15 11:41:13 +01:00
parent b632e7b500
commit 2f07de03ff
6 changed files with 37 additions and 16 deletions

View File

@ -70,15 +70,16 @@ applications/Allwmake $targetType $*
# Additional components/modules # Additional components/modules
if [ "$FOAM_MODULE_PREFIX" = false ] || [ "$FOAM_MODULE_PREFIX" = none ] case "$FOAM_MODULE_PREFIX" in
then (false | none)
echo ======================================== echo ========================================
echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})" echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})"
echo echo
else ;;
(*)
# Use wmake -all instead of Allwmake to allow for overrides # Use wmake -all instead of Allwmake to allow for overrides
(cd "$WM_PROJECT_DIR/modules" 2>/dev/null && wmake -all) ( cd "$WM_PROJECT_DIR/modules" 2>/dev/null && wmake -all )
fi esac
# Count files in given directory. Ignore "Test-*" binaries. # Count files in given directory. Ignore "Test-*" binaries.
_foamCountDirEntries() _foamCountDirEntries()

View File

@ -169,7 +169,7 @@ default:
endsw endsw
foreach libDir ("lib$WM_COMPILER_LIB_ARCH" "lib") foreach libDir ("lib$WM_COMPILER_LIB_ARCH" "lib")
if ( -d "${qtDir}/${libDir}" ) then if ( -d "${qtDir}/${libDir}" ) then
set pv_libdirs="${qtDir}/${libDir}:${pv_libdirs}" set pv_libdirs="${qtDir}/${libDir}"
break break
endif endif
end end

View File

@ -12,12 +12,12 @@ targetType=libso
export FOAM_MODULE_PREFIX export FOAM_MODULE_PREFIX
echo "========================================" echo "========================================"
if [ "$FOAM_MODULE_PREFIX" = false ] || [ "$FOAM_MODULE_PREFIX" = none ] case "$FOAM_MODULE_PREFIX" in
then (false | none)
echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})" echo "OpenFOAM modules disabled (prefix=${FOAM_MODULE_PREFIX})"
echo echo
exit 0 exit 0
fi esac
echo "prefix = $FOAM_MODULE_PREFIX" echo "prefix = $FOAM_MODULE_PREFIX"
echo echo
@ -33,6 +33,7 @@ for moduleName in $(./list-modules)
do do
if [ -d "$moduleName" ] if [ -d "$moduleName" ]
then then
# Use wmake -all instead of Allwmake to allow for overrides
( cd "$moduleName" && wmake -all $targetType ) ( cd "$moduleName" && wmake -all $targetType )
fi fi
done done

View File

@ -6,9 +6,10 @@
# \\ / A nd | www.openfoam.com # \\ / A nd | www.openfoam.com
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# SPDX-License-Identifier: (GPL-3.0+)
# Copyright (C) 2020 OpenCFD Ltd. # Copyright (C) 2020 OpenCFD Ltd.
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# SPDX-License-Identifier: (GPL-3.0+)
#
# Script # Script
# list-modules # list-modules
# #

View File

@ -2,7 +2,7 @@
# AMD compiler - a clang variant # AMD compiler - a clang variant
include $(GENERAL_RULES)/Clang/c++ include $(GENERAL_RULES)/Clang/c++
c++ARCH = -m64 c++ARCH = -m64 -pthread
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -59,8 +59,8 @@ Usage: $Script [OPTION] [dir]
options: options:
-s | -silent Silent mode (do not echo commands) -s | -silent Silent mode (do not echo commands)
-a | -all wmake all sub-directories, running Allwmake if present -a | -all wmake all sub-directories, runs Allwmake if present
-q | -queue wmakeCollect sub-directories, running Allwmake if present -q | -queue Collect as single Makefile, runs Allwmake if present
-k | -keep-going Keep going even when errors occur (-non-stop) -k | -keep-going Keep going even when errors occur (-non-stop)
-j | -jN | -j N Compile using all or specified N cores/hyperthreads -j | -jN | -j N Compile using all or specified N cores/hyperthreads
-update Update lnInclude, dep files, remove deprecated files/dirs -update Update lnInclude, dep files, remove deprecated files/dirs
@ -559,13 +559,31 @@ if [ "$optAll" = queue ]
then then
[ "$optUpdate" = true ] || wmakeLnIncludeAll $parOpt [ "$optUpdate" = true ] || wmakeLnIncludeAll $parOpt
if [ -n "$FOAM_BUILDROOT" ] && [ -w "$FOAM_BUILDROOT" ]
then
buildRoot="${FOAM_BUILDROOT}/build/${WM_OPTIONS}"
else
# Assumed to be writable
buildRoot="${WM_PROJECT_DIR}/build/${WM_OPTIONS}"
fi
# Use relative dirname if possible (reproducible names)
if [ "${PWD}" = "${WM_PROJECT_DIR}" ]
then
collectName="_project_"
else
collectName="_${PWD#${WM_PROJECT_DIR}/}"
collectName="${collectName////_}" # Path as unique name
fi
## echo "collect: $buildRoot/$collectName" 1>&2
( (
export WM_COLLECT_DIR="$WM_PROJECT_DIR/build/${WM_OPTIONS}/${PWD////_}" export WM_COLLECT_DIR="$buildRoot/$collectName"
export WM_SCHEDULER="$WM_DIR/wmakeCollect" export WM_SCHEDULER="$WM_DIR/wmakeCollect"
trap '$WM_SCHEDULER -kill' TERM INT trap '$WM_SCHEDULER -kill' TERM INT
"$WM_SCHEDULER" -clean \ "$WM_SCHEDULER" -clean \
&& wmake -all objects \ && wmake -all objects \
&& "$WM_SCHEDULER" && "$WM_SCHEDULER" # Make with assembled makefile
) && wmake -all ) && wmake -all
exit $? exit $?
fi fi