Skip to content

Commit

Permalink
Be explicit about filesystem monitoring radio being ForkProcess (#3680)
Browse files Browse the repository at this point in the history
Prior to this PR, on Linux, this is already a fork process because of
defaults.

But this process *must* be a fork process, for the same reason that
other explicit ForkProcesses in Parsl must be fork processes: we cannot
re-import the the unknown user workflow script again.

This PR makes that explicit and consistent with other forked processes.

Longer term, multiprocessing-forked processes need to go away throughout
Parsl - see issue #2343, but this PR is not for that.

# Changed Behaviour

This should not change behaviour on Linux. On platforms that are not
Linux, nothing is supported and is probably already broken here.

## Type of change

- Code maintenance/cleanup
  • Loading branch information
benclifford authored Nov 7, 2024
1 parent 6852e8e commit c392583
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions parsl/monitoring/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pickle
import queue
import time
from multiprocessing import Event, Process
from multiprocessing import Event
from multiprocessing.queues import Queue
from typing import TYPE_CHECKING, Literal, Optional, Tuple, Union, cast

Expand Down Expand Up @@ -171,11 +171,11 @@ def start(self, dfk_run_dir: str, config_run_dir: Union[str, os.PathLike]) -> No
self.dbm_proc.start()
logger.info("Started the router process %s and DBM process %s", self.router_proc.pid, self.dbm_proc.pid)

self.filesystem_proc = Process(target=filesystem_receiver,
args=(self.logdir, self.resource_msgs, dfk_run_dir),
name="Monitoring-Filesystem-Process",
daemon=True
)
self.filesystem_proc = ForkProcess(target=filesystem_receiver,
args=(self.logdir, self.resource_msgs, dfk_run_dir),
name="Monitoring-Filesystem-Process",
daemon=True
)
self.filesystem_proc.start()
logger.info("Started filesystem radio receiver process %s", self.filesystem_proc.pid)

Expand Down

0 comments on commit c392583

Please sign in to comment.