Sameeresque
Sameeresque

Reputation: 2602

Finding the maximum number of cores available for processing

I had instantiated a session with a known number of cores. Once the session starts one can utilize how many ever number required. For example, if I instantiated the session with 12 cores I can ask for 8 of those using the following command:

using Distributed
addprocs(8)

Is there a command in Julia 1.1.0 to know the number 12, that is the maximum number of available cores?

Upvotes: 2

Views: 690

Answers (1)

Bogumił Kamiński
Bogumił Kamiński

Reputation: 69829

The number of logical cores is given in Sys.CPU_THREADS.

Upvotes: 3

Related Questions