aiida.engine.processes.calcjobs.tasks.PreSubmitException: exception occurred in presubmit call

HI,
I am trying to follow the instruction on aiida-quantumespresso, Running a pw.x calculation — aiida-quantumespresso documentation. But I meet a same problem as this google group(https://groups.google.com/g/aiidausers/c/aFO8x2jV0-8) , but I cannot find the answer.

It seems the plugin aiida-quantumespresso, code pw.x, and pseudo-potential are all properly installed, but when I try to run via CLI or verdi shell, it reports "aiida.engine.processes.calcjobs.tasks.PreSubmitException: exception occurred in presubmit call
"

yang@yang-Inspiron-3670:~/AiiDA/tutorial_pseudo/sssp$ aiida-pseudo install sssp --from-download  SSSP_1.3_PBE_efficiency.aiida_pseudo
Report: unpacking archive and parsing pseudos...  [OK]
Success: installed `SSSP/1.3/PBE/efficiency` containing 103 pseudopotentials.
2024-02-02 19:16:15.221 CST [43875] LOG:  unexpected EOF on client connection with an open transaction
(aiida_QE) yang@yang-Inspiron-3670:~/AiiDA/tutorial_pseudo/sssp$ verdi code list
|Full label      Pk  Entry point
------------  ----  -------------------
add@tutor        5  core.code.installed
pw@localhost   130  core.code.installed

Use `verdi code show IDENTIFIER` to see details for a code
i(aiida_QE) yang@yang-Inspiron-3670:~/AiiDA/tutorial_pseudo/sssp$ aiida-pseudo list
Label                                Type string                Count
-----------------------------------  -------------------------  -------
PseudoDojo/0.4/PBE/SR/standard/psp8  pseudo.family.pseudo_dojo  72
SSSP/1.3/PBEsol/efficiency           pseudo.family.sssp         103
SSSP/1.3/PBE/efficiency              pseudo.family.sssp         103
(aiida_QE) yang@yang-Inspiron-3670:~/AiiDA/tutorial_pseudo/sssp$ aiida-quantumespresso calculation launch pw -X pw@locahost -F SSSP/1.3/PBE/efficiency 
Usage: aiida-quantumespresso calculation launch pw [OPTIONS]
Try 'aiida-quantumespresso calculation launch pw -h' for help.

Error: Invalid value for '-X' / '--code': no Code found with LABEL<pw@locahost>: No result was found
(aiida_QE) yang@yang-Inspiron-3670:~/AiiDA/tutorial_pseudo/sssp$ aiida-quantumespresso calculation launch pw -X pw@localhost -F SSSP/1.3/PBE/efficiency 
Running a PwCalculation...
Error: Exception whilst using transport:
Traceback (most recent call last):
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 91, in do_upload
    calc_info = process.presubmit(folder)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/calcjob.py", line 897, in presubmit
    job_tmpl.job_resource = scheduler.create_job_resource(**resources)  # type: ignore[arg-type]
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/scheduler.py", line 125, in create_job_resource
    return cls._job_resource_class(**kwargs)  # pylint: disable=not-callable
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/datastructures.py", line 177, in __init__
    resources = self.validate_resources(**kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/datastructures.py", line 149, in validate_resources
    raise ValueError(
ValueError: At least two among `num_machines`, `num_mpiprocs_per_machine` or `tot_num_mpiprocs` must be specified.

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

Traceback (most recent call last):
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/transports.py", line 110, in request_transport
    yield transport_request.future
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/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: [319|PwCalculation|on_except]: Traceback (most recent call last):
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 91, in do_upload
    calc_info = process.presubmit(folder)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/calcjob.py", line 897, in presubmit
    job_tmpl.job_resource = scheduler.create_job_resource(**resources)  # type: ignore[arg-type]
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/scheduler.py", line 125, in create_job_resource
    return cls._job_resource_class(**kwargs)  # pylint: disable=not-callable
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/datastructures.py", line 177, in __init__
    resources = self.validate_resources(**kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/datastructures.py", line 149, in validate_resources
    raise ValueError(
ValueError: At least two among `num_machines`, `num_mpiprocs_per_machine` or `tot_num_mpiprocs` must be specified.

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

Traceback (most recent call last):
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/plumpy/processes.py", line 1218, in step
    next_state = await self._run_task(self._state.execute)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/plumpy/processes.py", line 567, in _run_task
    result = await coro(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 499, in execute
    skip_submit = await self._launch_task(task_upload_job, self.process, transport_queue)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 616, in _launch_task
    result = await self._task
             ^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/asyncio/tasks.py", line 339, in __wakeup
    future.result()
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/utils.py", line 141, in execute_coroutine
    result = await coro(future)
             ^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 103, in task_upload_job
    skip_submit = await exponential_backoff_retry(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/utils.py", line 209, in exponential_backoff_retry
    result = await coro()
             ^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/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

Traceback (most recent call last):
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 91, in do_upload
    calc_info = process.presubmit(folder)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/calcjob.py", line 897, in presubmit
    job_tmpl.job_resource = scheduler.create_job_resource(**resources)  # type: ignore[arg-type]
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/scheduler.py", line 125, in create_job_resource
    return cls._job_resource_class(**kwargs)  # pylint: disable=not-callable
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/datastructures.py", line 177, in __init__
    resources = self.validate_resources(**kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/datastructures.py", line 149, in validate_resources
    raise ValueError(
ValueError: At least two among `num_machines`, `num_mpiprocs_per_machine` or `tot_num_mpiprocs` must be specified.

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

Traceback (most recent call last):
  File "/home/yang/miniforge3/envs/aiida_QE/bin/aiida-quantumespresso", line 10, in <module>
    sys.exit(cmd_root())
             ^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/cmdline/utils/decorators.py", line 81, in wrapper
    return wrapped(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida_quantumespresso/cli/calculations/pw.py", line 121, in launch_calculation
    launch.launch_process(CalculationFactory('quantumespresso.pw'), daemon, **inputs)
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida_quantumespresso/cli/utils/launch.py", line 34, in launch_process
    _, node = launch.run_get_node(process, **inputs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/launch.py", line 65, in run_get_node
    return runner.run_get_node(process, inputs, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/runners.py", line 290, in run_get_node
    result, node = self._run(process, inputs, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/runners.py", line 260, in _run
    process_inited.execute()
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/plumpy/processes.py", line 86, in func_wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/plumpy/processes.py", line 1197, in execute
    return self.future().result()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/plumpy/processes.py", line 1218, in step
    next_state = await self._run_task(self._state.execute)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/plumpy/processes.py", line 567, in _run_task
    result = await coro(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 499, in execute
    skip_submit = await self._launch_task(task_upload_job, self.process, transport_queue)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 616, in _launch_task
    result = await self._task
             ^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/asyncio/tasks.py", line 339, in __wakeup
    future.result()
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/utils.py", line 141, in execute_coroutine
    result = await coro(future)
             ^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 103, in task_upload_job
    skip_submit = await exponential_backoff_retry(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/utils.py", line 209, in exponential_backoff_retry
    result = await coro()
             ^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/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
(aiida_QE) yang@yang-Inspiron-3670:~/AiiDA/tutorial_pseudo/sssp$ 2024-02-02 19:18:18.256 CST [6015] LOG:  checkpoint starting: time
2024-02-02 19:18:27.978 CST [6015] LOG:  checkpoint complete: wrote 100 buffers (0.6%); 0 WAL file(s) added, 0 removed, 1 recycled; write=9.716 s, sync=0.003 s, total=9.722 s; sync files=55, longest=0.001 s, average=0.001 s; distance=672 kB, estimate=672 kB

(aiida_QE) yang@yang-Inspiron-3670:~/AiiDA/tutorial_pseudo/sssp$ aiida-quantumespresso calculation launch pw -X pw@localhost -F SSSP/1.3/PBEsol/efficiency 
Running a PwCalculation...
Error: Exception whilst using transport:
Traceback (most recent call last):
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 91, in do_upload
    calc_info = process.presubmit(folder)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/calcjob.py", line 897, in presubmit
    job_tmpl.job_resource = scheduler.create_job_resource(**resources)  # type: ignore[arg-type]
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/scheduler.py", line 125, in create_job_resource
    return cls._job_resource_class(**kwargs)  # pylint: disable=not-callable
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/datastructures.py", line 177, in __init__
    resources = self.validate_resources(**kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/datastructures.py", line 149, in validate_resources
    raise ValueError(
ValueError: At least two among `num_machines`, `num_mpiprocs_per_machine` or `tot_num_mpiprocs` must be specified.

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

Traceback (most recent call last):
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/transports.py", line 110, in request_transport
    yield transport_request.future
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/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: [322|PwCalculation|on_except]: Traceback (most recent call last):
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 91, in do_upload
    calc_info = process.presubmit(folder)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/calcjob.py", line 897, in presubmit
    job_tmpl.job_resource = scheduler.create_job_resource(**resources)  # type: ignore[arg-type]
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/scheduler.py", line 125, in create_job_resource
    return cls._job_resource_class(**kwargs)  # pylint: disable=not-callable
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/datastructures.py", line 177, in __init__
    resources = self.validate_resources(**kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/datastructures.py", line 149, in validate_resources
    raise ValueError(
ValueError: At least two among `num_machines`, `num_mpiprocs_per_machine` or `tot_num_mpiprocs` must be specified.

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

Traceback (most recent call last):
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/plumpy/processes.py", line 1218, in step
    next_state = await self._run_task(self._state.execute)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/plumpy/processes.py", line 567, in _run_task
    result = await coro(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 499, in execute
    skip_submit = await self._launch_task(task_upload_job, self.process, transport_queue)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 616, in _launch_task
    result = await self._task
             ^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/asyncio/tasks.py", line 339, in __wakeup
    future.result()
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/utils.py", line 141, in execute_coroutine
    result = await coro(future)
             ^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 103, in task_upload_job
    skip_submit = await exponential_backoff_retry(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/utils.py", line 209, in exponential_backoff_retry
    result = await coro()
             ^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/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

Traceback (most recent call last):
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 91, in do_upload
    calc_info = process.presubmit(folder)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/calcjob.py", line 897, in presubmit
    job_tmpl.job_resource = scheduler.create_job_resource(**resources)  # type: ignore[arg-type]
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/scheduler.py", line 125, in create_job_resource
    return cls._job_resource_class(**kwargs)  # pylint: disable=not-callable
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/datastructures.py", line 177, in __init__
    resources = self.validate_resources(**kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/schedulers/datastructures.py", line 149, in validate_resources
    raise ValueError(
ValueError: At least two among `num_machines`, `num_mpiprocs_per_machine` or `tot_num_mpiprocs` must be specified.

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

Traceback (most recent call last):
  File "/home/yang/miniforge3/envs/aiida_QE/bin/aiida-quantumespresso", line 10, in <module>
    sys.exit(cmd_root())
             ^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/cmdline/utils/decorators.py", line 81, in wrapper
    return wrapped(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida_quantumespresso/cli/calculations/pw.py", line 121, in launch_calculation
    launch.launch_process(CalculationFactory('quantumespresso.pw'), daemon, **inputs)
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida_quantumespresso/cli/utils/launch.py", line 34, in launch_process
    _, node = launch.run_get_node(process, **inputs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/launch.py", line 65, in run_get_node
    return runner.run_get_node(process, inputs, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/runners.py", line 290, in run_get_node
    result, node = self._run(process, inputs, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/runners.py", line 260, in _run
    process_inited.execute()
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/plumpy/processes.py", line 86, in func_wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/plumpy/processes.py", line 1197, in execute
    return self.future().result()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/plumpy/processes.py", line 1218, in step
    next_state = await self._run_task(self._state.execute)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/plumpy/processes.py", line 567, in _run_task
    result = await coro(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 499, in execute
    skip_submit = await self._launch_task(task_upload_job, self.process, transport_queue)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 616, in _launch_task
    result = await self._task
             ^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/asyncio/tasks.py", line 339, in __wakeup
    future.result()
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/utils.py", line 141, in execute_coroutine
    result = await coro(future)
             ^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/processes/calcjobs/tasks.py", line 103, in task_upload_job
    skip_submit = await exponential_backoff_retry(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/site-packages/aiida/engine/utils.py", line 209, in exponential_backoff_retry
    result = await coro()
             ^^^^^^^^^^^^
  File "/home/yang/miniforge3/envs/aiida_QE/lib/python3.11/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
(aiida_QE) yang@yang-Inspiron-3670:~/AiiDA/tutorial_pseudo/sssp$ 

I am not sure what the problem is…
I really appreciate it if anyone can help.
Sincerely,
Dr. Guoyu Yang
Lecturer
Jimei Univ, School of Science, Digital Fujian Big Data Modeling and Intelligent Computing Institute
185 Yinjiang Rd.,
Jimei District, Xiamen,361021
Fujian, China
E-mail: 201961000100@jmu.edu.cn

Your localhost computer probably doesn’t specify the default number of MPI procs per machine. The aiida-quantumespresso calculation launch pw command only specified the number of machines in the input, and so the total number of MPI procs is underdefined.

I think you can fix it by opening a verdi shell and running

load_computer('localhost').set_default_mpiprocs_per_machine(1)

Then run the launch command again.

Great!
That solves the problem.

(aiida_QE) yang@yang-Inspiron-3670:~/AiiDA/tutorial_pseudo/sssp$ ls
SSSP_1.3_PBE_efficiency.aiida_pseudo  SSSP_1.3_PBE_efficiency.aiida_pseudo_origin
(aiida_QE) yang@yang-Inspiron-3670:~/AiiDA/tutorial_pseudo/sssp$ verdi shell
Python 3.11.0 | packaged by conda-forge | (main, Jan 14 2023, 12:28:47) [GCC 11.3.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.20.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: load_computer('localhost').set_default_mpiprocs_per_machine(1)

In [2]: exit()
(aiida_QE) yang@yang-Inspiron-3670:~/AiiDA/tutorial_pseudo/sssp$ aiida-quantumespresso calculation launch pw -X pw@localhost -F SSSP/1.3/PBE/efficiency 
Running a PwCalculation...
PwCalculation<325> terminated with state: finished [0]

Output link               Node pk and type
------------------------------------------------------------
output_band               BandsData<328> 
output_parameters         Dict<330> 
output_trajectory         TrajectoryData<329> 
remote_folder             RemoteData<326> 
retrieved                 FolderData<327> 
2024-02-02 20:57:17.248 CST [53988] LOG:  unexpected EOF on client connection with an open transaction
(aiida_QE) yang@yang-Inspiron-3670:~/AiiDA/tutorial_pseudo/sssp$ 

Sincerely,
Dr. Guoyu Yang
Lecturer
Jimei Univ, School of Science, Digital Fujian Big Data Modeling and Intelligent Computing Institute
185 Yinjiang Rd.,
Jimei District, Xiamen,361021
Fujian, China
E-mail: 201961000100@jmu.edu.cn