# Pw.x failure in tutorial examples

**URL:** <https://aiida.discourse.group/t/pw-x-failure-in-tutorial-examples/502>\
**Category:** New to AiiDA\
**Created:** [November 25, 2024, 2:25pm UTC](https://aiida.discourse.group/t/pw-x-failure-in-tutorial-examples/502 "2024-11-25T14:25:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vahid\_Bozorgi](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/vahid_bozorgi/32/222_2.png) [@Vahid\_Bozorgi](https://aiida.discourse.group/u/Vahid_Bozorgi)\
**Post date:** [November 25, 2024, 2:25pm UTC](https://aiida.discourse.group/t/pw-x-failure-in-tutorial-examples/502/1 "2024-11-25T14:25:58Z")

</div>

Hi,  
I am a new user of AiiDa. After installing and verifying AiiDa, I tried to run given examples in:

> **[Tutorials — aiida-vibroscopy 1.4.0 documentation](https://aiida-vibroscopy.readthedocs.io/en/latest/tutorials/index.html)**

But the workflows keep failing with the following error:  
\<554234\> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [1873|PhononWorkChain|run\_base\_supercell]: launching base supercell scf PwBaseWorkChain\<1881\>  
\<554234\> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [1881|PwBaseWorkChain|run\_process]: launching PwCalculation\<1884\> iteration #1  
\<554234\> aiida.parser.PwParser: [WARNING] key ‘symmetries’ is not present in raw output dictionary  
\<554234\> aiida.parser.PwParser: [ERROR] ERROR\_OUTPUT\_STDOUT\_INCOMPLETE  
\<554234\> aiida.parser.PwParser: [ERROR] Both the stdout and XML output files could not be read or parsed.  
\<554234\> aiida.orm.nodes.process.calculation.calcjob.CalcJobNode: [WARNING] output parser returned exit code\<305\>: Both the stdout and XML output files could not be read or parsed.  
\<554234\> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [1881|PwBaseWorkChain|report\_error\_handled]: PwCalculation\<1884\> failed with exit status 305: Both the stdout and XML output files could not be read or parsed.

I checked my pw.x, with:  
!verdi code show pw@localhost  
I also checked the read and write permissions for the working directory. I also tried the following:  
!aiida-pseudo install sssp -x PBEsol --download-only  
!aiida-pseudo install sssp --from-download SSSP\_1.3\_PBEsol\_efficiency.aiida\_pseudo  
These were all fine but the problem persists, here is an example of what I tried to run using Jupyterhub on remote HPC:  
from aiida import load\_profile  
load\_profile()  
from aiida\_quantumespresso.workflows.pw.bands import PwBandsWorkChain  
from aiida.orm import \*  
from aiida.plugins import WorkflowFactory  
from aiida.engine import run\_get\_node  
from aiida\_vibroscopy.workflows.phonons.base import PhononWorkChain, PhononProperty

# Manually load the codes you need (pw.x and phonopy)

pw\_code = load\_code(‘pw@localhost’)  
phonopy\_code = load\_code(‘phonopy@localhost’)

from aiida.plugins import DbImporterFactory  
CodDbImporter = DbImporterFactory(‘core.cod’)

cod = CodDbImporter()  
results = cod.query(id=‘1526655’) # Si 1526655  
structure = results[0].get\_aiida\_structure() # it has 8 atoms  
from aiida\_vibroscopy.common.properties import PhononProperty

PhononWorkChain = WorkflowFactory(“vibroscopy.phonons.phonon”)

builder = PhononWorkChain.get\_builder\_from\_protocol(  
pw\_code=pw\_code,  
structure=structure,  
protocol=“fast”,  
phonopy\_code=phonopy\_code,  
phonon\_property=PhononProperty.BANDS  
)  
builder.supercell\_matrix = List([1,1,1])

results, calc = run\_get\_node(builder)

> ------------------------Here it failed with the above error---------------------\<

I would appreciate it if you could help me solve this problem.  
Thanks a lot in advance!  
Vahid Jamebozorgi

---

<div class="post-metadata">

**Author:** ![t-reents](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/t-reents/32/82_2.png) [@t-reents](https://aiida.discourse.group/u/t-reents)\
**Post date:** [November 25, 2024, 3:15pm UTC](https://aiida.discourse.group/t/pw-x-failure-in-tutorial-examples/502/2 "2024-11-25T15:15:15Z")

</div>

Hi Vahid,

can you please run the following command and let us know about the output:

```auto
verdi calcjob gotocomputer 1884

```

This will open the working directory of your failed `CalcJob` with `pk=1884` (so you can replace the `1884` with another `pk`, if you want to analyze a different one) so that you can inspect the output files manually. This will hopefully show why the `CalcJob` failed.

---

<div class="post-metadata">

**Author:** ![Vahid\_Bozorgi](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/vahid_bozorgi/32/222_2.png) [@Vahid\_Bozorgi](https://aiida.discourse.group/u/Vahid_Bozorgi)\
**Post date:** [November 25, 2024, 5:26pm UTC](https://aiida.discourse.group/t/pw-x-failure-in-tutorial-examples/502/3 "2024-11-25T17:26:02Z")

</div>

Thank you very much for your reply. I gave your command and received the following:  
Report: going to the remote work directory…  
\*\* The directory  
\*\* /…/.aiida/scratch/presto-5/4f/44/a903-6c22-46ee-bc28-e96c15eeafd6  
\*\* seems to have been deleted, I logout…

Best,  
Vahid

---

<div class="post-metadata">

**Author:** ![t-reents](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/t-reents/32/82_2.png) [@t-reents](https://aiida.discourse.group/u/t-reents)\
**Post date:** [November 25, 2024, 8:05pm UTC](https://aiida.discourse.group/t/pw-x-failure-in-tutorial-examples/502/4 "2024-11-25T20:05:40Z")

</div>

Alright, the directory was cleaned after the calculation terminated. In that case, please run  
`verdi calcjob outputcat 1884`  
It will print the output file of the `pw.x` in your terminal.

---

<div class="post-metadata">

**Author:** ![Vahid\_Bozorgi](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/vahid_bozorgi/32/222_2.png) [@Vahid\_Bozorgi](https://aiida.discourse.group/u/Vahid_Bozorgi)\
**Post date:** [November 25, 2024, 8:40pm UTC](https://aiida.discourse.group/t/pw-x-failure-in-tutorial-examples/502/5 "2024-11-25T20:40:34Z")

</div>

Thanks a lot. I gave this command but nothing happened (appeared).

---

<div class="post-metadata">

**Author:** ![mbercx](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/mbercx/32/345_2.png) [@mbercx](https://aiida.discourse.group/u/mbercx)\
**Post date:** [November 25, 2024, 9:00pm UTC](https://aiida.discourse.group/t/pw-x-failure-in-tutorial-examples/502/6 "2024-11-25T21:00:45Z")

</div>

Hmm, then the `stdout` from QE is most likely empty. Let’s have a look at the `stdout` and `stderr` produced by the scheduler:

```auto
verdi calcjob outputcat 1884 _scheduler-stdout.txt
verdi calcjob outputcat 1884 _scheduler-stderr.txt

```

---

<div class="post-metadata">

**Author:** ![Vahid\_Bozorgi](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/vahid_bozorgi/32/222_2.png) [@Vahid\_Bozorgi](https://aiida.discourse.group/u/Vahid_Bozorgi)\
**Post date:** [November 25, 2024, 9:08pm UTC](https://aiida.discourse.group/t/pw-x-failure-in-tutorial-examples/502/7 "2024-11-25T21:08:09Z")

</div>

I gave the commands and got:  
\_aiidasubmit.sh: line 6: mpirun: command not found

---

<div class="post-metadata">

**Author:** ![t-reents](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/t-reents/32/82_2.png) [@t-reents](https://aiida.discourse.group/u/t-reents)\
**Post date:** [November 26, 2024, 7:58am UTC](https://aiida.discourse.group/t/pw-x-failure-in-tutorial-examples/502/8 "2024-11-26T07:58:42Z")

</div>

Thanks!

Apparently, your system doesn’t provide the `mpirun` command. If this is expected, i.e. you didn’t forget to load any modules, and your localhost doesn’t support `mpi`, you can run the calculation without `mpi` by setting the following:

```auto
builder = PhononWorkChain.get_builder_from_protocol(
pw_code=pw_code,
structure=structure,
protocol=“fast”,
phonopy_code=phonopy_code,
phonon_property=PhononProperty.BANDS,
options={'withmpi': False}
)

```

`

---

<div class="post-metadata">

**Author:** ![Vahid\_Bozorgi](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/vahid_bozorgi/32/222_2.png) [@Vahid\_Bozorgi](https://aiida.discourse.group/u/Vahid_Bozorgi)\
**Post date:** [November 26, 2024, 9:12am UTC](https://aiida.discourse.group/t/pw-x-failure-in-tutorial-examples/502/9 "2024-11-26T09:12:51Z")

</div>

Thanks a lot! I could successfully run pw.x. But it failed again:  
‘‘PhonopyCalculation failed with exit status 312’’  
So:  
!verdi calcjob outputcat 404 \_scheduler-stdout.txt  
!verdi calcjob outputcat 404 \_scheduler-stderr.txt

\_aiidasubmit.sh: line 6: /path/to/phonopy: No such file or directory

But I have phonopy installed:  
$ verdi code list  
Full label Pk Entry point

* * *

pw@localhost 1 core.code.installed  
phonopy@localhost 2 core.code.installed

!which phonopy  
~/.local/bin/phonopy

Also I made sure that it was accessable:  
export PATH=/…/.conda/envs/aiida\_py39/bin/phonopy:$PATH

---

<div class="post-metadata">

**Author:** ![t-reents](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/t-reents/32/82_2.png) [@t-reents](https://aiida.discourse.group/u/t-reents)\
**Post date:** [November 26, 2024, 6:52pm UTC](https://aiida.discourse.group/t/pw-x-failure-in-tutorial-examples/502/10 "2024-11-26T18:52:04Z")

</div>

Hi Valid, great that you could solve the first issue.

Regarding the new one, when setting up the code, you need to provide the correct absolute path to the executable, i.e. the one that is returned by the `which` command. However, as printed in the error message, you’ve set the path to `/path/to/phonopy`. You should simply set up a new `Code` and specify the correct path. Afterwards, this problem should be solved.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![Vahid\_Bozorgi](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/vahid_bozorgi/32/222_2.png) [@Vahid\_Bozorgi](https://aiida.discourse.group/u/Vahid_Bozorgi)\
**Post date:** [November 27, 2024, 9:21am UTC](https://aiida.discourse.group/t/pw-x-failure-in-tutorial-examples/502/11 "2024-11-27T09:21:59Z")

</div>

Hi,  
Thank you very much! I could successfully run the example. However, I encountered another issue in the example ‘Vibrational spectra of Si’. It runs fine until I give the command:  
polarized\_intensities, depolarized\_intensities, frequencies, labels = vibro.run\_powder\_raman\_intensities(frequency\_laser=532, temperature=300)  
print(frequencies, “\n”, labels)  
Then I get the error:  
‘LinAlgError: Eigenvalues did not converge’  
I checked the outputs using ‘verdi calcjob outputcat’, but all calculations converged. Here is the numerical accuracy of the Raman tensors:  
14.0151635626189 14.011518672421136 14.000584001828
