Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.
This repository was archived by the owner on Apr 11, 2026. It is now read-only.

[HEADLESS] batch facet parallel suppress headless flag -hpc #3687

Description

@RoiArthurB

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:

  1. Create a batch experiment with the facet parallel: set to any number (e.g 2)
  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
  1. 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

Metadata

Metadata

Assignees

Labels

About BatchThis issue concerns batch experimentsAbout HeadlessThis issue or request concerns GAMA headless modeV. 1.9.0Bug specific to 1.9.0😱 BugThe issue reveals a bug in GAMA

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions