Initialization of WM_NCOMPPROCS using foamGetSystemInfo

This commit is contained in:
Martin Beaudoin 2013-07-07 13:02:10 -04:00
parent f51ca1458c
commit f3234e58f7
2 changed files with 2 additions and 25 deletions

View file

@ -142,18 +142,7 @@ export WM_COMPILER_LIB_ARCH=
: ${WM_MPLIB:=OPENMPI}; export WM_MPLIB
# WM_NCOMPPROCS = <number of processes to use>
if [ -z "${WM_NCOMPPROCS+xxx}" ]
then
case `uname -s` in
Linux)
export WM_NCOMPPROCS=`grep -c processor /proc/cpuinfo`
;;
Darwin)
export WM_NCOMPPROCS=`sysctl -n hw.physicalcpu`
;;
esac
fi
: ${WM_NCOMPPROCS:=`foamGetSystemInfo -nbrCores`}; export WM_NCOMPPROCS
# Run options (floating-point signal handling and memory initialisation)

View file

@ -134,19 +134,7 @@ if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt
if ( ! $?WM_MPLIB ) setenv WM_MPLIB OPENMPI
# WM_NCOMPPROCS = <number of processes to use>
if ( ! $?WM_NCOMPPROCS ) then
switch (`uname -s`)
case Linux:
setenv WM_NCOMPPROCS `grep -c processor /proc/cpuinfo`
breaksw
case Darwin:
setenv WM_NCOMPPROCS `sysctl -n hw.physicalcpu`
breaksw
endsw
endif
if ( ! $?WM_NCOMPPROCS ) setenv WM_NCOMPPROCS `foamGetSystemInfo -nbrCores`
# Run options (floating-point signal handling and memory initialisation)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~