kill processes

190 views
Skip to first unread message

treents

unread,
Sep 9, 2021, 5:01:56 AM9/9/21
to aiidausers
Hi,

I was wondering whether one could try to implement the "-a --all" option also for the command "verdi process kill"? This option is available for example for the "verdi process play" command. So is there a general restriction why this would not work?

I think it would be useful to be able to kill all running processes or all running processes with a specific label. (for example if you spot an error in your workchain, so you do not have to wait until your submitted workchains will have failed.)

Kind regards,
Timo

Zhu, Bonan

unread,
Sep 9, 2021, 6:01:12 AM9/9/21
to aiida...@googlegroups.com

Hi Timo,

 

You can use bash command line tools, pipelines and expansions to achieve this.

 

For example – to kill process with some labels:

 

verdi process kill `verdi process list | grep <xx> | grep <xy> | awk ‘{print $1}’`

 

`grep` selects specific label(s)/ process types, and `awk` takes the first column which contains the pks. Then the output is used as argument for `verdi process kill`.

 

To kill all:

 

verdi process kill `verdi process list -r | awk ‘{print $1}’`

 

Best wishes,

Bonan

--
AiiDA is supported by the NCCR MARVEL (http://nccr-marvel.ch/), funded by the Swiss National Science Foundation, and by the European H2020 MaX Centre of Excellence (http://www.max-centre.eu/).
 
Before posting your first question, please see the posting guidelines at http://www.aiida.net/?page_id=356 .
---
You received this message because you are subscribed to the Google Groups "aiidausers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aiidausers+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aiidausers/70163a13-c904-44df-9c6d-5e68a8476314n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages