-
Hi all I was just wondering if it would be possible to run multiple optimization runs in parallel using cmdstan? I have been using the |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
This does not have support at the Stan level, so it’s not currently possible in cmdstanpy. It could be supported in Stan, but to my knowledge this is the first time someone has asked so I don’t think we had really considered it. Can I ask why you’re interested in this? Is it that your model is multimodal enough that optimization regularly returns different values? |
Beta Was this translation helpful? Give feedback.
-
Yes, the specific model may be multi-modal |
Beta Was this translation helpful? Give feedback.
-
Continuing this thread (probably not completely relevant to cmdstanpy), on the cluster when I run a single optimization process the progress is automatically synced to the standard error file when having the default Also would it be advisable to set |
Beta Was this translation helpful? Give feedback.
-
Can you elaborate a bit more on your question about the progress output? I'm not sure I follow. I believe the advice is when the different runs are in different processes, like for optimization, you should set it to be the per-chain number, but I'm not entirely sure. TBB may be able to balance across multiple processes. You can always try both and monitor the number of threads in something like |
Beta Was this translation helpful? Give feedback.
-
I shall try this thanks Brian. When I only do a single optimization run without specifying the When I now use multiprocessing (same args), the lines 'cmdstan: Info - Process started' is synced to the standard error file instead of the output file. The progress from stan is thus not synced to any file. When I now specify |
Beta Was this translation helpful? Give feedback.
-
Hm, I'm not sure -- I believe cmdstanpy is capturing both standard error and standard out internally, so the fact that either are appearing in the .ER or .OU files from your job scheduler is a bit surprising to me. |
Beta Was this translation helpful? Give feedback.
-
I think it has to do with the multiprocessing creating several child processes? So the .OU and .ER files for the parent and child processes are not the same? Not completely sure about this however |
Beta Was this translation helpful? Give feedback.
This does not have support at the Stan level, so it’s not currently possible in cmdstanpy. It could be supported in Stan, but to my knowledge this is the first time someone has asked so I don’t think we had really considered it.
Can I ask why you’re interested in this? Is it that your model is multimodal enough that optimization regularly returns different values?