reframe-hpc / reframe

A powerful Python framework for writing and running portable regression tests and benchmarks for HPC systems.
https://reframe-hpc.readthedocs.org
BSD 3-Clause "New" or "Revised" License
214 stars 102 forks source link

`--distribute` option crashes if `build_locally=0` on a run-only test #3074

Closed vkarak closed 9 months ago

vkarak commented 9 months ago

The test crashes with as follows:

Traceback (most recent call last):
  File "/home/vkarakasis/.local/reframe/reframe/frontend/executors/__init__.py", line 317, in _safe_call
    return fn(*args, **kwargs)
  File "/home/vkarakasis/.local/reframe/reframe/core/hooks.py", line 107, in _fn
    getattr(obj, h.__name__)()
  File "/home/vkarakasis/.local/reframe/reframe/core/hooks.py", line 38, in _fn
    func(*args, **kwargs)
  File "/home/vkarakasis/.local/reframe/reframe/frontend/testgenerators.py", line 94, in _rfm_pin_build_nodes
    obj.build_job.pin_nodes = pin_nodes
AttributeError: 'NoneType' object has no attribute 'pin_nodes'

The problem is that we try to pin the build job based on build_locally's value. We should make sure that either build_job is not None or that the test is not an instance of a RunOnlyRegressionTest.

https://github.com/reframe-hpc/reframe/blob/06f3e8a7c40a2933a453494dc1ab8466ecd062f7/reframe/frontend/testgenerators.py#L93