fab icon indicating copy to clipboard operation
fab copied to clipboard

Enforce suite

Open hiker opened this issue 1 year ago • 1 comments

The function set_default_suite of the ToolRepository is kind of broken. The current behaviour is: the ToolRepository will put the one tool (and I am just changing this while adding MPI support to put all tools of a suite) to the front, and then when looking for a default tool to look from the beginning of the list.

Problem is, if no tool is available for the default suite, this will silently return a completely different tool (e.g. you request 'intel-classic', and might get 'gfortran'). And at some stage (when compiler flags are added to the corresponding compiler, and not as atm to any compiler), you won't even get a warning about invalid flags anymore, since it will just silently use the compiler-specific flags.

So this function should be renamed (enforce_suite or restrict_to_suite??), and if a special suite has been requested, the get_default_tool function should not return a tool that is not part of that suite.

We should still allow the user to explicitly set (different) compilers in a ToolBox, so we cannot remove non-suite tools from the ToolRepository. Suggested implementation: when a suite is requested, the name is validated (check that we have tools of this suite), stored. And when get_default is called and a suite name has been set, restrict this correspondingly.

hiker avatar Nov 26 '24 08:11 hiker

We agree that this isn't the correct behaviour! @MatthewHambley suggests that we remove the concept of a default set of tools and instead get the framework to fail with an error if the desired set of tools isn't available.

t00sa avatar Aug 05 '25 12:08 t00sa