From 19e850c60f649e3af44e99288dc9d7b857e90df9 Mon Sep 17 00:00:00 2001 From: Eric Sivonxay Date: Wed, 17 May 2023 19:13:05 -0700 Subject: [PATCH 1/6] Added a MultiStore to DataServer --- fireworks/features/multi_launcher.py | 9 +++++++-- fireworks/utilities/fw_utilities.py | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/fireworks/features/multi_launcher.py b/fireworks/features/multi_launcher.py index 8004a3bad..ff19fcdcf 100644 --- a/fireworks/features/multi_launcher.py +++ b/fireworks/features/multi_launcher.py @@ -20,6 +20,7 @@ get_my_host, log_multi, ) +from maggma.stores.shared_stores import MultiStore __author__ = "Xiaohui Qu, Anubhav Jain" __copyright__ = "Copyright 2013, The Material Project & The Electrolyte Genome Project" @@ -64,7 +65,7 @@ def rapidfire_process( nlaunches (int): 0 means 'until completion', -1 or "infinite" means to loop forever sleep (int): secs to sleep between rapidfire loop iterations loglvl (str): level at which to output logs to stdout - port (int): Listening port number of the shared object manage + port (int): Listening port number of the shared object manager password (str): security password to access the server node_list ([str]): computer node list sub_nproc (int): number of processors of the sub job @@ -247,9 +248,13 @@ def launch_multiprocess( node_lists, sub_nproc_list = split_node_lists(num_jobs, total_node_list, ppn) # create shared dataserver - ds = DataServer.setup(launchpad) + multistore = MultiStore() + ds = DataServer.setup(launchpad, multistore) port = ds.address[1] + # set an environment variable, so that jobs may look for this server + os.environ["FW_DATASERVER_PORT"] = str(port) + manager = Manager() running_ids_dict = manager.dict() # launch rapidfire processes diff --git a/fireworks/utilities/fw_utilities.py b/fireworks/utilities/fw_utilities.py index 5456811b2..f7387e277 100644 --- a/fireworks/utilities/fw_utilities.py +++ b/fireworks/utilities/fw_utilities.py @@ -198,15 +198,17 @@ class DataServer(BaseManager): """ @classmethod - def setup(cls, launchpad): + def setup(cls, launchpad, multistore): """ Args: launchpad (LaunchPad) + multistore (MultiStore) Returns: DataServer """ DataServer.register("LaunchPad", callable=lambda: launchpad) + DataServer.register("MultiStore", callable=lambda: multistore) m = DataServer(address=("127.0.0.1", 0), authkey=DS_PASSWORD) # random port m.start() return m From 4ee626c95057f5ddafca4661c694fb0d7f9042cd Mon Sep 17 00:00:00 2001 From: Eric Sivonxay Date: Thu, 18 May 2023 13:45:13 -0700 Subject: [PATCH 2/6] Remove trailing space --- fireworks/features/multi_launcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fireworks/features/multi_launcher.py b/fireworks/features/multi_launcher.py index ff19fcdcf..65c34fedb 100644 --- a/fireworks/features/multi_launcher.py +++ b/fireworks/features/multi_launcher.py @@ -253,7 +253,7 @@ def launch_multiprocess( port = ds.address[1] # set an environment variable, so that jobs may look for this server - os.environ["FW_DATASERVER_PORT"] = str(port) + os.environ["FW_DATASERVER_PORT"] = str(port) manager = Manager() running_ids_dict = manager.dict() From 8db6f1f06326da4d4aec819f4ae74c3c476f7d21 Mon Sep 17 00:00:00 2001 From: Eric Sivonxay Date: Mon, 22 May 2023 11:31:42 -0700 Subject: [PATCH 3/6] Add maggma to the requirements --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 0aea8ed6d..36c547589 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,3 +8,4 @@ flask==1.1.1 flask-paginate==0.5.5 gunicorn==20.0.4 tqdm==4.41.0 +maggma>=0.51.0 From 2007cb90f39b00dbe56424664f1afae91e23a820 Mon Sep 17 00:00:00 2001 From: Eric Sivonxay Date: Mon, 22 May 2023 11:39:02 -0700 Subject: [PATCH 4/6] Bump version of python-dateutils from 2.8.1 to 2.8.2 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 36c547589..687136541 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ ruamel.yaml==0.16.5 pymongo==3.10.0 Jinja2 monty==3.0.2 -python-dateutil==2.8.1 +python-dateutil==2.8.2 tabulate==0.8.6 flask==1.1.1 flask-paginate==0.5.5 From 60e6de945f30fa0d51e9d53a6cce117ab2233a33 Mon Sep 17 00:00:00 2001 From: Eric Sivonxay Date: Mon, 22 May 2023 11:56:37 -0700 Subject: [PATCH 5/6] Bump version of 3 other dependencies --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 687136541..5742b38d8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,11 +1,11 @@ ruamel.yaml==0.16.5 -pymongo==3.10.0 +pymongo==4.2.0 Jinja2 -monty==3.0.2 +monty==2022.04.26 python-dateutil==2.8.2 tabulate==0.8.6 flask==1.1.1 flask-paginate==0.5.5 gunicorn==20.0.4 -tqdm==4.41.0 +tqdm==4.64.0 maggma>=0.51.0 From e4e296dbd6f6bc68ec02beeabb991a0dd6837784 Mon Sep 17 00:00:00 2001 From: Eric Sivonxay Date: Mon, 22 May 2023 16:00:10 -0700 Subject: [PATCH 6/6] Bump the maggma version from 0.51.0 to 0.51.1 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5742b38d8..8c65fb1a5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,4 +8,4 @@ flask==1.1.1 flask-paginate==0.5.5 gunicorn==20.0.4 tqdm==4.64.0 -maggma>=0.51.0 +maggma>=0.51.1