I tried to use cmdstanR on two computers to apply multi-core parallel computing, however, the CPU utilization seems to be not as good as expected.
The configuration of the first computer is:
CPU:12th generation Core i7-12700(12 cores and 20 threads)
RAM:32g
System: Win11
The CPU utilization monitored by the system is:
The code used:
model3_1 = cmdstan_model("lee-carter3_1reduce_sum.stan",cpp_options = list(stan_threads = TRUE),stanc_options = list("O1"))
lc_fit2010_3_1 <- model3_1$sample(standata3,
chains = 4,
parallel_chains = 4,
iter_warmup = 1000,
iter_sampling = 1000,
# max_treedepth = 15,
# adapt_delta = 0.95,
threads_per_chain = 5,
refresh = 1)
The configuration of the second computer is:
CPU:Dual Xeon Platinum 8172M(52 cores and 104 threads)
RAM:191g
System: Win10
The CPU utilization monitored by the system is:
There seem to be only a few cores at work.
The code used:
model3_1 = cmdstan_model("lee-carter3_1reduce_sum.stan",cpp_options = list(stan_threads = TRUE),stanc_options = list("O1"))
lc_fit2010_3_1 <- model3_1$sample(standata3,
chains = 4,
parallel_chains = 4,
iter_warmup = 1000,
iter_sampling = 1000,
# max_treedepth = 15,
# adapt_delta = 0.95,
threads_per_chain = 26,
refresh = 1)
Is this CPU utilization normal, or am I making a mistake in the settings?