Skip to content

Commit ee1338c

Browse files
committed
Enhance: force garbage collection on all workers and the scheduler in MPIDaskProcessor
1 parent 05e0340 commit ee1338c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stgrid2area/processor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,9 @@ def run(self, client: Client = None) -> dict:
552552
del futures, tasks
553553
gc.collect()
554554

555-
# Force garbage collection on all workers
555+
# Force garbage collection on all workers and the scheduler
556556
client.run(gc.collect)
557+
client.run_on_scheduler(gc.collect)
557558

558559
except Exception as e:
559560
self.logger.error(f"Error during batch {i}, stgrid {n_stgrid}: {e}")

0 commit comments

Comments
 (0)