Describe the bug
As pointed in this issue #3658 if a batch experiment is launched in headless mode, the facet parallel: written in GAML will overwrite the headless' flag -hpc.
This is an issue as the facet could be set for development purpose but should be prioritized in headless mode if an headless attribute is set.
To Reproduce
Steps to reproduce the behavior:
- Create a batch experiment with the facet
parallel: set to any number (e.g 2)
- Start the experiment in batch headless with another core limit (e.g 1) with this command:
bash gama-headless.sh -hpc 1 -batch myBatchExp ./path/to/model.gaml
- See experiments starting by pair of 2
Expected behavior
The expected behavior was well summarized by @AlexisDrogoul :
So we should probably work a bit on the priority of these options.
Right now, we have:
- no
-hpc, no parallel:: pref_parallel_simulations_all is considered as true and all cores are used.
- no
-hpc, parallel: defined: pref_parallel_simulations_all is considered as true but in the limit defined by parallel
-hpc defined, parallel: defined or not: it seems that the value of -hpc is not considered.
In my opinion, when the modeler wants to limit the number of threads, -hpc should have the priority, followed by parallel:. The easiest solution would then be to translate the value passed from -hpc to parallel: before launching the experiment. What do you think ?
Additional context
If the facet parallel: isn't used, everything is working as intended. This issue is explained in the documentation
Describe the bug
As pointed in this issue #3658 if a batch experiment is launched in headless mode, the facet
parallel:written in GAML will overwrite the headless' flag-hpc.This is an issue as the facet could be set for development purpose but should be prioritized in headless mode if an headless attribute is set.
To Reproduce
Steps to reproduce the behavior:
parallel:set to any number (e.g 2)Expected behavior
The expected behavior was well summarized by @AlexisDrogoul :
Additional context
If the facet
parallel:isn't used, everything is working as intended. This issue is explained in the documentation