You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is in a way a generalisation of the pandas `.apply` method.
68
+
69
+
70
+
### Working with an SQL backend
71
+
49
72
As it aims at working with time consuming functions, it also provides a checkpoint and resume mechanism using a SQL backend.
50
73
The SQL backend uses the [SQLAlchemy](https://docs.sqlalchemy.org) library, so it can work with a large variety of database types (like SQLite, PostgreSQL, MySQL, ...).
51
74
To activate this feature, just pass a [URL that can be processed by SQLAlchemy](https://docs.sqlalchemy.org/en/latest/core/engines.html?highlight=url#database-urls) to the ``db_url`` parameter of :func:`bluepyparallel.evaluator.evaluate`.
@@ -69,10 +92,11 @@ If the crash was due to an external cause (therefore executing the code again sh
69
92
computation from the last computed element. Thus, only the missing elements are computed, which can save a lot of time.
70
93
71
94
72
-
## Running using Dask
95
+
## Running with distributed Dask MPI on HPC systems
73
96
74
-
This is an example of a [sbatch](https://slurm.schedmd.com/sbatch.html) script that can be adapted to execute the script using multiple nodes and workers.
75
-
In this example, the code called by the ``<command>`` should parallelized using BluePyParallel.
97
+
This is an example of a [sbatch](https://slurm.schedmd.com/sbatch.html) script that can be
98
+
adapted to execute the script using multiple nodes and workers with distributed dask and MPI.
99
+
In this example, the code called by the ``run.py`` should be parallelized using BluePyParallel.
76
100
77
101
Dask variables are not strictly required, but highly recommended, and they can be fine tuned.
78
102
@@ -96,9 +120,24 @@ export DASK_DISTRIBUTED__WORKER__PROFILE__CYCLE=1000000ms # Time between starti
96
120
# Split tasks to avoid some dask errors (e.g. Event loop was unresponsive in Worker)
97
121
export PARALLEL_BATCH_SIZE=1000
98
122
99
-
srun -v <command>
123
+
srun -v run.py
100
124
```
101
125
126
+
To ensure only the `evaluate` function is run with parallel dask, one has to initialise the parallel factory
127
+
before anything else is done in the code. For example, ``run.py`` could look like:
0 commit comments