I’m running the same model on a dual-boot system (Windows 10 & Kubuntu 19.04) and finding that Windows is taking over three times longer to complete the same model. I’m not sure where the performance differences are coming from.
On both systems I’m running a clean install of cmdstan (tested both the 2.21 release and develop). I’ll attach the model and data to the end of this post as well.
2.21
devtools::install_github("stan-dev/cmdstanr")
library(cmdstanr)
install_cmdstan()
source("test_data.R")
mod = cmdstan_model("F1_Base.stan")
samp = mod$sample(data=test_data,num_chains = 4,num_cores=4)
Linux
Chain 4 finished in 208.3 seconds.
Chain 2 finished in 210.1 seconds.
Chain 3 finished in 210.2 seconds.
Chain 1 finished in 211.8 seconds.
All 4 chains finished succesfully.
Mean chain execution time: 210.1 seconds.
Total execution time: 211.8 seconds.
Windows
Chain 4 finished in 711.0 seconds.
Chain 2 finished in 712.5 seconds.
Chain 3 finished in 734.3 seconds.
Chain 1 finished in 908.3 seconds.
All 4 chains finished succesfully.
Mean chain execution time: 766.5 seconds.
Total execution time: 908.4 seconds.
Develop
library(cmdstanr)
install_cmdstan(repo_clone = TRUE, repo_branch = "develop", overwrite = TRUE)
source("test_data.R")
mod = cmdstan_model("F1_Base.stan")
samp = mod$sample(data=test_data,num_chains = 4,num_cores=4)
Linux
Chain 3 finished in 199.4 seconds.
Chain 4 finished in 200.2 seconds.
Chain 1 finished in 201.3 seconds.
Chain 2 finished in 210.9 seconds.
All 4 chains finished succesfully.
Mean chain execution time: 202.9 seconds.
Total execution time: 211.0 seconds.
Windows
Chain 2 finished in 683.5 seconds.
Chain 1 finished in 687.2 seconds.
Chain 4 finished in 689.0 seconds.
Chain 3 finished in 903.3 seconds.
All 4 chains finished succesfully.
Mean chain execution time: 740.8 seconds.
Total execution time: 903.4 seconds.
F1_Base.stan (2.3 KB) test_data.R (84.1 KB)