In [1]:
from distributed import LocalCluster
from distributed import Client
from extremefill2D.fextreme import init_sim, restart_sim, iterate_sim, multi_init_sim
from extremefill2D.fextreme.plot import vega_plot_treants, vega_plot_treant
import vega
from extremefill2D.fextreme.tools import get_by_uuid, outer_dict, pmap
from toolz.curried import map, pipe, curry
import itertools
%reload_ext yamlmagic
In [6]:
cluster = LocalCluster(nanny=True, n_workers=8, threads_per_worker=1)
client = Client(cluster)
client
Out[6]:
In [7]:
1. / 0.065
Out[7]:
In [5]:
client.shutdown()
In [10]:
treants = multi_init_sim('../../scripts/params.json',
'../../data',
pmap(client),
dict(appliedPotential=[-0.45],
bulkSuppressor=[0.06],
kPlus=[546.0],
kMinus=[3.79e7],
rBoundary=[28e-6]),
tags=['prelim3a'])
In [11]:
print(treants)
In [12]:
treant_and_errors = pmap(client)(iterate_sim(iterations=30, steps=100), treants)
In [ ]: