File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -706,35 +706,35 @@ def constrained_opt_run(
706706 def terminate (self , directory = "./" ) -> None :
707707 """Kill all VASP processes associated with the current job."""
708708 pid = self ._vasp_process .pid
709-
709+
710710 if self ._vasp_process .poll () is not None :
711711 logger .warning (f"Process { pid } already terminated" )
712712 return
713-
713+
714714 if os .name != "nt" :
715715 # Look up process group ID
716716 try :
717717 pgid = os .getpgid (pid )
718718 except ProcessLookupError :
719719 logger .warning (f"Process group for { pid } not found" )
720720 return
721-
721+
722722 # Send SIGTERM to the entire process group
723723 logger .info (f"Sending SIGTERM to process group { pgid } " )
724724 try :
725725 os .killpg (pgid , signal .SIGTERM )
726726 return
727727 except Exception as e :
728728 logger .warning (f"Process group { pgid } not terminated: { e } " )
729-
729+
730730 # Send SIGKILL to the entire process group
731731 logger .info (f"Sending SIGKILL to process group { pgid } " )
732732 try :
733733 os .killpg (pgid , signal .SIGKILL )
734734 return
735735 except Exception as e :
736736 logger .warning (f"Process group { pgid } not killed: { e } " )
737-
737+
738738 # Fall back to killing the parent launcher process
739739 try :
740740 logger .info (f"Terminating process { pid } " )
You can’t perform that action at this time.
0 commit comments