Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
printabletrue

...

Download source code

Code Block
languagebash
git clone https://github.com/mrnorman/miniWeather.git
cp -r miniWeather/c collision
cd collision

...

CPU jobs

  1. Load modules

    Code Block
    languagebash
    module purge
    module load cpeCray/23.03
    module load cray-parallel-netcdf/1.12

...

  1. .3

...

  1. .3

...

  1. Configure

    Code Block
    languagebash
    export CXX="CC -craype-verbose"

...

  1. 
    

...

  1. cmake . -DOPENMP_FLAGS="-fopenmp" 

...

  1. \
            -DNX=2000 -DNZ=1000 -DSIM_TIME=1000 -DOUT_FREQ=50 -DDATA_SPEC=DATA_SPEC_COLLISION
  2. Make

    Code Block
    languagebash
    make
  3. Job script

Compute partition

  1. Code Block
    languagebash
    #!/bin/bash
    #SBATCH -p compute             # Partition
    #SBATCH -N 1                   # Number of nodes
    #SBATCH --ntasks-per-node=16   # Number of MPI processes per node
    #SBATCH --cpus-per-task=8      # Number of OpenMP threads per MPI process
    #SBATCH -t 

...

  1. 02:00:00          # Job runtime limit
    #SBATCH -A ltXXXXXX            # Billing account  *** USER EDIT ***
    #SBATCH -J MiniWeather         # Job name
    
    module purge
    module load cpeCray/23.03
    module load cray-parallel-netcdf/1.12.3.3
    

...

  1. 
    

...

  1. export PATH=/--path-to-collision-dir--:${PATH}     # *** USER EDIT ***
    export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}  
    
    srun --cpus-per-task=${SLURM_CPUS_PER_TASK} openmp

...

GPU

...

jobs

  1. Load modules

    Code Block
    languagebash
    module purge
    module load cpeCray/23.03
    module load cray-parallel-netcdf/1.12.3.3
    module load cudatoolkit/23.3_11.8
    module load craype-accel-nvidia80
  2. Configure

    Code Block
    languagebash
    export CXX="CC -craype-verbose"
    export LDFLAGS="-lcudart"
    cmake . -DOPENMP_FLAGS="-fopenmp" -DOPENMP45_FLAGS="-fopenmp" \
            -DNX=2000 -DNZ=1000 -DSIM_TIME=1000 -DOUT_FREQ=50 -DDATA_SPEC=DATA_SPEC_COLLISION
  3. Make

    Code Block
    languagebash
    make
  4. Job script

    Code Block
    languagebash
    #!/bin/bash
    #SBATCH -p gpu                 # Partition
    #SBATCH -N 1                   # Number of nodes
    #SBATCH --gpus-per-node=1      # Number of GPU card per node
    #SBATCH --ntasks-per-node=1    # Number of MPI processes per node
    #SBATCH --cpus-per-task=16     # Number of OpenMP threads per MPI process
    #SBATCH -t 

...

  1. 02:00:00          # Job runtime limit
    #SBATCH -A ltXXXXXX            # Billing account  *** USER EDIT ***
    #SBATCH -J MiniWeather         # Job name
    
    module purge
    module load cpeCray/23.03
    module load cray-parallel-netcdf/1.12.3.3
    module load cudatoolkit/23.3_11.8
    module load craype-accel-nvidia80
    
    export PATH=/--path-to-collision-dir--:${PATH}     # *** USER EDIT ***
    export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}  
    
    srun --cpus-per-task=${SLURM_CPUS_PER_TASK} 

...

  1. openmp45

...

(

...

Extra) Post-processing

Code Block
languagebash
module purge
module load Mamba/23.11.0-0

conda activate netcdf-py39
ncview ./output.nc
conda deactivate

...

To use ncview, users must login with

...

X11Forwarding enabled; echo ${DISPLAY} should not be empty.

...