Skip to content

Commit 3cbd96f

Browse files
authored
Add integration tests for application notebooks (#619)
* Add integration tests for application notebooks * remove pmix * remove constraints * fix notebook names * increase time out * remove ASE command * Disable qe cluster test * fix pseudo potential directory * relative to working directory * try absolute path * Update pipeline.yml * Test new debugging capability * use flux run to call pw.x * try p2.x with mpi * mpi takes too long * enable 3rd test * always nest flux * no more nesting * no more nesting * merge notebooks * fix pseudo potential directory * add quantum espresso * Short introduction * Add some more documentation * Finish up documentation
1 parent c4ce1e1 commit 3cbd96f

File tree

8 files changed

+19660
-0
lines changed

8 files changed

+19660
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
channels:
2+
- conda-forge
3+
dependencies:
4+
- jupyter
5+
- papermill
6+
- numpy
7+
- openmpi
8+
- cloudpickle =3.1.1
9+
- mpi4py
10+
- pyzmq =26.3.0
11+
- flux-core =0.59.0
12+
- versioneer =0.28
13+
- h5py
14+
- matplotlib =3.10.0
15+
- networkx =3.4.2
16+
- pygraphviz =1.14
17+
- pysqa =0.2.4
18+
- ipython =9.0.2
19+
- atomistics =0.2.4
20+
- qe =7.2
21+
- gpaw =24.6.0

.github/workflows/pipeline.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,33 @@ jobs:
173173
flux start papermill notebooks/3-hpc-job.ipynb notebooks/3-hpc-job-out.ipynb -k python3
174174
papermill notebooks/4-developer.ipynb notebooks/4-developer-out.ipynb -k python3
175175
176+
notebooks_integration:
177+
needs: [black]
178+
runs-on: ubuntu-latest
179+
steps:
180+
- uses: actions/checkout@v4
181+
- name: Merge Notebook environment
182+
run: |
183+
echo -e "channels:\n - conda-forge\n" > .condarc
184+
- name: Setup Mambaforge
185+
uses: conda-incubator/setup-miniconda@v3
186+
with:
187+
python-version: "3.12"
188+
miniforge-version: latest
189+
condarc-file: .condarc
190+
environment-file: .ci_support/environment-integration.yml
191+
- name: Install
192+
shell: bash -l {0}
193+
run: |
194+
pip install versioneer[toml]==0.29
195+
pip install . --no-deps --no-build-isolation
196+
- name: Notebooks
197+
shell: bash -l {0}
198+
timeout-minutes: 20
199+
run: |
200+
flux start papermill notebooks/5-1-gpaw.ipynb notebooks/5-1-gpaw-out.ipynb -k python3
201+
flux start papermill notebooks/5-2-quantum-espresso.ipynb notebooks/5-2-quantum-espresso-out.ipynb -k python3
202+
176203
unittest_flux_mpich:
177204
needs: [black]
178205
runs-on: ubuntu-latest

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ as hierarchical job scheduler within the allocations.
139139
* [SLURM](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html#slurm)
140140
* [SLURM with Flux](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html#slurm-with-flux)
141141
* [Flux](https://executorlib.readthedocs.io/en/latest/3-hpc-job.html#flux)
142+
* [Application](https://executorlib.readthedocs.io/en/latest/application.html)
143+
* [GPAW](https://executorlib.readthedocs.io/en/latest/5-1-gpaw.html)
144+
* [Quantum Espresso](https://executorlib.readthedocs.io/en/latest/5-2-quantum-espresso.html)
142145
* [Trouble Shooting](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html)
143146
* [Filesystem Usage](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html#filesystem-usage)
144147
* [Firewall Issues](https://executorlib.readthedocs.io/en/latest/trouble_shooting.html#firewall-issues)

docs/_toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ chapters:
55
- file: 1-single-node.ipynb
66
- file: 2-hpc-cluster.ipynb
77
- file: 3-hpc-job.ipynb
8+
- file: application.md
9+
sections:
10+
- file: 5-1-gpaw.ipynb
11+
- file: 5-2-quantum-espresso.ipynb
812
- file: trouble_shooting.md
913
- file: 4-developer.ipynb
1014
- file: api.rst

docs/application.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Application
2+
While `executorlib` is designed to up-scale any Python function for high performance computing (HPC), it was initially
3+
developed to accelerate atomistic computational materials science simulation. To demonstrate the usage of `executorlib`
4+
in the context of atomistic simulation, it is combined with [atomistics](https://atomistics.readthedocs.io/) and the
5+
[atomic simulation environment (ASE)](https://wiki.fysik.dtu.dk/ase/) to calculate the bulk modulus with two density
6+
functional theory simulation codes [gpaw](https://gpaw.readthedocs.io/index.html) and [quantum espresso](https://www.quantum-espresso.org).
7+
The bulk modulus is calculated by uniformly deforming a supercell of atoms and measuring the change in total energy
8+
during compression and elongation. The first derivative of this curve is the pressure and the second derivative is
9+
proportional to the bulk modulus. Other material properties like the heat capacity, thermal expansion or thermal conductivity
10+
can be calculated in similar ways following the [atomistics](https://atomistics.readthedocs.io/) documentation.

notebooks/5-1-gpaw.ipynb

Lines changed: 532 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)