]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
kill ompi-server on killall
authorBernard Secher <bernard.secher@cea.fr>
Mon, 8 Aug 2016 13:59:52 +0000 (15:59 +0200)
committerBernard Secher <bernard.secher@cea.fr>
Mon, 8 Aug 2016 13:59:52 +0000 (15:59 +0200)
bin/killSalome.py

index 41e2820a2ea4b7b11e59dbbdcdcd5d5078b6ec3b..d3039eb96b4a1b8498cb1058efc7f3f5b2df4162 100755 (executable)
@@ -92,6 +92,15 @@ def killAllPorts():
                 pass
             pass
         pass
+        cmd = "ps -fea | grep '%s' | grep 'ompi-server' | grep -v 'grep' | awk '{print $2}'" % user
+        prc = commands.getoutput(cmd)
+        for field in prc.split():
+            try:
+                os.kill(int(field), signal.SIGKILL)
+            except:
+                pass
+            pass
+        pass
     pass
 
 if __name__ == "__main__":