Initialization of WM_NCOMPPROCS using foamGetSystemInfo
This commit is contained in:
parent
f51ca1458c
commit
f3234e58f7
2 changed files with 2 additions and 25 deletions
13
etc/bashrc
13
etc/bashrc
|
@ -142,18 +142,7 @@ export WM_COMPILER_LIB_ARCH=
|
||||||
: ${WM_MPLIB:=OPENMPI}; export WM_MPLIB
|
: ${WM_MPLIB:=OPENMPI}; export WM_MPLIB
|
||||||
|
|
||||||
# WM_NCOMPPROCS = <number of processes to use>
|
# WM_NCOMPPROCS = <number of processes to use>
|
||||||
if [ -z "${WM_NCOMPPROCS+xxx}" ]
|
: ${WM_NCOMPPROCS:=`foamGetSystemInfo -nbrCores`}; export WM_NCOMPPROCS
|
||||||
then
|
|
||||||
case `uname -s` in
|
|
||||||
Linux)
|
|
||||||
export WM_NCOMPPROCS=`grep -c processor /proc/cpuinfo`
|
|
||||||
;;
|
|
||||||
|
|
||||||
Darwin)
|
|
||||||
export WM_NCOMPPROCS=`sysctl -n hw.physicalcpu`
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Run options (floating-point signal handling and memory initialisation)
|
# Run options (floating-point signal handling and memory initialisation)
|
||||||
|
|
14
etc/cshrc
14
etc/cshrc
|
@ -134,19 +134,7 @@ if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt
|
||||||
if ( ! $?WM_MPLIB ) setenv WM_MPLIB OPENMPI
|
if ( ! $?WM_MPLIB ) setenv WM_MPLIB OPENMPI
|
||||||
|
|
||||||
# WM_NCOMPPROCS = <number of processes to use>
|
# WM_NCOMPPROCS = <number of processes to use>
|
||||||
if ( ! $?WM_NCOMPPROCS ) then
|
if ( ! $?WM_NCOMPPROCS ) setenv WM_NCOMPPROCS `foamGetSystemInfo -nbrCores`
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
# Run options (floating-point signal handling and memory initialisation)
|
# Run options (floating-point signal handling and memory initialisation)
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
Reference in a new issue