Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions fireworks/features/multi_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion fireworks/utilities/fw_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
ruamel.yaml==0.16.5
pymongo==3.10.0
pymongo==4.2.0
Jinja2
monty==3.0.2
python-dateutil==2.8.1
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.1