lofar-astron / lofar-deploy

LOFAR software stack deployment scripts and Dockerfiles for R&D purposes
GNU General Public License v3.0
6 stars 5 forks source link

Check number of cores in OSX #18

Closed tammojan closed 8 years ago

tammojan commented 9 years ago

Should be sysctl -n hw.ncpu instead of cat /proc/cpuinfo | grep processor | wc -l. Not sure how to check for osx to make it a generic command.

tammojan commented 8 years ago

Anyone?

ygrange commented 8 years ago

That command returns the number of threads I have in OSX (It actually surprised me that I actually had 8 cores). Is that command indeed working on all Linuxes? Then we can just replace it.

tammojan commented 8 years ago

No, it does not work on all cpus. That's why I'm asking you, I was hoping you'd have the Make skills to do an if statement :)

ygrange commented 8 years ago

Ah I finally get what you mean by " Not sure how to check for osx"! Ok, that is something I can try to find out.

ygrange commented 8 years ago

For reference: https://stackoverflow.com/questions/714100/os-detecting-makefile