How to stop the running workflow?

Hi all,

I have this status

(aiidaENV) rkarkee@ch-fe2:/lustre/scratch5/rkarkee>  verdi process list -L IRamanSpectraWorkChain
  PK  Created    Process label           ♻    Process State    Process status
----  ---------  ----------------------  ---  ---------------  -------------------------------
  24  7h ago     IRamanSpectraWorkChain       ⏵ Waiting        Waiting for child processes: 26
  76  20m ago    IRamanSpectraWorkChain       ⏹ Created


(aiidaENV) rkarkee@ch-fe2:/lustre/scratch5/rkarkee> verdi process list
  PK  Created    Process label           ♻    Process State    Process status
----  ---------  ----------------------  ---  ---------------  ---------------------------------------
  24  7h ago     IRamanSpectraWorkChain       ⏵ Waiting        Waiting for child processes: 26
  26  7h ago     HarmonicWorkChain            ⏵ Waiting        Waiting for child processes: 38
  38  7h ago     DielectricWorkChain          ⏵ Waiting        Waiting for child processes: 45
  45  7h ago     PwBaseWorkChain              ⏵ Waiting        Waiting for child processes: 51
  51  7h ago     PwCalculation                ⏵ Waiting        Monitoring scheduler: job state RUNNING
  76  30m ago    IRamanSpectraWorkChain       ⏹ Created

Total results: 6

Report: ♻ Processes marked with check-mark were not run but taken from the cache.
Report: Add the option `-P pk cached_from` to the command to display cache source.
Report: Last time an entry changed state: 30m ago (at 16:28:51 on 2024-02-29)
Report: Checking daemon load... OK
Report: Using 2% of the available daemon worker slots.

How can I kill or stop Pk=24? or workflow related to Pk=24?

Hi @rkarkee

In general, to kill a process, you can just run:

verdi process kill 24

This will also kill all subsequent processes that belong to the parent IRamanSpectraWorkChain with pk=24.

Hi @t-reents

I had tried that but this got this error;

(aiidaENV) rkarkee@ch-fe2:~> verdi process kill 24
Error: failed to kill Process<24>: Instance <DbNode at 0x15408bb74e10> is not bound to a Session; attribute refresh operation cannot proceed (Background on this error at: https://sqlalche.me/e/20/bhk3)