or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Levaraging Dask in yt
Chris Havlin (U. Illinois DXL, chavlin@illinois.edu)
RHytHM Workshop, 2020-12-10
with: Matt Turk, Madicken Munk, Kacper Kowalik
What's to come:
yt chunking
when you do:
yt iterates through
chunks
, reads field into memory.chunk
= range of data potentially across datafiles.yt chunking
when you do:
yt will:
reduction
)yt in parallel with MPI
after setting up MPI (see the docs) when you do:
yt will:
chunks
between MPI processesyt in parallel with MPI
From Ryan Farber:
Dask?
Can dask simplify yt's chunking and parallel processing?
Dask?
"Dask is a flexible library for parallel computing in Python."
Dask?
Dask?
dask.delayed()
operator for parallel workflows:Dask!
Can dask simplify yt's chunking and parallel processing?
Yes
Devs: codebase simplification
Users: simpler parallel intallation, usage
A daskified particle reader
Not so risky "live" demo time!
a daskified Gadget reader with dask.delayed
A daskified particle reader
In
_read_particle_selection()
, the final bit reads the values into memory:but what if… we didnt?
an imagined future:
rather than returning an in-memory array, what if:
returned a dask array?
Dask handles the scheduling, reductions across chunks!
an imagined future:
From Ryan Farber:
an imagined future:
(pseudocode)
same syntax for parallel or serial!
… but units …
arrays from
_read_*_selection()
are converted tounyt_array
objects.dask-unyt arrays
Creating a custom Dask collection:
dask-unyt arrays
but we want all the array-reductions of
dask_array
:dask-unyt arrays
but we also want the unit management of
unyt_array
:dask-unyt arrays
Slightly riskier live demo time!
full notebook
dask & yt: next steps