EESSI / test-suite

A portable test suite for software installations, using ReFrame
GNU General Public License v2.0
5 stars 11 forks source link

Extra memory request silently fails if resource is not set in config #181

Closed casparvl closed 1 month ago

casparvl commented 1 month ago

On azure_mc, the ESPResSo test was failing with an OOM error. I checked, and the test does call the hook that requests memory here. This then calls this hook which essentially sets:

test.extra_resources = {'memory': {'size': f'{req_mem_per_node}M'}}

Surprisingly, that field seems to be completely ignored if the config doesn't contain a section like

    'resources': [
        {
            'name': 'memory',
            'options': ['--mem={size}'],
        }
    ],

I'm not sure if we can query the existence of that config item explicitly, or what the documented behavior is for requesting a resource that isn't specified. If the documented behavior is a silent pass, we should try to hard-code a check and throw an error ourselves if this resource isn't set.

casparvl commented 1 month ago

Ok, this is documented behavior:

If the resource name specified in this variable does not match a resource name in the partition configuration, it will be simply ignored.

casparvl commented 1 month ago

We should be able to check current_partition.resources for a resource named memory and print an associated error (or maybe better: a warning) if we don't find it. Warning should say something that no resources item with the name memory was found in the config file and that this may result in OOM errors, and that it is highly advised to specify how memory (per node) should be requested for the given batch scheduler.