Skip to content

Commit

Permalink
deploy: 7eb2f2d
Browse files Browse the repository at this point in the history
  • Loading branch information
bast committed Oct 11, 2024
0 parents commit 115fa5a
Show file tree
Hide file tree
Showing 251 changed files with 60,245 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: e4dd0cebedc9134d87f3c4373472ea75
tags: d77d1c0d9ca2f4c8421862c7c5a0d620
Empty file added .nojekyll
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bootstrap: docker
From: pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime

%post

pip install accelerate evaluate datasets scipy scikit-learn transformers
70 changes: 70 additions & 0 deletions _downloads/69e350fcc7a533a6096e256764f8d27b/puhti-openmpi.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
Bootstrap: docker
From: rockylinux:{{ OS_VERSION }}

%arguments

NPROCS=4
OPENMPI_VERSION=4.1.4rc1
OSU_MICRO_BENCHMARKS_VERSION=7.4
GCC_VERSION=9
UCX_VERSION=1.13.0
OS_NAME=rhel
OS_VERSION=8.6
OFED_VERSION=5.6-2.0.9.0

%post

### Install OpenMPI dependencies

# Base tools and newer gcc version

dnf install -y dnf-plugins-core epel-release
dnf config-manager --set-enabled powertools
dnf install -y make gdb wget numactl-devel which
dnf -y install gcc-toolset-{{ GCC_VERSION }}
source /opt/rh/gcc-toolset-{{ GCC_VERSION }}/enable

# Enable Mellanox OFED rpm repo

wget https://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox
rpm --import RPM-GPG-KEY-Mellanox
rm RPM-GPG-KEY-Mellanox
cd /etc/yum.repos.d/
wget https://linux.mellanox.com/public/repo/mlnx_ofed/{{ OFED_VERSION }}/{{ OS_NAME }}{{ OS_VERSION }}/mellanox_mlnx_ofed.repo
cd /

# Install network library components

dnf -y install rdma-core ucx-ib-{{ UCX_VERSION }} ucx-devel-{{ UCX_VERSION }} ucx-knem-{{ UCX_VERSION }} ucx-cma-{{ UCX_VERSION }} ucx-rdmacm-{{ UCX_VERSION }}

### Install OpenMPI

dnf -y install openmpi-{{ OPENMPI_VERSION }}

### Build example application

export OMPI_DIR=/usr/mpi/gcc/openmpi-{{ OPENMPI_VERSION }}
export PATH="$OMPI_DIR/bin:$PATH"
export LD_LIBRARY_PATH="$OMPI_DIR/lib:$LD_LIBRARY_PATH"

# Build osu benchmarks
cd /opt
wget -q http://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }}.tar.gz
tar xf osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }}.tar.gz
cd osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }}
./configure --prefix=/opt/osu-micro-benchmarks CC=mpicc CFLAGS=-O3
make -j{{ NPROCS }}
make install
cd ..
rm -rf osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }} osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }}.tar.gz

%environment
export OMPI_DIR=/usr/mpi/gcc/openmpi-{{ OPENMPI_VERSION }}
export PATH="$OMPI_DIR/bin:$PATH"
export LD_LIBRARY_PATH="$OMPI_DIR/lib:$LD_LIBRARY_PATH"
export MANPATH="$OMPI_DIR/share/man:$MANPATH"

%runscript
source /opt/rh/gcc-toolset-{{ GCC_VERSION }}/enable
/opt/osu-micro-benchmarks/libexec/osu-micro-benchmarks/mpi/pt2pt/osu_bw

17 changes: 17 additions & 0 deletions _downloads/89af20c2d98096490dcc145892ed280d/run_lammps_indent.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
#SBATCH --time=00:10:00
#SBATCH --mem=2G
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --output=lammps_indent.out

# Copy example from image
apptainer exec lammps-openmpi.sif cp -r /opt/lammps/examples/indent .

cd indent

# Load OpenMPI module
module load openmpi

# Run simulation
srun apptainer run ../lammps-openmpi.sif -in in.indent
68 changes: 68 additions & 0 deletions _downloads/b2789bd6fc9a1e97d79c827edc887d37/lammps-openmpi.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
Bootstrap: docker
From: ubuntu:latest

%arguments

NPROCS=4
OPENMPI_VERSION=4.1.6
LAMMPS_VERSION=29Aug2024

%post

### Install OpenMPI dependencies

apt-get update
apt-get install -y wget bash gcc gfortran g++ make file bzip2 ca-certificates libucx-dev

### Build OpenMPI

OPENMPI_VERSION_SHORT=$(echo {{ OPENMPI_VERSION }} | cut -f 1-2 -d '.')
cd /opt
mkdir ompi
wget -q https://download.open-mpi.org/release/open-mpi/v${OPENMPI_VERSION_SHORT}/openmpi-{{ OPENMPI_VERSION }}.tar.bz2
tar -xvf openmpi-{{ OPENMPI_VERSION }}.tar.bz2
# Compile and install
cd openmpi-{{ OPENMPI_VERSION }}
./configure --prefix=/opt/ompi --with-ucx=/usr
make -j{{ NPROCS }}
make install
cd ..
rm -rf openmpi-{{ OPENMPI_VERSION }} openmpi-{{ OPENMPI_VERSION }}.tar.bz2

### Build example application

# Install LAMMPS dependencies
apt-get install -y cmake

export OMPI_DIR=/opt/ompi
export PATH="$OMPI_DIR/bin:$PATH"
export LD_LIBRARY_PATH="$OMPI_DIR/lib:$LD_LIBRARY_PATH"
export CMAKE_PREFIX_PATH="$OMPI_DIR:$CMAKE_PREFIX_PATH"

# Build LAMMPS
cd /opt
wget -q https://download.lammps.org/tars/lammps-{{ LAMMPS_VERSION }}.tar.gz
tar xf lammps-{{ LAMMPS_VERSION }}.tar.gz
cd lammps-{{ LAMMPS_VERSION }}
cmake -S cmake -B build \
-DCMAKE_INSTALL_PREFIX=/opt/lammps \
-DBUILD_MPI=yes \
-DBUILD_OMP=yes
cmake --build build --parallel {{ NPROCS }} --target install
cp -r examples /opt/lammps/examples
cd ..
rm -rf lammps-{{ LAMMPS_VERSION }} lammps-{{ LAMMPS_VERSION }}.tar.gz

%environment
export OMPI_DIR=/opt/ompi
export PATH="$OMPI_DIR/bin:$PATH"
export LD_LIBRARY_PATH="$OMPI_DIR/lib:$LD_LIBRARY_PATH"
export MANPATH="$OMPI_DIR/share/man:$MANPATH"

export LAMMPS_DIR=/opt/lammps
export PATH="$LAMMPS_DIR/bin:$PATH"
export LD_LIBRARY_PATH="$LAMMPS_DIR/lib:$LD_LIBRARY_PATH"
export MANPATH="$LAMMPS_DIR/share/man:$MANPATH"

%runscript
exec /opt/lammps/bin/lmp "$@"
39 changes: 39 additions & 0 deletions _downloads/c7c7f903ce66845641c48c1015bb49c9/lumi-mpich.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
bootstrap: docker
from: ubuntu:latest

%arguments

NPROCS=4
MPICH_VERSION=3.1.4
OSU_MICRO_BENCHMARKS_VERSION=7.4

%post

### Install MPICH dependencies

apt-get update
apt-get install -y file g++ gcc gfortran make gdb strace wget ca-certificates --no-install-recommends

# Build MPICH

wget -q http://www.mpich.org/static/downloads/{{ MPICH_VERSION }}/mpich-{{ MPICH_VERSION }}.tar.gz
tar xf mpich-{{ MPICH_VERSION }}.tar.gz
cd mpich-{{ MPICH_VERSION }}
./configure --disable-fortran --enable-fast=all,O3 --prefix=/usr
make -j{{ NPROCS }}
make install
ldconfig

# Build osu benchmarks
cd /opt
wget -q http://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }}.tar.gz
tar xf osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }}.tar.gz
cd osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }}
./configure --prefix=/opt/osu-micro-benchmarks CC=mpicc CFLAGS=-O3
make -j{{ NPROCS }}
make install
cd ..
rm -rf osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }} osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }}.tar.gz

%runscript
/opt/osu-micro-benchmarks/libexec/osu-micro-benchmarks/mpi/pt2pt/osu_bw
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
#SBATCH --mem=32G
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --gpus-per-task=2
#SBATCH --cpus-per-task=12
#SBATCH --time=00:10:00
#SBATCH --output=accelerate_run_parallel.out

export OMP_NUM_THREADS=$(( $SLURM_CPUS_PER_TASK / $SLURM_GPUS_ON_NODE ))

apptainer exec --nv accelerate_cuda.sif \
torchrun \
--nproc_per_node $SLURM_GPUS_ON_NODE \
./nlp_example.py \
--mixed_precision fp16
56 changes: 56 additions & 0 deletions _downloads/ff3d6a2935fcb472627a13145369a68b/triton-openmpi.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Bootstrap: docker
From: ubuntu:latest

%arguments

NPROCS=4
OPENMPI_VERSION=4.1.6
OSU_MICRO_BENCHMARKS_VERSION=7.4

%post

### Install OpenMPI dependencies

apt-get update
apt-get install -y wget bash gcc gfortran g++ make file bzip2 ca-certificates libucx-dev

### Build OpenMPI

OPENMPI_VERSION_SHORT=$(echo {{ OPENMPI_VERSION }} | cut -f 1-2 -d '.')
cd /opt
mkdir ompi
wget -q https://download.open-mpi.org/release/open-mpi/v${OPENMPI_VERSION_SHORT}/openmpi-{{ OPENMPI_VERSION }}.tar.bz2
tar -xvf openmpi-{{ OPENMPI_VERSION }}.tar.bz2
# Compile and install
cd openmpi-{{ OPENMPI_VERSION }}
./configure --prefix=/opt/ompi --with-ucx=/usr
make -j{{ NPROCS }}
make install
cd ..
rm -rf openmpi-{{ OPENMPI_VERSION }} openmpi-{{ OPENMPI_VERSION }}.tar.bz2

### Build example application

export OMPI_DIR=/opt/ompi
export PATH="$OMPI_DIR/bin:$PATH"
export LD_LIBRARY_PATH="$OMPI_DIR/lib:$LD_LIBRARY_PATH"

# Build osu benchmarks
cd /opt
wget -q http://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }}.tar.gz
tar xf osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }}.tar.gz
cd osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }}
./configure --prefix=/opt/osu-micro-benchmarks CC=/opt/ompi/bin/mpicc CFLAGS=-O3
make -j{{ NPROCS }}
make install
cd ..
rm -rf osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }} osu-micro-benchmarks-{{ OSU_MICRO_BENCHMARKS_VERSION }}.tar.gz

%environment
export OMPI_DIR=/opt/ompi
export PATH="$OMPI_DIR/bin:$PATH"
export LD_LIBRARY_PATH="$OMPI_DIR/lib:$LD_LIBRARY_PATH"
export MANPATH="$OMPI_DIR/share/man:$MANPATH"

%runscript
/opt/osu-micro-benchmarks/libexec/osu-micro-benchmarks/mpi/pt2pt/osu_bw
Binary file added _images/app_run_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/apptainer_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/bind_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/build_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/containerized_application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/default_mounts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/dockerfile_python_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/dockerhub_python.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/exec_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/image_explanation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/image_explanation_apptainer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/instance_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/mpi_install_structure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/mpi_job_structure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/mpi_job_structure_bound.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/mpi_job_structure_hybrid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/normal_application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/nv_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/pull_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/rocm_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/run_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/shell_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 115fa5a

Please sign in to comment.