Skip to content

Commit

Permalink
Merge branch 'master' into parsl+flux
Browse files Browse the repository at this point in the history
  • Loading branch information
mercybassey authored Mar 12, 2024
2 parents 627dccc + e03a97b commit 8401356
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
26 changes: 13 additions & 13 deletions docs/userguide/configuring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,12 @@ This system uses Grid Engine which Parsl interfaces with using the `parsl.provid
.. literalinclude:: ../../parsl/configs/cc_in2p3.py


CCL (Notre Dame, with Work Queue)
---------------------------------
CCL (Notre Dame, TaskVine)
--------------------------

.. image:: http://ccl.cse.nd.edu/software/workqueue/WorkQueueLogoSmall.png
.. image:: https://ccl.cse.nd.edu/software/taskvine/taskvine-logo.png

To utilize Work Queue with Parsl, please install the full CCTools software package within an appropriate Anaconda or Miniconda environment
To utilize TaskVine with Parsl, please install the full CCTools software package within an appropriate Anaconda or Miniconda environment
(instructions for installing Miniconda can be found `in the Conda install guide <https://docs.conda.io/projects/conda/en/latest/user-guide/install/>`_):

.. code-block:: bash
Expand All @@ -498,17 +498,17 @@ To utilize Work Queue with Parsl, please install the full CCTools software packa
$ conda activate <environment>
$ conda install -y -c conda-forge ndcctools parsl
This creates a Conda environment on your machine with all the necessary tools and setup needed to utilize Work Queue with the Parsl library.
This creates a Conda environment on your machine with all the necessary tools and setup needed to utilize TaskVine with the Parsl library.

The following snippet shows an example configuration for using the Parsl/TaskVine executor to run applications on the local machine.
This examples uses the `parsl.executors.taskvine.TaskVineExecutor` to schedule tasks, and a local worker will be started automatically.
For more information on using TaskVine, including configurations for remote execution, visit the
`TaskVine/Parsl documentation online <https://cctools.readthedocs.io/en/latest/taskvine/#parsl>`_.

The following snippet shows an example configuration for using the Work Queue distributed framework to run applications on remote machines at large.
This examples uses the `parsl.executors.WorkQueueExecutor` to schedule tasks locally,
and assumes that Work Queue workers have been externally connected to the master using the
`work_queue_factory <https://cctools.readthedocs.io/en/latest/man_pages/work_queue_factory/>`_ or
`condor_submit_workers <https://cctools.readthedocs.io/en/latest/man_pages/condor_submit_workers/>`_ command line utilities from CCTools.
For more information on using Work Queue or to get help with running applications using CCTools,
visit the `CCTools documentation online <https://cctools.readthedocs.io/en/latest/help/>`_.
.. literalinclude:: ../../parsl/configs/vineex_local.py

.. literalinclude:: ../../parsl/configs/wqex_local.py
TaskVine's predecessor, WorkQueue, may continue to be used with Parsl.
For more information on using WorkQueue visit the `CCTools documentation online <https://cctools.readthedocs.io/en/latest/help/>`_.

Expanse (SDSC)
--------------
Expand Down
4 changes: 2 additions & 2 deletions parsl/dataflow/dflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def __init__(self, config: Config) -> None:
self.checkpoint_lock = threading.Lock()

self.usage_tracker = UsageTracker(self)
self.usage_tracker.send_message()
self.usage_tracker.send_start_message()

self.task_state_counts_lock = threading.Lock()
self.task_state_counts = {state: 0 for state in States}
Expand Down Expand Up @@ -1205,7 +1205,7 @@ def cleanup(self) -> None:
self._checkpoint_timer.close()

# Send final stats
self.usage_tracker.send_message()
self.usage_tracker.send_end_message()
self.usage_tracker.close()

logger.info("Closing job status poller")
Expand Down
14 changes: 5 additions & 9 deletions parsl/usage_tracking/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def __init__(self, dfk, port=50077,
sys.version_info.micro)
self.tracking_enabled = self.check_tracking_enabled()
logger.debug("Tracking status: {}".format(self.tracking_enabled))
self.initialized = False # Once first message is sent this will be True

def check_tracking_enabled(self):
"""Check if tracking is enabled.
Expand Down Expand Up @@ -176,15 +175,12 @@ def send_UDP_message(self, message: str) -> None:
except Exception as e:
logger.debug("Usage tracking failed: {}".format(e))

def send_message(self) -> None:
"""Send message over UDP.
"""
if not self.initialized:
message = self.construct_start_message()
self.initialized = True
else:
message = self.construct_end_message()
def send_start_message(self) -> None:
message = self.construct_start_message()
self.send_UDP_message(message)

def send_end_message(self) -> None:
message = self.construct_end_message()
self.send_UDP_message(message)

def close(self, timeout: float = 10.0) -> None:
Expand Down

0 comments on commit 8401356

Please sign in to comment.