Skip to content

Commit

Permalink
PENG-2382 Create example benchmarking job-scripts for intel using HPL…
Browse files Browse the repository at this point in the history
… and HPCG
  • Loading branch information
jonathanlmd committed Nov 22, 2024
1 parent 40dc297 commit d294b7d
Show file tree
Hide file tree
Showing 10 changed files with 184 additions and 0 deletions.
32 changes: 32 additions & 0 deletions hpcg-benchmark-intel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM ubuntu:22.04

RUN apt-get update
RUN apt-get install -y --no-install-recommends \
build-essential \
libopenmpi-dev \
openmpi-bin \
gfortran

RUN apt-get wget cmake ca-certificates

RUN apt-get clean && rm -rf /var/lib/apt/lists/*

WORKDIR /opt/hpcg

RUN wget https://www.hpcg-benchmark.org/downloads/hpcg-3.1.tar.gz && \
tar -xvzf hpcg-3.1.tar.gz && \
rm hpcg-3.1.tar.gz && \
mv hpcg-3.1 /opt/hpcg

WORKDIR /opt/hpcg

RUN mkdir build && cd build && \
cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx .. && \
make

RUN ln -s /opt/hpcg/build/bin/xhpcg /usr/local/bin/xhpcg

WORKDIR /opt/hpcg

CMD ["bash"]

3 changes: 3 additions & 0 deletions hpcg-benchmark-intel/HPCG.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
104 104 104
1800
VantageCluster
23 changes: 23 additions & 0 deletions hpcg-benchmark-intel/job-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
#SBATCH -J HPCG_intel
#SBATCH --ntasks=8
#SBATCH --output=/nfs/mnt/hpcg_intel/R-%x.%j.out
#SBATCH --error=/nfs/mnt/hpcg_intel/R-%x.%j.err
#SBATCH -t 1:00:00

WORK_DIR=/nfs/mnt/hpcg_intel/$SLURM_JOB_NAME-Job-$SLURM_JOB_ID
mkdir -p $WORK_DIR
cd $WORK_DIR

export APPTAINER_IMAGE=/nfs/mnt/hpcg_intel.sif

# download the singularity image if it is not available yet
if [[ ! -f $APPTAINER_IMAGE ]]
then
echo "Pulling the singularity image"
apptainer pull $APPTAINER_IMAGE oras://public.ecr.aws/omnivector-solutions/hpcg_intel:latest
else
echo "Skipping the image fetch process...we already have the singularity image"
fi

mpirun --np 8 apptainer exec --bind ./HPCG.dat:/opt/hpcg/HPCG.dat $APPTAINER_IMAGE /opt/hpcg/build/bin/xhpl
7 changes: 7 additions & 0 deletions hpcg-benchmark-intel/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
summary: Benchmark using HPCG
icon-url: https://www.hpcg-benchmark.org/images/header.gif
entrypoint: job-script.sh
image-source: Dockerfile
image-tags:
- "1.0.0"
- "latest"
23 changes: 23 additions & 0 deletions hpl-benchmark-intel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ubuntu:22.04

RUN apt-get update
RUN apt-get install -y --no-install-recommends build-essential libatlas-base-dev libmpich-dev gfortran wget
RUN apt-get install -y ca-certificates

RUN wget https://netlib.org/benchmark/hpl/hpl-2.3.tar.gz && \
tar -xvzf hpl-2.3.tar.gz && \
rm hpl-2.3.tar.gz && \
mv hpl-2.3 /opt/hpl

RUN ln -s /opt/hpl/include /usr/local/include/hpl

WORKDIR /opt/hpl/

COPY Make.Linux .

#RUN make clean arch=Linux
RUN make arch=Linux

WORKDIR /opt/hpl/bin/Linux/

CMD ["bash"]
31 changes: 31 additions & 0 deletions hpl-benchmark-intel/HPL.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
HPLinpack benchmark input file
Innovative Computing Laboratory, University of Tennessee
HPL.out output file name (if any)
6 device out (6=stdout, 0=file)
1 # of problems sizes (N)
2040 Ns (size of the matrix)
1 # of NBs (block size)
128 NBs
0 PMAP process mapping (0=Row-major, 1=Column-major)
1 # of process grids (P x Q)
1 Ps
1 Qs
16.0 threshold
1 # of panel fact
2 PFACTs (0=left, 1=Crout, 2=Right)
1 # of recursive stopping criterium
4 NBMINs (minimum block size)
1 # of panels in recursion
2 NDIVs
1 # of recursive panel fact.
1 RFACTs (0=left, 1=Crout, 2=Right)
1 # of broadcast
1 BCASTs (0=1rg, 1=1rM, 2=2rg, 3=2rM, 4=Lng, 5=LnM)
1 # of lookahead depth
1 DEPTHs
2 SWAP (0=bin-exch, 1=long, 2=mix)
64 swapping threshold
0 L1 in (0=transposed, 1=no-transposed) form
0 U in (0=transposed, 1=no-transposed) form
1 Equilibration (0=no, 1=yes)
8 memory alignment in double (> 0)
35 changes: 35 additions & 0 deletions hpl-benchmark-intel/Make.Linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Arquivo de configuração para Linux com OpenBLAS
SHELL = /bin/sh
CD = cd
CP = cp
LN_S = ln -s
MKDIR = mkdir
RM = /bin/rm -f
TOUCH = touch

ARCH = Linux
TOPdir = /opt/hpl
INCdir = $(TOPdir)/include
BINdir = $(TOPdir)/bin/$(ARCH)
LIBdir = $(TOPdir)/lib/$(ARCH)
INC = -I/opt/hpl/include

HPLlib = $(LIBdir)/libhpl.a

# Compilador
CC = mpicc
CCNOOPT = $(HPL_DEFS)
CCFLAGS = $(HPL_DEFS) -fomit-frame-pointer -O3 -funroll-loops -W -Wall -Wno-unused -I$(INCdir) -I/usr/include

# Linkagem
LINKER = mpif90
LINKFLAGS = $(CCFLAGS)

# Bibliotecas BLAS
LAlib = -lopenblas

# Bibliotecas adicionais
ARCHIVER = ar
ARFLAGS = r
RANLIB = ranlib

Empty file added hpl-benchmark-intel/README.md
Empty file.
23 changes: 23 additions & 0 deletions hpl-benchmark-intel/job-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
#SBATCH -J HPL_intel
#SBATCH --ntasks=8
#SBATCH --output=/nfs/mnt/hpl_intel/R-%x.%j.out
#SBATCH --error=/nfs/mnt/hpl_intel/R-%x.%j.err
#SBATCH -t 1:00:00

WORK_DIR=/nfs/mnt/hpl_intel/$SLURM_JOB_NAME-Job-$SLURM_JOB_ID
mkdir -p $WORK_DIR
cd $WORK_DIR

export APPTAINER_IMAGE=/nfs/mnt/hpl_intel.sif

# download the singularity image if it is not available yet
if [[ ! -f $APPTAINER_IMAGE ]]
then
echo "Pulling the singularity image"
apptainer pull $APPTAINER_IMAGE oras://public.ecr.aws/omnivector-solutions/hpl_intel:latest
else
echo "Skipping the image fetch process...we already have the singularity image"
fi

mpirun --np 8 apptainer exec --bind ./HPL.dat:/opt/hpl/bin/Linux/HPL.dat $APPTAINER_IMAGE /opt/hpl/bin/Linux/xhpl
7 changes: 7 additions & 0 deletions hpl-benchmark-intel/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
summary: Benchmark using HPL
icon-url: https://netlib.org/benchmark/hpl/2-273x48.jpg
entrypoint: job-script.sh
image-source: Dockerfile
image-tags:
- "1.0.0"
- "latest"

0 comments on commit d294b7d

Please sign in to comment.