Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Compiling code and using MPI - lecture
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SCITAS
Courses
Compiling code and using MPI
Compiling code and using MPI - lecture
Commits
1ce7ce10
Commit
1ce7ce10
authored
3 years ago
by
Mathieu Peybernes
Browse files
Options
Downloads
Patches
Plain Diff
Add openmp
parent
d0508c8e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mpi/mpi.tex
+39
-1
39 additions, 1 deletion
src/mpi/mpi.tex
with
39 additions
and
1 deletion
src/mpi/mpi.tex
+
39
−
1
View file @
1ce7ce10
\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"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment