README.md: for macOS, recommend sysctl -n hw.ncpu instead of sysctl -n hw.physicalcpu

The number of logical cores may be greater than the number of physical cores,
for example on Intel CPUs with hyperthreading. Using all logical cores makes
more sense in this context.
silicon
Sébastien Villemot 2023-03-13 17:58:14 +01:00
parent 7159a293d6
commit 4c1af7890b
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 4 additions and 4 deletions

View File

@ -458,10 +458,10 @@ cd $HOME/dynare/slicot
wget https://deb.debian.org/debian/pool/main/s/slicot/slicot_5.0+20101122.orig.tar.gz wget https://deb.debian.org/debian/pool/main/s/slicot/slicot_5.0+20101122.orig.tar.gz
tar xf slicot_5.0+20101122.orig.tar.gz tar xf slicot_5.0+20101122.orig.tar.gz
cd slicot-5.0+20101122 cd slicot-5.0+20101122
make -j$(sysctl -n hw.physicalcpu) FORTRAN=gfortran OPTS="-O2" LOADER=gfortran lib make -j$(sysctl -n hw.ncpu) FORTRAN=gfortran OPTS="-O2" LOADER=gfortran lib
cp slicot.a /usr/local/lib/libslicot_pic.a cp slicot.a /usr/local/lib/libslicot_pic.a
make clean make clean
make -j$(sysctl -n hw.physicalcpu) FORTRAN=gfortran OPTS="-O2 -fdefault-integer-8" LOADER=gfortran lib make -j$(sysctl -n hw.ncpu) FORTRAN=gfortran OPTS="-O2 -fdefault-integer-8" LOADER=gfortran lib
cp slicot.a /usr/local/lib/libslicot64_pic.a cp slicot.a /usr/local/lib/libslicot64_pic.a
cd $HOME/dynare cd $HOME/dynare
``` ```
@ -473,7 +473,7 @@ cd $HOME/dynare/x13as
wget https://www2.census.gov/software/x-13arima-seats/x13as/unix-linux/program-archives/x13as_asciisrc-v1-1-b59.tar.gz wget https://www2.census.gov/software/x-13arima-seats/x13as/unix-linux/program-archives/x13as_asciisrc-v1-1-b59.tar.gz
tar xf x13as_asciisrc-v1-1-b59.tar.gz tar xf x13as_asciisrc-v1-1-b59.tar.gz
sed -i '' 's/-static//g' makefile.gf sed -i '' 's/-static//g' makefile.gf
make -j$(sysctl -n hw.physicalcpu) -f makefile.gf FC=gfortran LINKER=gfortran FFLAGS="-O2 -std=legacy" PROGRAM=x13as make -j$(sysctl -n hw.ncpu) -f makefile.gf FC=gfortran LINKER=gfortran FFLAGS="-O2 -std=legacy" PROGRAM=x13as
cp x13as /usr/local/bin/x13as cp x13as /usr/local/bin/x13as
cd ; cd ;
x13as x13as
@ -502,7 +502,7 @@ where you need to adapt the path to MATLAB. If you dont have MATLAB, simply r
- Compile: - Compile:
```sh ```sh
arch -x86_64 make -j$(sysctl -n hw.physicalcpu) arch -x86_64 make -j$(sysctl -n hw.ncpu)
``` ```
### Optional: pass the full PATH to MATLAB to run system commands ### Optional: pass the full PATH to MATLAB to run system commands