Skip to content

Commit 7231a05

Browse files
committed
Description and comments refined
1 parent 842dc94 commit 7231a05

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ Large executing jobs can be postponed for the later execution with less number o
6060

6161
Demo of the *scheduling with memory constraints* for the worker processes:
6262
![mpepool_memory](images/mpepool_mem.png)
63-
> Zombie processes still may appear on abnormal termination of worker processes during rescheduling due to some bug in the Python interpreter. Anyway all resources are clearer up and the zombies disappear on the execution pool completion.
6463

6564
Demo of the *scheduling with cache L1 maximization* for single-threaded processes on the server with cross-node CPUs enumeration. Whole physical CPU core consisting of two hardware threads assigned to each worker process, so the L1 cache is dedicated (not shared), but the maximal loading over all CPUs is 50%:
6665
![mpepool_cacheL1_1](images/mpepool_cacheL1_1.png)

mpepool.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,7 @@ def __start(self, job, concur=True):
22272227
# Kill non-terminated process
22282228
if active:
22292229
if job.proc.poll() is None:
2230-
print(' Killing ~zombie "{}" #{} ...'.format(job.name, job.proc.pid), file=sys.stderr)
2230+
print(' Killing ~hanged "{}" #{} ...'.format(job.name, job.proc.pid), file=sys.stderr)
22312231
job.proc.kill()
22322232
self.__complete(job, False)
22332233
# ATTENTION: re-raise exception for the BaseException but not Exception sub-classes
@@ -2523,7 +2523,6 @@ def __reviseWorkers(self):
25232523
memall = self.memlimit + memov # Note: memov is negative here
25242524

25252525
# Process completed (and terminated) jobs: execute callbacks and remove the workers
2526-
#cterminated = False # Completed terminated procs processed
25272526
for job in completed:
25282527
# Note: check for the termination in all cycles
25292528
if not self.alive:
@@ -2533,7 +2532,6 @@ def __reviseWorkers(self):
25332532
exectime = job.tstop - job.tstart
25342533
# Restart the job if it was terminated and should be restarted
25352534
if not job.terminates:
2536-
#cterminated = True
25372535
continue
25382536
print('WARNING, "{}" #{} is terminated because of the {} violation'
25392537
', chtermtime: {}, consumes {:.4f} / {:.4f} GB, timeout {:.4f} sec, executed: {:.4f} sec ({} h {} m {:.4f} s)'
@@ -2575,7 +2573,8 @@ def __reviseWorkers(self):
25752573
self.__postpone(job, True)
25762574
# Note: the number of workers is not reduced to less than 1
25772575

2578-
# Note: active_children() does not impact on the existence of zombie procs
2576+
# Note: active_children() does not impact on the existence of zombie procs,
2577+
# proc table clearup implemented in complete() using wait()
25792578
#if cterminated:
25802579
# # Note: required to join terminated child procs and avoid zombies
25812580
# # Return list of all live children of the current process,joining any processes which have already finished

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
setup(
1919
name=pkgname, # This is the name of your PyPI-package.
20-
# version='2.2.0', # Update the version number for new releases
2120
version='3.1.0', # Update the version number for new releases
2221
description=('A lightweight multi-process Execution Pool with load balancing'
2322
' and customizable resource consumption constraints.'), # Required, "Summary" metadata field

0 commit comments

Comments
 (0)