Skip to content

Commit

Permalink
Merge pull request #24 from DifferentiableUniverseInitiative/EiffL/jo…
Browse files Browse the repository at this point in the history
…ss-paper

Proposal for simplified demo
  • Loading branch information
ASKabalan authored Jul 9, 2024
2 parents 11b1781 + 699fdb8 commit dbac275
Show file tree
Hide file tree
Showing 9 changed files with 483 additions and 999 deletions.
7 changes: 0 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,3 @@ repos:
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.4
hooks:
- id: clang-format
files: '\.(c|cc|cpp|h|hpp|cxx|hh|cu|cuh)$'
exclude: '^third_party/|/pybind11/'
name: clang-format
23 changes: 23 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Use-Case Examples

This directory contains examples of how to use the jaxDecomp library on a few use cases.

## Distributed LPT Cosmological Simulation

This example demonstrates the use of the 3D distributed FFT and halo exchange functions in the `jaxDecomp` library to implement a distributed LPT cosmological simulation. We provide a notebook to visualize the results of the simulation in [visualizer.ipynb](visualizer.ipynb).

To run the demo, some additional dependencies are required. You can install them by running:

```bash
pip install jax-cosmo
```

Then, you can run the example by executing the following command:
```bash
mpirun -n 4 python lpt_nbody_demo.py --nc 256 --box_size 256 --pdims 4x4 --halo_size 32 --output out
```

We also include an example of a slurm script in [submit_rusty.sbatch](submit_rusty.sbatch) that can be used to run the example on a slurm cluster with:
```bash
sbatch submit_rusty.sbatch
```
Loading

0 comments on commit dbac275

Please sign in to comment.