GNU Astronomy Utilities manual

Next: , Previous: , Up: Common behavior   [Contents][Index]


4.3 Threads in GNU Astronomy Utilities

Some of the programs benefit significantly when you use all the threads your computer’s CPU has to offer to your operating system. GNU Astronomy Utilities uses the POSIX threads library (pthreads) for spinning off threads when the user asks for it. The number of threads available to your operating system is usually double the number of physical (hardware) cores in your CPU.

You can find the number of threads available to your system with the command $ nproc, which is part of GNU Coreutils and is most probably already available on your GNU/Linux system. If not specified as an option at configure time, Gnuastro finds the number of threads available to your system (and reports it along with all those other things it checks!). It is saved internally for all the programs to use by default. To specify the number of threads at configure time, use the --with-numthreads option, see GNU Astronomy Utilities configure options. In case your system does not have GNU Coreutils, currently the only way to proceed is to manually specify the number of threads through this option.

The number of threads is the only parameter in Gnuastro which is stored internally at configure time. The implication is that the only option with a value that doesn’t have to be in any of the configuration files is this, see Configuration files. Note that if you do specify it, the value you provided in the most immediate configuration file will be used, not the internal value.


Next: , Previous: , Up: Common behavior   [Contents][Index]


Read in other formats.
GNU Astronomy Utilities manual, November 2015.