Re: [Rd] Detecting physical CPUs in detectCores() on Linux platforms

2023-08-07 Thread Dirk Eddelbuettel
On 8 August 2023 at 13:17, Simon Urbanek wrote: | To be honest I think the motivation of this thread is dubious at best: it is a bad idea to use detectCore() blindly to specify parallelization and we explicitly say it's a bad idea - any sensible person will set it according to the demands, the

Re: [Rd] Detecting physical CPUs in detectCores() on Linux platforms

2023-08-07 Thread Simon Urbanek
> On 8/08/2023, at 12:07 PM, Dirk Eddelbuettel wrote: > > > On 8 August 2023 at 11:21, Simon Urbanek wrote: > | First, detecting HT vs cores is not necessarily possible in general, Linux > may assign core id to each HT depending on circumstances: > | > | $ grep 'cpu cores' /proc/cpuinfo | u

Re: [Rd] Detecting physical CPUs in detectCores() on Linux platforms

2023-08-07 Thread Dirk Eddelbuettel
On 8 August 2023 at 11:21, Simon Urbanek wrote: | First, detecting HT vs cores is not necessarily possible in general, Linux may assign core id to each HT depending on circumstances: | | $ grep 'cpu cores' /proc/cpuinfo | uniq | cpu cores : 32 | $ grep 'model name' /proc/cpuinfo | uniq | mo

Re: [Rd] Detecting physical CPUs in detectCores() on Linux platforms

2023-08-07 Thread Simon Urbanek
First, detecting HT vs cores is not necessarily possible in general, Linux may assign core id to each HT depending on circumstances: $ grep 'cpu cores' /proc/cpuinfo | uniq cpu cores : 32 $ grep 'model name' /proc/cpuinfo | uniq model name : Intel(R) Xeon(R) Gold 6142 CPU @ 2.60GHz an

Re: [Rd] Detecting physical CPUs in detectCores() on Linux platforms

2023-08-07 Thread Julian Hniopek
On Mon, 2023-08-07 at 07:12 -0500, Dirk Eddelbuettel wrote: > > On 7 August 2023 at 08:48, Nils Kehrein wrote: > > I recently noticed that `detectCores()` ignores the `logical=FALSE` > > argument on Linux platforms. This means that the function will > > always > > return the number of logical CPUs

Re: [Rd] Detecting physical CPUs in detectCores() on Linux platforms

2023-08-07 Thread Dirk Eddelbuettel
On 7 August 2023 at 08:48, Nils Kehrein wrote: | I recently noticed that `detectCores()` ignores the `logical=FALSE` | argument on Linux platforms. This means that the function will always | return the number of logical CPUs, i.e. it will count the number of threads | that theoretically can run i