Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: aiida-qe workflow launch fails with KeyError: 'NAMELISTS' #1042

Closed
GeigerJ2 opened this issue Sep 10, 2024 · 3 comments
Closed

CLI: aiida-qe workflow launch fails with KeyError: 'NAMELISTS' #1042

GeigerJ2 opened this issue Sep 10, 2024 · 3 comments

Comments

@GeigerJ2
Copy link

GeigerJ2 commented Sep 10, 2024

As the title says, trying to run a PwBaseWorkChain through the CLI via:

aiida-quantumespresso workflow launch pw-base -X qe-7.3-gf-pw@thor -F SSSP/1.3/PBE/efficiency

fails, giving the following traceback:

Running a PwBaseWorkChain...
Report: [190|PwBaseWorkChain|run_process]: launching PwCalculation<196> iteration #1
Error: Exception whilst using transport:
Traceback (most recent call last):
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida_quantumespresso/calculations/__init__.py", line 711, in _generate_PWCPinputdata
    namelists_toprint = settings.pop('NAMELISTS')
KeyError: 'NAMELISTS'
(full traceback)
Running a PwBaseWorkChain...
Report: [190|PwBaseWorkChain|run_process]: launching PwCalculation<196> iteration #1
Error: Exception whilst using transport:
Traceback (most recent call last):
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida_quantumespresso/calculations/__init__.py", line 711, in _generate_PWCPinputdata
    namelists_toprint = settings.pop('NAMELISTS')
KeyError: 'NAMELISTS'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida_quantumespresso/calculations/__init__.py", line 720, in _generate_PWCPinputdata
    calculation_type = control_nl['calculation']
KeyError: 'calculation'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 91, in do_upload
    calc_info = process.presubmit(folder)
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida/engine/processes/calcjobs/calcjob.py", line 866, in presubmit
    calc_info = self.prepare_for_submission(folder)
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida_quantumespresso/calculations/__init__.py", line 263, in prepare_for_submission
    input_filecontent, local_copy_pseudo_list = self._generate_PWCPinputdata(*arguments)
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida_quantumespresso/calculations/__init__.py", line 722, in _generate_PWCPinputdata
    raise exceptions.InputValidationError(
aiida.common.exceptions.InputValidationError: No 'calculation' in CONTROL namelist.It is required for automatic detection of the valid list of namelists. Otherwise, specify the list of namelists using the NAMELISTS key inside the 'settings' input node.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida/engine/transports.py", line 106, in request_transport
    yield transport_request.future
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 93, in do_upload
    raise PreSubmitException('exception occurred in presubmit call') from exception
aiida.engine.processes.calcjobs.tasks.PreSubmitException: exception occurred in presubmit call

Report: [196|PwCalculation|on_except]: Traceback (most recent call last):
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida_quantumespresso/calculations/__init__.py", line 711, in _generate_PWCPinputdata
    namelists_toprint = settings.pop('NAMELISTS')
KeyError: 'NAMELISTS'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida_quantumespresso/calculations/__init__.py", line 720, in _generate_PWCPinputdata
    calculation_type = control_nl['calculation']
KeyError: 'calculation'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 91, in do_upload
    calc_info = process.presubmit(folder)
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida/engine/processes/calcjobs/calcjob.py", line 866, in presubmit
    calc_info = self.prepare_for_submission(folder)
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida_quantumespresso/calculations/__init__.py", line 263, in prepare_for_submission
    input_filecontent, local_copy_pseudo_list = self._generate_PWCPinputdata(*arguments)
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida_quantumespresso/calculations/__init__.py", line 722, in _generate_PWCPinputdata
    raise exceptions.InputValidationError(
aiida.common.exceptions.InputValidationError: No 'calculation' in CONTROL namelist.It is required for automatic detection of the valid list of namelists. Otherwise, specify the list of namelists using the NAMELISTS key inside the 'settings' input node.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/plumpy/processes.py", line 1224, in step
    next_state = await self._run_task(self._state.execute)
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/plumpy/processes.py", line 573, in _run_task
    result = await coro(*args, **kwargs)
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 503, in execute
    skip_submit = await self._launch_task(task_upload_job, self.process, transport_queue)
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 623, in _launch_task
    result = await self._task
  File "/usr/lib/python3.10/asyncio/tasks.py", line 304, in __wakeup
    future.result()
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida/engine/utils.py", line 137, in execute_coroutine
    result = await coro(future)
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 105, in task_upload_job
    skip_submit = await exponential_backoff_retry(
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida/engine/utils.py", line 205, in exponential_backoff_retry
    result = await coro()
  File "/home/geiger_j/.aiida_venvs/thor-dev/lib/python3.10/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 93, in do_upload
    raise PreSubmitException('exception occurred in presubmit call') from exception
aiida.engine.processes.calcjobs.tasks.PreSubmitException: exception occurred in presubmit call

Report: [190|PwBaseWorkChain|on_terminated]: remote folders will not be cleaned
PwBaseWorkChain<190> terminated with state: finished [301] `The sub process excepted.`
PwBaseWorkChain<190> registered no outputs

I have the following packages installed:

❯ pip freeze | grep aiida
aiida-core==2.6.2
aiida-pseudo==1.5.0
aiida-quantumespresso==4.6.0

and verdi status gives:

❯ verdi status
 ✔ version:     AiiDA v2.6.2
 ✔ config:      /home/geiger_j/aiida_projects/thor-dev/.aiida
 ✔ profile:     thor-dev
 ✔ storage:     SqliteDosStorage[/home/geiger_j/aiida_projects/thor-dev/.aiida/repository/sqlite_dos_4e5e95bb20044474ad7e574beaf08b3f]: open,
 ✔ broker:      RabbitMQ v3.9.13 @ amqp://guest:guest@127.0.0.1:5672?heartbeat=600
 ✔ daemon:      Daemon is running with PID 2440252

Interestingly, aiida-quantumespresso calculation launch works fine, and so does submitting WorkChains via python scripts/jupyter notebooks. verdi computer test and verdi code test also run through successfully, so I'd rule issues there out. Seems to be related to how the WorkChain is being set up when going through the aiida-qe CLI.

@sphuber
Copy link
Contributor

sphuber commented Sep 10, 2024

I think this PR fixes that bug: #1039
Could you try?

@GeigerJ2
Copy link
Author

Hi @sphuber, thanks for the quick response. I can indeed confirm that this fixed it for me. I'll give the PR a review!

@sphuber
Copy link
Contributor

sphuber commented Sep 11, 2024

Fixed in #1039

@sphuber sphuber closed this as completed Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants