Page 1 of 1

v.10 Parallel computations

Posted: Wed Jul 19, 2023 5:29 am
by rosenm
Hello,
I'd like to try the new options RPARALLEL/XPARALLEL in v.10 but they are not available in Multiple start menu, please see the picture. Where to find these options?

Thanks

Re: v.10 Parallel computations

Posted: Wed Jul 19, 2023 6:19 am
by Administrator
Parallel is only in DSS for now for the initial release.

Re: v.10 Parallel computations

Posted: Thu Jul 20, 2023 5:02 pm
by tomfid
You can use the DSS trial key on the conference page if you'd like to experiment.

https://vensim.com/conference/

Re: v.10 Parallel computations

Posted: Thu Sep 05, 2024 3:39 pm
by aliakhavan89
I have a few clarification questions:

1. Does MULTIPLE_START = XPARALLEL ignore RESTART_MAX entirely? If not, what does having MULTIPLE_START = XPARALLEL with RESTART_MAX = N mean? In this case, how does the parallelization work?

2. From the documentation: MULTIPLE_START = RPARALLEL is like RRANDOM, but with restarts delegated to multiple threads. Does setting RESTART_MAX based on the number of threads improve performance? For example, I set RESTART_MAX = N * M where N is an integer and M is the number of threads (I was thinking it could uniformly distribute the search across multiple threads)

Re: v.10 Parallel computations

Posted: Thu Sep 05, 2024 4:58 pm
by tomfid
1. XPAR does ignore restart max at present. XPAR basically gets you one optimum as quickly as possible. If you want to explore multiple optima, RPAR is more efficient.

2. For RPAR I tend to leave RESTART_MAX unset (0) and just let it run until I'm tired of waiting. The performance of the search will depend only on the number of threads running. This defaults to the number of logical cores minus 2 (to leave some room for system performance).

I think RPAR has some reporting issues for individual solutions that will be fixed in the next release, but it does get you the global max correctly.

Re: v.10 Parallel computations

Posted: Thu Sep 05, 2024 6:41 pm
by aliakhavan89
Hi Tom,

Thank you very much for the detailed response. This was very helpful and triggered another question. Can we set the SEED parameter in the optimization setting in a way that each thread (or each restart sequence) uses a new random value throughout the search?

Currently, all search threads with RPAR use the same SEED for random number generation, except with different initial starting point. Is that true?

Thank you very much,
Ali

Re: v.10 Parallel computations

Posted: Tue Sep 10, 2024 2:42 pm
by tomfid
There are two seeds:
- One for the algorithm, set in the voc file
- One for the simulation, set in NOISE SEED or some other user variable, used in the RANDOM functions

I'm guessing that you want to vary the second one? One possibility would be to use GET TIME VALUE to randomize.
https://www.vensim.com/documentation/fn ... value.html
I think that should work as long as the model is slow enough to have more than a second between optimizations (possibly much less).

The downside of that is that it's not reproducible, so I'll look into making some kind of counter accessible. Should be easy.

Re: v.10 Parallel computations

Posted: Fri Sep 20, 2024 3:05 pm
by aliakhavan89
Hi Tom,

Sorry for my late response, and thanks a lot. I have actually used the GET TIME VALUE method, and it is really helpful. Also, thanks for reminding about the reproducibility.

However, my inquiry was about the first item: for the algorithm, set in the voc file.

As far as I understand, each thread uses the same noise seed through the search process. I wondered if it has any impact on the optimization performance if each thread uses different noise seed to have more perturbation in the search alongside with varying restart points.

Re: v.10 Parallel computations

Posted: Fri Sep 20, 2024 4:19 pm
by tomfid
The helper threads actually do increment the seed. However, this only affects selection of the starting points, because the Powell algorithm is deterministic. There's one exception: XPAR occasionally tests crossover directions, which convey information from one thread to another, and the crossover selection is random (using the master seed I think) and also nondeterministic because the order of arrival of information from different threads is subject to some turbulence from CPU loading.

Another way to go about exploring the space is to use MCMC as a simulated annealer, by setting a high initial temperature with a long cooldown period.

Re: v.10 Parallel computations

Posted: Fri Oct 18, 2024 5:31 pm
by jpain3
rosenm wrote: Wed Jul 19, 2023 5:29 am Hello,
I'd like to try the new options RPARALLEL/XPARALLEL in v.10 but they are not available in Multiple start menu, please see the picture. Where to find these options?

Thanks
I'm also not seeing the parallelization multiple start options in DSS 10.2.1 in the GUI, but I've experimented a bit by directly editing the corresponding argument in the .VOC file. For my specific model, I'm not sure that parallelization is actually materially speeding up my optimization, but wanted to help answer the original question from @rosenm about how to change this option if it is still outstanding.

Re: v.10 Parallel computations

Posted: Fri Oct 18, 2024 10:06 pm
by tomfid
You might be running the nonparallel version of DSS. The installer currently installs both. You want to see DSS 10.x.x (MC) in your title bar or About window. If you don't see the option in the GUI, it won't work from the .voc - the options will behave like the normal nonparallel restart options.