Skip to content

Commit

Permalink
removed some links to data, added slurm script examples and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoppe committed Aug 29, 2024
1 parent 97de398 commit fef1477
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
8 changes: 2 additions & 6 deletions tutorials/hpc/05_your_turn/now_its_your_turn.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@


# "Asteroids": Asteroids of the Solar System
# Use
# ```
# wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1E6mrMi7lL-UoHmZMTicVi0I2IdOKNn2-' -O ~/sbdb_asteroids.h5
# ```
# to download an example data set (92MB) consisting of the asteroids from the JPL Small Body Database (https://ssd.jpl.nasa.gov/tools/sbdb_lookup.html#/)
# Download the data set of the asteroids from the JPL Small Body Database from https://ssd.jpl.nasa.gov/tools/sbdb_lookup.html#/
# and load the resulting csv file to Heat.

X = ht.load_hdf5("~/sbdb_asteroids.h5", device="gpu", dataset="data", split=0)

# ... to be completed ...

Expand Down
12 changes: 12 additions & 0 deletions tutorials/hpc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
There are two example scripts in this directory, `slurm_script_cpu.sh` and `slurm_script_gpu.sh`, that demonstrate how to run a Heat application on an HPC-system with SLURM as resource manager.

1. `slurm_script_cpu.sh` is an example script that runs a Heat application on a CPU node. You must specify the name of the respective partition of your cluster. Moreover, the
numer of CPU cores available at a node of your system must be greater or equal to the product of the tasks-per-node- and the cpus-per-task-argument (=8x16=128 in the example).

2. `slurm_script_gpu.sh` is an example script that runs a Heat application on a GPU node. You must specify the name of the respective partition of your cluster. Moreover, the
numer of GPU devices available at a node of your system must be greater or equal to the number of GPUs requested in the script (=4 in the example).

## Remarks

* Please have a look into the documentation of your HPC-system for its detailed configuration and properties. Maybe, you have to adjust the script to your system.
* You need to load the required modules (e.g., for MPI, CUDA etc.) from the module system of your HPC-system before running the script. Moreover, you need to install Heat in a virtual environment (and activate it). Alternatively, you may use spack (if available on your system) for installing Heat and its dependencies.
12 changes: 12 additions & 0 deletions tutorials/hpc/slurm_script_cpu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

#SBATCH --partition=<partition_name>
#SBATCH --nodes=1
#SBATCH --tasks-per-node=8
#SBATCH --cpus-per-task=16
#SBATCH --time="00:01:00"

export MKL_NUM_THREADS=$SLURM_CPUS_PER_TASK
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK

srun python ~/heat/tutorials/hpc/01_basics/01_basics_dndarrays.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/bash

#SBATCH --partition=normal
#SBATCH --reservation=haicon
#SBATCH --partition=<partition_name>
#SBATCH --nodes=1
#SBATCH --tasks-per-node=4
#SBATCH --cpus-per-task=12
#SBATCH --cpus-per-task=2
#SBATCH --gres=gpu:4
#SBATCH --time="00:01:00"

Expand Down

0 comments on commit fef1477

Please sign in to comment.