Skip to content
Snippets Groups Projects
Commit 1ce7ce10 authored by Mathieu Peybernes's avatar Mathieu Peybernes
Browse files

Add openmp

parent d0508c8e
No related branches found
No related tags found
No related merge requests found
\renewcommand{\FIGREP}{src/mpi/figures} \renewcommand{\FIGREP}{src/mpi/figures}
\section{Compilation with MPI} \section{Compilation with MPI and OpenMP}
\label{sec:mpi} \label{sec:mpi}
\intersec{deneb} \intersec{deneb}
...@@ -199,6 +199,44 @@ ...@@ -199,6 +199,44 @@
\end{itemize} \end{itemize}
\end{frame} \end{frame}
\subsection{Compiling an OpenMP program}
\label{sec:ompCompilation}
\begin{frame}
\frametitle{Compiling an OpenMP program}
\framesubtitle{}
\begin{itemize}
\item OpenMP support comes from the standard compiler
\item Syntax is compiler dependent
\begin{itemize}
\item \cmd{gcc -fopenmp mycode.c}
\item \cmd{icc -qopenmp mycode.c}
\item \cmd{gfortran -fopenmp mycode.f95}
\item \cmd{ifort -qopenmp mycode.f95}
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[t,fragile]
\frametitle{Compiling an OpenMP program}
\framesubtitle{}
\begin{itemize}
\item Example of slurm script to launch hybrid MPI+OpenMP code
\begin{bashcode}
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=6
#SBATCH --cpus-per-task=4
#SBATCH --mem=100G
module purge
module load intel intel-mpi
export OMP_NUM_THREADS=\$SLURM_CPUS_PER_TASK
srun my_hybrid_code.x --in=myinput.dat
\end{bashcode}
\end{itemize}
\end{frame}
%%% Local Variables: %%% Local Variables:
%%% mode: latex %%% mode: latex
%%% TeX-master: "../../SCM_slides" %%% TeX-master: "../../SCM_slides"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment