# Regarding Workchain Not Executing After Modification

**URL:** <https://aiida.discourse.group/t/regarding-workchain-not-executing-after-modification/622>\
**Category:** New to AiiDA\
**Tags:** question, plugin\
**Created:** [June 13, 2025, 8:39pm UTC](https://aiida.discourse.group/t/regarding-workchain-not-executing-after-modification/622 "2025-06-13T20:39:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rushikd27](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/rushikd27/32/323_2.png) [@rushikd27](https://aiida.discourse.group/u/rushikd27)\
**Post date:** [June 13, 2025, 8:39pm UTC](https://aiida.discourse.group/t/regarding-workchain-not-executing-after-modification/622/1 "2025-06-13T20:39:19Z")

</div>

Hi everyone,

I was designing some workchains for my VASP calculations, and what I noticed was that every time I changed something and restarted the daemon, it still seemed to execute an older version of the script. Am I supposed to do something apart from restarting the daemon?

Thank you,  
Rushik

---

<div class="post-metadata">

**Author:** ![Xing](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/xing/32/10_2.png) [@Xing](https://aiida.discourse.group/u/Xing)\
**Post date:** [June 13, 2025, 9:22pm UTC](https://aiida.discourse.group/t/regarding-workchain-not-executing-after-modification/622/2 "2025-06-13T21:22:09Z")

</div>

AFAIK, restarting the daemon should pick up the latest version of your module. A few things to check:

- Make sure your package is installed in **editable mode** (`pip install -e .`), and double-check that the installed path is actually pointing to the source files you’re editing.

- You might want to clear any cached files (e.g., ` __pycache__ ` folders) in the package. Not likely the root cause, but worth trying.

If that doesn’t help:

- Which version of AiiDA are you using?

- Are you running `verdi daemon restart`? In some versions, it’s more reliable to use `verdi daemon stop` followed by `verdi daemon start`. The behavior changed in certain versions of `aiida-core` (I don’t remember exactly when).

---

<div class="post-metadata">

**Author:** ![nkeilbart](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/nkeilbart/32/40_2.png) [@nkeilbart](https://aiida.discourse.group/u/nkeilbart)\
**Post date:** [June 13, 2025, 9:37pm UTC](https://aiida.discourse.group/t/regarding-workchain-not-executing-after-modification/622/3 "2025-06-13T21:37:03Z")

</div>

I would also like to mention to check for any rogue daemons that might be lurking. I’ve had this issue several times where I’m working on the supercomputer and I forget to shut down my daemons. I then get logged into another login node and start up some daemons. The old daemons are still running on the other login node and will sometimes execute the jobs.

---

<div class="post-metadata">

**Author:** ![rushikd27](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/rushikd27/32/323_2.png) [@rushikd27](https://aiida.discourse.group/u/rushikd27)\
**Post date:** [June 17, 2025, 1:17pm UTC](https://aiida.discourse.group/t/regarding-workchain-not-executing-after-modification/622/4 "2025-06-17T13:17:32Z")

</div>

The first part, I think I am doing correctly and I am also deleting cached files. For the version, I am using, aiida 2.6.3 and I mostly do verdi daemon restart.

---

<div class="post-metadata">

**Author:** ![rushikd27](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/rushikd27/32/323_2.png) [@rushikd27](https://aiida.discourse.group/u/rushikd27)\
**Post date:** [June 17, 2025, 1:17pm UTC](https://aiida.discourse.group/t/regarding-workchain-not-executing-after-modification/622/5 "2025-06-17T13:17:58Z")

</div>

I think this might be an issue then, how do you remove the daemons from other login nodes then?

---

<div class="post-metadata">

**Author:** ![nkeilbart](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/nkeilbart/32/40_2.png) [@nkeilbart](https://aiida.discourse.group/u/nkeilbart)\
**Post date:** [June 19, 2025, 12:05am UTC](https://aiida.discourse.group/t/regarding-workchain-not-executing-after-modification/622/6 "2025-06-19T00:05:21Z")

</div>

This is the script I’m using on my server. You’ll have to modify it based on how your server is configured.

```python
#!/usr/bin/env python3
import os
import subprocess

def main():

    # Get a list of login nodes
    nodes = [x.split(':')[0][1:] for x in subprocess.check_output(['pdsh', '-g', '-login', 'uptime']).decode('utf-8').split('\n')]

    for node in nodes[:-1]:
        print(node)
        for item in subprocess.check_output(['ssh', node, 'ps', '-x', '|', 'grep', 'verdi']).decode().split('\n'):
            print(item)

if __name__ == " __main__":
    main()

```

It will print out the name of the node and any line in the return that has `verdi` included. I then go in by hand and kill the workers but that could be automated if you wanted as well.
