-
Notifications
You must be signed in to change notification settings - Fork 117
Closed
Description
With #1074 we allowed local scheduler to support flexible allocation, but this is actually crashing now:
diff --git a/unittests/resources/checks/hellocheck.py b/unittests/resources/checks/hellocheck.py
index 62abd1d..7956eb8 100644
--- a/unittests/resources/checks/hellocheck.py
+++ b/unittests/resources/checks/hellocheck.py
@@ -9,6 +9,7 @@ class HelloTest(rfm.RegressionTest):
self.descr = 'C Hello World test'
# All available systems are supported
+ self.num_tasks = 0
self.valid_systems = ['*']
self.valid_prog_environs = ['*']
self.sourcepath = 'hello.c'Command line: ./bin/reframe -c unittests/resources/checks/hellocheck.py -r
Reframe version: 2.21-dev2
Launched by user: karakasv
Launched on host: dhcp-133-23.cscs.ch
Reframe paths
=============
Check prefix :
Check search path : 'unittests/resources/checks/hellocheck.py'
Stage dir prefix : /Users/karakasv/Repositories/reframe/stage/
Output dir prefix : /Users/karakasv/Repositories/reframe/output/
Perf. logging prefix : /Users/karakasv/Repositories/reframe/perflogs
[==========] Running 1 check(s)
[==========] Started on Thu Dec 5 18:45:48 2019
[----------] started processing hellocheck (C Hello World test)
[ RUN ] hellocheck on generic:login using builtin-gcc
[ FAIL ] hellocheck on generic:login using builtin-gcc
[----------] finished processing hellocheck (C Hello World test)
[ FAILED ] Ran 1 test case(s) from 1 check(s) (1 failure(s))
[==========] Finished on Thu Dec 5 18:45:48 2019
==============================================================================
SUMMARY OF FAILURES
------------------------------------------------------------------------------
FAILURE INFO for hellocheck
* System partition: generic:login
* Environment: builtin-gcc
* Stage directory: /Users/karakasv/Repositories/reframe/stage/generic/login/builtin-gcc/hellocheck
* Node list: <None>
* Job type: local (id=None)
* Maintainers: ['VK']
* Failing phase: run
* Reason: unexpected error: 'str' object has no attribute 'is_available'
Traceback (most recent call last):
File "/Users/karakasv/Repositories/reframe/reframe/frontend/executors/__init__.py", line 163, in _safe_call
return fn(*args, **kwargs)
File "/Users/karakasv/Repositories/reframe/reframe/core/pipeline.py", line 77, in _fn
func(obj, *args, **kwargs)
File "/Users/karakasv/Repositories/reframe/reframe/core/pipeline.py", line 1171, in run
self._job.prepare(commands, environs)
File "/Users/karakasv/Repositories/reframe/reframe/core/schedulers/__init__.py", line 270, in prepare
guessed_num_tasks = self.guess_num_tasks()
File "/Users/karakasv/Repositories/reframe/reframe/core/schedulers/__init__.py", line 308, in guess_num_tasks
available_nodes = {n for n in available_nodes
File "/Users/karakasv/Repositories/reframe/reframe/core/schedulers/__init__.py", line 309, in <setcomp>
if n.is_available()}
AttributeError: 'str' object has no attribute 'is_available'
------------------------------------------------------------------------------
The problem is that we assume (wrongly) that the nodes returned are of type SlurmNode, whereas the local scheduler returns strings. We should create an API there as well.