resource annotation with time exceeding specifications of queue causes crash
The following input in a session causes a crash:
>$ texts session -w -r
Input > f(x) = x**x
Input > a1 = f(5) on 72 cores for 6.0 [hours]
The error message printed as output is:
Traceback (most recent call last):
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/utilities/errors.py", line 302, in wrapper
return func(*args, **kwargs)
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/interpreter/session_manager.py", line 121, in get_model_value
return getattr(self.session.get_model(*args, uuid=self.uuid, **kwargs), 'value', '')
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/interpreter/session.py", line 149, in get_model
self.process_models(model_str, model_path)
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/interpreter/session.py", line 225, in process_models
strns, paths, varies = self._process_strings_paths(model_str, model_path)
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/interpreter/session.py", line 257, in _process_strings_paths
strns, varies = self._update_models(*self._parse_vary(model_str_))
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/interpreter/session.py", line 531, in _parse_vary
model = meta.model_from_str(full_model_str)
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/textx/metamodel.py", line 694, in model_from_str
model = self._parser_blueprint.clone().get_model_from_str(
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/textx/model.py", line 406, in get_model_from_str
model = parse_tree_to_objgraph(
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/textx/model.py", line 964, in parse_tree_to_objgraph
call_obj_processors(m._tx_metamodel, m)
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/textx/model.py", line 808, in call_obj_processors
result = call_obj_processors(
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/textx/model.py", line 814, in call_obj_processors
result = call_obj_processors(metamodel, attr, metaattr.cls)
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/textx/model.py", line 833, in call_obj_processors
return_value_grammar = metamodel.process(
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/textx/metamodel.py", line 566, in process
return self._obj_processors.get(_type, lambda x: x)(value)
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/metamodel/workflow.py", line 70, in resources_processor
set_compute_resources(obj)
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/metamodel/workflow.py", line 52, in set_compute_resources
obj.worker_name = obj.wcfg.name
AttributeError: 'NoneType' object has no attribute 'name'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/utilities/errors.py", line 302, in wrapper
return func(*args, **kwargs)
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/interpreter/session_manager.py", line 168, in process_input
output = self.get_model_value(model_str=input_str)
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/utilities/errors.py", line 337, in wrapper
raise RuntimeError('non-handled exception') from err
RuntimeError: non-handled exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/utilities/errors.py", line 302, in wrapper
return func(*args, **kwargs)
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/cli/run_session.py", line 93, in main
mgr.main_loop()
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/interpreter/session_manager.py", line 137, in main_loop
if self.process_input(input_str):
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/utilities/errors.py", line 337, in wrapper
raise RuntimeError('non-handled exception') from err
RuntimeError: non-handled exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/bin/texts", line 8, in <module>
sys.exit(texts())
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/cli/__init__.py", line 28, in texts
clargs.func(clargs)
File "/hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/lib/python3.9/site-packages/virtmat/language/utilities/errors.py", line 337, in wrapper
raise RuntimeError('non-handled exception') from err
RuntimeError: non-handled exception
The output (ipython) of get_default_qadapter()
for my current default queueadapter is:
Out[8]:
CommonAdapter(None,
{'queue': 'dev_cpuonly',
'nodes': 1,
'ntasks_per_node': 1,
'cpus_per_task': 1,
'walltime': 10,
'mem_per_cpu': None,
'ntasks': 1,
'rocket_launch': 'rlaunch singleshot',
'account': 'hk-project-p0022384',
'pre_rocket': 'module purge; module load compiler/intel/2022.0.2; module load numlib/mkl/2022.0.2; module load mpi/impi/2021.11; module load chem/vasp/6.4.3_intel-2022.0.2; source /hkfs/home/project/hk-project-p0022384/an9294/venvs/vrel-mstr/bin/activate'})
My default queue is dev_cpuonly
, which allows a maximum computing time of 4.0 hours.
If my resource annotation exceeds this time limitation, the session crashes as shown above.