You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your solver does not implement signal handling to the started process tree. This results in the situation that the sat solver (clasp) might still be running even though the benchmark tool or cluster scheduler sent a kill signal to the solver after timeout.
(check with kill -15 mysolver or kill -9 mysolver)
import signal
# SETUP SIGNAL HANDLING
signal.signal(signal.SIGTERM, utils.signals.handler)
signal.signal(signal.SIGINT, utils.signals.handler)
#!/usr/bin/env python
# coding=utf-8
import logging
import os
import sys
import psutil
def handler(signum, frame):
logging.error('signum %s' % signum)
current_process = psutil.Process()
children = current_process.children(recursive=True)
for child in children:
logging.error('Child pid is {}\n'.format(child.pid))
logging.error('Killing child.')
try:
os.kill(child.pid, 15)
except OSError as e:
logging.warn('Process might already be gone. See error below.')
logging.warn('%s' % str(e))
logging.warn('SIGNAL received')
if signum == 15:
raise TimeoutException('signal')
else:
raise InterruptException('signal')
def nothing(signum, frame):
logging.warn('SIGNAL received\n')
logging.warn('SIGNAL ignored...\n')
might be helpful
The text was updated successfully, but these errors were encountered:
Your solver does not implement signal handling to the started process tree. This results in the situation that the sat solver (clasp) might still be running even though the benchmark tool or cluster scheduler sent a kill signal to the solver after timeout.
(check with kill -15 mysolver or kill -9 mysolver)
might be helpful
The text was updated successfully, but these errors were encountered: