This commit is contained in:
Anthony Scemama 2021-06-30 12:17:49 +02:00
parent f2f59cc736
commit 22a66f5d6b
14 changed files with 1193 additions and 351 deletions

BIN
Curve.pdf Normal file

Binary file not shown.

BIN
Qmc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
Water.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

BIN
beamerbackgroundtrex.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

25
beamercolorthemetrex.sty Normal file
View File

@ -0,0 +1,25 @@
\mode<presentation>
% Settings
\setbeamercolor*{title page header}{fg=red!80!black}
\setbeamercolor*{author}{fg=blue!50!cyan!80!black}
\setbeamercolor*{institute}{fg=blue!80!cyan!50!black}
\setbeamercolor*{date}{fg=blue!80!cyan!50!black}
\setbeamercolor*{item}{fg=blue!50!cyan!80!black}
\setbeamertemplate{items}[square]
\setbeamertemplate{sections/subsections in toc}[square]
\setbeamercolor{block title}{fg=white,bg=blue!50!cyan!80!black}
%\setbeamercolor{block body}{bg=block title.bg!30!bg}
% alertblock
\setbeamercolor{block title alerted}{fg=white,bg=red!80!black}
%\setbeamercolor{block body alerted}{bg=block title alerted.bg!10!bg}
% exampleblock
\setbeamercolor{block title example}{fg=white,bg=blue!50!cyan!80!black}
%\setbeamercolor{block body example}{bg=white}
\mode
<all>

313
beamerfontthemetrex.sty Normal file
View File

@ -0,0 +1,313 @@
%%
%% This is file `beamerfontthemetrex.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% beamerfontthemetrex.dtx (with options: `package')
%% ---------------------------------------------------------------------------
%% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of
%% contributors can be found at
%%
%% https://github.com/matze/mtheme/graphs/contributors
%%
%% and the original template was based on the HSRM theme by Benjamin Weiss.
%%
%% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
%% International License (https://creativecommons.org/licenses/by-sa/4.0/).
%% ---------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerfontthemetrex}[2017/01/23 trex font theme]
\RequirePackage{etoolbox}
\RequirePackage{ifxetex}
\RequirePackage{ifluatex}
\RequirePackage{pgfopts}
\ifboolexpr{bool {xetex} or bool {luatex}}{
\@ifpackageloaded{fontspec}{
\PassOptionsToPackage{no-math}{fontspec}
}{
\RequirePackage[no-math]{fontspec}
}
\newcounter{fontsnotfound}
\newcommand{\checkfont}[1]{%
\suppressfontnotfounderror=1%
\font\x = "#1" at 10pt
\selectfont
\ifx\x\nullfont%
\stepcounter{fontsnotfound}%
\fi%
\suppressfontnotfounderror=0%
}
\newcommand{\iffontsavailable}[3]{%
\setcounter{fontsnotfound}{0}%
\expandafter\forcsvlist\expandafter%
\checkfont\expandafter{#1}%
\ifnum\value{fontsnotfound}=0%
#2%
\else%
#3%
\fi%
}
\iffontsavailable{Fira Sans Light,%
Fira Sans Light Italic,%
Fira Sans,%
Fira Sans Italic}%
{%
\setsansfont[ItalicFont={Fira Sans Light Italic},%
BoldFont={Fira Sans},%
BoldItalicFont={Fira Sans Italic}]%
{Fira Sans Light}%
}{%
\iffontsavailable{Fira Sans Light OT,%
Fira Sans Light Italic OT,%
Fira Sans OT,%
Fira Sans Italic OT}%
{%
\setsansfont[ItalicFont={Fira Sans Light Italic OT},%
BoldFont={Fira Sans OT},%
BoldItalicFont={Fira Sans Italic OT}]%
{Fira Sans Light OT}%
}{%
\PackageWarning{beamerthemetrex}{%
Could not find Fira Sans fonts%
}
}
}
\iffontsavailable{Fira Mono, Fira Mono Bold}{%
\setmonofont[BoldFont={Fira Mono Medium}]{Fira Mono}%
}{%
\iffontsavailable{Fira Mono OT, Fira Mono Bold OT}{%
\setmonofont[BoldFont={Fira Mono Medium OT}]{Fira Mono OT}%
}{%
\PackageWarning{beamerthemetrex}{%
Could not find Fira Mono fonts%
}
}
}
\AtBeginEnvironment{tabular}{%
\addfontfeature{Numbers={Monospaced}}%
}
}{%
\PackageWarning{beamerthemetrex}{%
You need to compile with XeLaTeX or LuaLaTeX to use the Fira fonts%
}
}
\setbeamerfont{title}{size=\Large,%
series=\bfseries}
\setbeamerfont{author}{size=\small}
\setbeamerfont{date}{size=\small}
\setbeamerfont{section title}{size=\Large,%
series=\bfseries}
\setbeamerfont{block title}{size=\normalsize,%
series=\bfseries}
\setbeamerfont{block title alerted}{size=\normalsize,%
series=\bfseries}
\setbeamerfont*{subtitle}{size=\large}
\setbeamerfont{frametitle}{size=\large,%
series=\bfseries}
\setbeamerfont{caption}{size=\small}
\setbeamerfont{caption name}{series=\bfseries}
\setbeamerfont{description item}{series=\bfseries}
\setbeamerfont{page number in head/foot}{size=\scriptsize}
\setbeamerfont{bibliography entry author}{size=\normalsize,%
series=\normalfont}
\setbeamerfont{bibliography entry title}{size=\normalsize,%
series=\bfseries}
\setbeamerfont{bibliography entry location}{size=\normalsize,%
series=\normalfont}
\setbeamerfont{bibliography entry note}{size=\small,%
series=\normalfont}
\setbeamerfont{standout}{size=\Large,%
series=\bfseries}
\pgfkeys{
/trex/font/titleformat title/.cd,
.is choice,
regular/.code={%
\let\trex@titleformat\@empty%
\setbeamerfont{title}{shape=\normalfont}%
},
smallcaps/.code={%
\let\trex@titleformat\@empty%
\setbeamerfont{title}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\trex@titleformat\lowercase%
\setbeamerfont{title}{shape=\scshape}%
\PackageWarning{beamerthemetrex}{%
Be aware that titleformat title=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\trex@titleformat\uppercase%
\setbeamerfont{title}{shape=\normalfont}
\PackageWarning{beamerthemetrex}{%
Be aware that titleformat title=allcaps can lead to problems%
}
},
}
\pgfkeys{
/trex/font/titleformat subtitle/.cd,
.is choice,
regular/.code={%
\let\trex@subtitleformat\@empty%
\setbeamerfont{subtitle}{shape=\normalfont}%
},
smallcaps/.code={%
\let\trex@subtitleformat\@empty%
\setbeamerfont{subtitle}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\trex@subtitleformat\lowercase%
\setbeamerfont{subtitle}{shape=\scshape}%
\PackageWarning{beamerthemetrex}{%
Be aware that titleformat subtitle=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\trex@subtitleformat\uppercase%
\setbeamerfont{subtitle}{shape=\normalfont}%
\PackageWarning{beamerthemetrex}{%
Be aware that titleformat subtitle=allcaps can lead to problems%
}
},
}
\pgfkeys{
/trex/font/titleformat section/.cd,
.is choice,
regular/.code={%
\let\trex@sectiontitleformat\@empty%
\setbeamerfont{section title}{shape=\normalfont}%
},
smallcaps/.code={%
\let\trex@sectiontitleformat\@empty%
\setbeamerfont{section title}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\trex@sectiontitleformat\MakeLowercase%
\setbeamerfont{section title}{shape=\scshape}%
\PackageWarning{beamerthemetrex}{%
Be aware that titleformat section=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\trex@sectiontitleformat\MakeUppercase%
\setbeamerfont{section title}{shape=\normalfont}%
\PackageWarning{beamerthemetrex}{%
Be aware that titleformat section=allcaps can lead to problems%
}
},
}
\pgfkeys{
/trex/font/titleformat frame/.cd,
.is choice,
regular/.code={%
\let\trex@frametitleformat\@empty%
\setbeamerfont{frametitle}{shape=\normalfont}%
},
smallcaps/.code={%
\let\trex@frametitleformat\@empty%
\setbeamerfont{frametitle}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\trex@frametitleformat\MakeLowercase%
\setbeamerfont{frametitle}{shape=\scshape}%
\PackageWarning{beamerthemetrex}{%
Be aware that titleformat frame=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\trex@frametitleformat\MakeUppercase%
\setbeamerfont{frametitle}{shape=\normalfont}
\PackageWarning{beamerthemetrex}{%
Be aware that titleformat frame=allcaps can lead to problems%
}
},
}
\pgfkeys{
/trex/font/.cd,
titleformattitle/.code=\pgfkeysalso{titleformat title=#1},
titleformatsubtitle/.code=\pgfkeysalso{titleformat subtitle=#1},
titleformatsection/.code=\pgfkeysalso{titleformat section=#1},
titleformatframe/.code=\pgfkeysalso{titleformat frame=#1},
}
\newcommand{\trex@font@setdefaults}{
\pgfkeys{/trex/font/.cd,
titleformat title=regular,
titleformat subtitle=regular,
titleformat section=regular,
titleformat frame=regular,
}
}
\def\trex@titleformat#1{#1}
\def\trex@subtitleformat#1{#1}
\def\trex@sectiontitleformat#1{#1}
\def\trex@frametitleformat#1{#1}
\patchcmd{\beamer@title}%
{\def\inserttitle{#2}}%
{\def\inserttitle{\trex@titleformat{#2}}}%
{}%
{\PackageError{beamerfontthemetrex}{Patching title failed}\@ehc}
\patchcmd{\beamer@subtitle}%
{\def\insertsubtitle{#2}}%
{\def\insertsubtitle{\trex@subtitleformat{#2}}}%
{}%
{\PackageError{beamerfontthemetrex}{Patching subtitle failed}\@ehc}
\patchcmd{\sectionentry}
{\def\insertsectionhead{#2}}
{\def\insertsectionhead{\trex@sectiontitleformat{#2}}}
{}
{\PackageError{beamerfontthemetrex}{Patching section title failed}\@ehc}
\@tempswafalse
\patchcmd{\beamer@section}
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{%
\trex@sectiontitleformat{#1}}}}
{\@tempswatrue}
{}
\patchcmd{\beamer@section}
{\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}}
{\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
\noexpand\trex@sectiontitleformat{#1}}}}
{\@tempswatrue}
{}
\if@tempswa\else
\PackageError{beamerfontthemetrex}{Patching section title failed}\@ehc
\fi
\@tempswafalse
\patchcmd{\beamer@subsection}
{\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
{\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{%
\trex@sectiontitleformat{#1}}}}
{\@tempswatrue}
{}
\patchcmd{\beamer@subsection}
{\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}}
{\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
\noexpand\trex@sectiontitleformat{#1}}}}
{\@tempswatrue}
{}
\if@tempswa\else
\PackageError{beamerfontthemetrex}{Patching section title failed}\@ehc
\fi
\patchcmd{\beamer@@frametitle}
{{%
\gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space%
\usebeamertemplate*{frametitle continuation}\fi}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
}}
{{%
\gdef\insertframetitle{{\trex@frametitleformat{#2}\ifnum%
\beamer@autobreakcount>0\relax{}\space%
\usebeamertemplate*{frametitle continuation}\fi}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
}}
{}
{\PackageError{beamerfontthemetrex}{Patching frame title failed}\@ehc}
\trex@font@setdefaults
\ProcessPgfPackageOptions{/trex/font}
\endinput
%%
%% End of file `beamerfontthemetrex.sty'.

53
beamerinnerthemetrex.sty Normal file
View File

@ -0,0 +1,53 @@
\mode<presentation>
\setbeamertemplate{background}{
\ifnum\thepage>1
\includegraphics[height=\paperheight]{beamerbackgroundtrex.png}
\else
\includegraphics[height=\paperheight]{beamertitletrex.png}
\fi
}
% Title page
\defbeamertemplate*{title page}{trex}[1][]
{
\vskip3cm%
\begin{beamercolorbox}[wd=6.cm,leftskip=-0.5cm,#1]{title page header}
\usebeamerfont{title}\inserttitle\par%
\end{beamercolorbox}%
\vskip0.2cm%
\begin{beamercolorbox}[wd=6.cm,leftskip=-0.5cm,#1]{author}
\usebeamerfont{author}\insertauthor%
\end{beamercolorbox}
\vskip0.3cm%
\begin{beamercolorbox}[wd=6.cm,leftskip=-0.5cm,#1]{date}
\usebeamerfont{author}\insertdate%
\end{beamercolorbox}
\vskip0.3cm%
\begin{beamercolorbox}[wd=7.cm,leftskip=-0.5cm,#1]{institute}
\usebeamerfont{author}{\tiny \insertinstitute}%
\end{beamercolorbox}
\vfill
}
% Section page
\defbeamertemplate*{section page}{trex}{
\centering
\begin{minipage}{22em}
\raggedright
\usebeamercolor[fg]{section title}
\usebeamerfont{section title}
\insertsectionhead\\[-1ex]
\par
\ifx\insertsubsectionhead\@empty\else%
\usebeamercolor[fg]{subsection title}%
\usebeamerfont{subsection title}%
\insertsubsectionhead
\fi
\end{minipage}
\par
\vspace{\baselineskip}
}
\mode<all>

399
beamerouterthemetrex.log Normal file
View File

@ -0,0 +1,399 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex 2020.4.29) 7 OCT 2020 00:03
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
**beamerouterthemetrex.sty
(./beamerouterthemetrex.sty
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 7 language(s) loaded.
./beamerouterthemetrex.sty:1: Undefined control sequence.
l.1 \mode
<presentation>
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./beamerouterthemetrex.sty:1: LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.1 \mode<
presentation>
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Missing character: There is no < in font nullfont!
Missing character: There is no p in font nullfont!
Missing character: There is no r in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no s in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no n in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no i in font nullfont!
Missing character: There is no o in font nullfont!
Missing character: There is no n in font nullfont!
Missing character: There is no > in font nullfont!
Overfull \hbox (20.0pt too wide) in paragraph at lines 1--2
[]
[]
./beamerouterthemetrex.sty:4: Undefined control sequence.
l.4 \defbeamertemplate
*{frametitle}{trex}[1][]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./beamerouterthemetrex.sty:4: LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.4 \defbeamertemplate*
{frametitle}{trex}[1][]
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Missing character: There is no * in font nullfont!
Missing character: There is no f in font nullfont!
Missing character: There is no r in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no m in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no i in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no l in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no r in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no x in font nullfont!
Missing character: There is no [ in font nullfont!
Missing character: There is no 1 in font nullfont!
Missing character: There is no ] in font nullfont!
Missing character: There is no [ in font nullfont!
Missing character: There is no ] in font nullfont!
./beamerouterthemetrex.sty:6: LaTeX Error: Environment beamercolorbox undefined
.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.6 \begin{beamercolorbox}
[wd=\paperwidth,ht=0.95cm]{frametitle}
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
Missing character: There is no [ in font nullfont!
Missing character: There is no w in font nullfont!
Missing character: There is no d in font nullfont!
Missing character: There is no = in font nullfont!
./beamerouterthemetrex.sty:6: Illegal unit of measure (pt inserted).
<to be read again>
h
l.6 \begin{beamercolorbox}[wd=\paperwidth,h
t=0.95cm]{frametitle}
Dimensions can be in units of em, ex, in, pt, pc,
cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!
I'll assume that you meant to say pt, for printer's points.
To recover gracefully from this error, it's best to
delete the erroneous units; e.g., type `2' to delete
two letters. (See Chapter 27 of The TeXbook.)
Missing character: There is no h in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no = in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no . in font nullfont!
Missing character: There is no 9 in font nullfont!
Missing character: There is no 5 in font nullfont!
Missing character: There is no c in font nullfont!
Missing character: There is no m in font nullfont!
Missing character: There is no ] in font nullfont!
Missing character: There is no f in font nullfont!
Missing character: There is no r in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no m in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no i in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no l in font nullfont!
Missing character: There is no e in font nullfont!
./beamerouterthemetrex.sty:7: LaTeX Error: Environment tikzpicture undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.7 \begin{tikzpicture}
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
./beamerouterthemetrex.sty:12: Undefined control sequence.
l.12 \useasboundingbox
[](0,0) rectangle(\the\paperwidth,1.);
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no [ in font nullfont!
Missing character: There is no ] in font nullfont!
Missing character: There is no ( in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no , in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no ) in font nullfont!
Missing character: There is no r in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no c in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no n in font nullfont!
Missing character: There is no g in font nullfont!
Missing character: There is no l in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no ( in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no . in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no p in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no , in font nullfont!
Missing character: There is no 1 in font nullfont!
Missing character: There is no . in font nullfont!
Missing character: There is no ) in font nullfont!
Missing character: There is no ; in font nullfont!
./beamerouterthemetrex.sty:16: Undefined control sequence.
l.16 {\node
[anchor= west, white,font=\large] at (6.2,0.61){\insertframe...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no [ in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no n in font nullfont!
Missing character: There is no c in font nullfont!
Missing character: There is no h in font nullfont!
Missing character: There is no o in font nullfont!
Missing character: There is no r in font nullfont!
Missing character: There is no = in font nullfont!
Missing character: There is no w in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no s in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no , in font nullfont!
Missing character: There is no w in font nullfont!
Missing character: There is no h in font nullfont!
Missing character: There is no i in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no , in font nullfont!
Missing character: There is no f in font nullfont!
Missing character: There is no o in font nullfont!
Missing character: There is no n in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no = in font nullfont!
./beamerouterthemetrex.sty:16: Undefined control sequence.
l.16 {\node[anchor= west, white,font=\large
] at (6.2,0.61){\insertframe...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no ] in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no ( in font nullfont!
Missing character: There is no 6 in font nullfont!
Missing character: There is no . in font nullfont!
Missing character: There is no 2 in font nullfont!
Missing character: There is no , in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no . in font nullfont!
Missing character: There is no 6 in font nullfont!
Missing character: There is no 1 in font nullfont!
Missing character: There is no ) in font nullfont!
./beamerouterthemetrex.sty:16: Undefined control sequence.
l.16 ...nt=\large] at (6.2,0.61){\insertframetitle
};%
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no ; in font nullfont!
./beamerouterthemetrex.sty:17: Undefined control sequence.
l.17 \node
[anchor= west, white,font=\small] at (6.2,0.11){\insertframe...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no [ in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no n in font nullfont!
Missing character: There is no c in font nullfont!
Missing character: There is no h in font nullfont!
Missing character: There is no o in font nullfont!
Missing character: There is no r in font nullfont!
Missing character: There is no = in font nullfont!
Missing character: There is no w in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no s in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no , in font nullfont!
Missing character: There is no w in font nullfont!
Missing character: There is no h in font nullfont!
Missing character: There is no i in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no e in font nullfont!
Missing character: There is no , in font nullfont!
Missing character: There is no f in font nullfont!
Missing character: There is no o in font nullfont!
Missing character: There is no n in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no = in font nullfont!
./beamerouterthemetrex.sty:17: Undefined control sequence.
l.17 \node[anchor= west, white,font=\small
] at (6.2,0.11){\insertframe...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no ] in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no t in font nullfont!
Missing character: There is no ( in font nullfont!
Missing character: There is no 6 in font nullfont!
Missing character: There is no . in font nullfont!
Missing character: There is no 2 in font nullfont!
Missing character: There is no , in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no . in font nullfont!
Missing character: There is no 1 in font nullfont!
Missing character: There is no 1 in font nullfont!
Missing character: There is no ) in font nullfont!
./beamerouterthemetrex.sty:17: Undefined control sequence.
l.17 ...\small] at (6.2,0.11){\insertframesubtitle
};}%
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Missing character: There is no ; in font nullfont!
./beamerouterthemetrex.sty:19: LaTeX Error: \begin{document} ended by \end{tikz
picture}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.19 \end{tikzpicture}
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
./beamerouterthemetrex.sty:20: LaTeX Error: \begin{document} ended by \end{beam
ercolorbox}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.20 \end{beamercolorbox}
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
Overfull \hbox (20.0pt too wide) in paragraph at lines 4--22
[]
[]
./beamerouterthemetrex.sty:23: Undefined control sequence.
l.23 \mode
<all>
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
./beamerouterthemetrex.sty:23: LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.23 \mode<
all>
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
Missing character: There is no < in font nullfont!
Missing character: There is no a in font nullfont!
Missing character: There is no l in font nullfont!
Missing character: There is no l in font nullfont!
Missing character: There is no > in font nullfont!
Overfull \hbox (20.0pt too wide) in paragraph at lines 23--24
[]
[]
)
! Emergency stop.
<*> beamerouterthemetrex.sty
*** (job aborted, no legal \end found)
Here is how much of TeX's memory you used:
10 strings out of 494847
246 string characters out of 6179080
46295 words of memory out of 5000000
3434 multiletter control sequences out of 15000+600000
3640 words of font info for 14 fonts, out of 8000000 for 9000
59 hyphenation exceptions out of 8191
6i,0n,6p,110b,29s stack positions out of 5000i,500n,10000p,200000b,80000s
! ==> Fatal error occurred, no output PDF file produced!

20
beamerouterthemetrex.sty Normal file
View File

@ -0,0 +1,20 @@
\mode<presentation>
% Frame title
\defbeamertemplate*{frametitle}{trex}[1][]
{
\begin{beamercolorbox}[wd=\paperwidth,ht=0.95cm]{frametitle}
\begin{tikzpicture}
% \useasboundingbox[fill=white](0,0) rectangle(\the\paperwidth,1.);
%\fill[red!80!black] (0,0) rectangle(2.95,1.);
%\fill[blue!50!cyan!80!black] (3.05,0) rectangle(\the\paperwidth,1.);
%\fill[white!50] (3.05,0) rectangle(\the\paperwidth,1.);
\useasboundingbox[](0,0) rectangle(\the\paperwidth,1.);
\node[anchor=east, white,font=\large] at
(\paperwidth,0.25){\insertframetitle \phantom{m}};
\end{tikzpicture}
\end{beamercolorbox}
}
\mode<all>

29
beamerthemetrex.sty Normal file
View File

@ -0,0 +1,29 @@
\mode<presentation>
% Requirement
\RequirePackage{tikz}
% Settings
\useinnertheme{trex}
\useoutertheme{trex}
\usecolortheme{trex}
\usefonttheme{trex}
% we remove the navigation symbols and define blocks aspect.
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{blocks}[rounded][shadow=true]
\AtBeginSection[]{%
\begin{frame}[plain]
\usebeamertemplate{section page}
\end{frame}
}
\setbeamertemplate{footline}{
\vspace{0.6cm}
}
\mode<all>

BIN
beamertitletrex.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

260
scemama.org Normal file
View File

@ -0,0 +1,260 @@
#+TITLE: Library development within TREX
#+DATE: 12/03/2021
#+AUTHOR: Anthony Scemama
#+LaTeX_HEADER: \institute{Lab. Chimie et Physique Quantiques, IRSAMC, UPS/CNRS, Toulouse (France)}
#+LATEX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS:[aspectratio=169]
#+BEAMER_THEME: trex
#+LaTeX_HEADER: \usepackage{minted}
#+LaTeX_HEADER: \usemintedstyle{emacs}
#+LaTeX_HEADER: \newminted{f90}{fontsize=\footnotesize}
#+LaTeX_HEADER: \usepackage[utf8]{inputenc}
#+LaTeX_HEADER: \usepackage[T1]{fontenc}
#+LaTeX_HEADER: \usepackage{hyperref}
#+LaTeX_HEADER: \usepackage{mathtools}
#+LaTeX_HEADER: \usepackage{physics}
#+LaTeX_HEADER: \definecolor{darkgreen}{rgb}{0.,0.6,0.}
#+LaTeX_HEADER: \definecolor{darkblue}{rgb}{0.,0.2,0.7}
#+LaTeX_HEADER: \definecolor{darkred}{rgb}{0.6,0.1,0.1}
#+LaTeX_HEADER: \definecolor{darkpink}{rgb}{0.7,0.0,0.7}
#+LaTeX_HEADER: \newcommand{\coord }{{\bf r}_1, \dots, {\bf r}_N }
#+LaTeX_HEADER: \newcommand{\dcoord }{\dd {\bf r}_1 \dots \dd{\bf r}_N }
#+EXPORT_EXCLUDE_TAGS: noexport
#+startup: beamer
#+options: H:1 toc:nil
* Quantum chemistry
#+LATEX: \begin{columns}
#+LATEX: \begin{column}{0.25\textwidth}
#+ATTR_LATEX: :width \textwidth
[[./dirac_4.jpg]]
#+LATEX: \end{column}
#+LATEX: \begin{column}{0.75\textwidth}
#+ATTR_LATEX: :width \textwidth
[[./dirac2.png]]
#+LATEX: \end{column}
#+LATEX: \end{columns}
* Quantum chemistry
#+LATEX: \begin{columns}
#+LATEX: \begin{column}{0.6\textwidth}
#+LATEX: \begin{exampleblock}{}
- Describing matter with quantum mechanics (Schrödinger's equation)
- Users: theoretical chemists and physicists
#+LATEX: \end{exampleblock}
#+LATEX: \end{column}
#+LATEX: \begin{column}{0.4\textwidth}
#+ATTR_LATEX: :width \textwidth
[[./Water.png]]
#+LATEX: \end{column}
#+LATEX: \end{columns}
#+LATEX: \begin{columns}
#+LATEX: \begin{column}{0.4\textwidth}
#+ATTR_LATEX: :width \textwidth
[[./casula.png]]
#+LATEX: \end{column}
#+LATEX: \begin{column}{0.6\textwidth}
#+LATEX: \begin{exampleblock}{Implications for society}
| - Health | Drug design |
| - Electronics | Nano- and micro-electronics |
| - Materials | Carbon nanotubes, graphene, \dots |
| - Catalysis | Enzymatic reactions, petroleum |
#+LATEX: \end{exampleblock}
#+LATEX: \end{column}
#+LATEX: \end{columns}
* TREX: Targeting REal chemical accuracy at the EXascale
#+LATEX: \begin{columns}
#+LATEX: \begin{column}{0.4\textwidth}
#+ATTR_LATEX: :width \textwidth
[[./Curve.png]]
#+LATEX: \end{column}
#+LATEX: \begin{column}{0.6\textwidth}
#+LATEX: \begin{exampleblock}{Objective: Make codes ready for exascale}
How: Instead of re-writing codes, provide libraries
- One library for exchanging information between codes (*TREXIO*)
- One library for high-performance (*QMCkl*)
#+LATEX: \end{exampleblock}
#+LATEX: \begin{exampleblock}{QMC: Quantum Monte Carlo methods}
- Highly accurate
- Massively parallelisable (multiple QMC trajectories)
- CPU intensive
#+LATEX: \end{exampleblock}
#+LATEX: \end{column}
#+LATEX: \end{columns}
* Quantum Monte Carlo (QMC)
#+BEGIN_SRC latex
\alert{Problem}: Stochastic resolution of the Schr\"odinger equation for $N$ electrons
\begin{eqnarray}
E &= &\frac{\int \dcoord \Phi(\coord) {\cal H} \Phi(\coord)}
{\int \dcoord \Phi(\coord) \Phi(\coord)} \nonumber \\
&\sim & \sum \frac{ {\cal H}\Psi(\coord )}{\Psi(\coord )}
\text{, sampled with } (\Psi \times \Phi)
\nonumber
\end{eqnarray}
\begin{columns}
\begin{column}{.5\textwidth}
\begin{itemize}
\item[$\cal H $: ] Hamiltonian operator
\item[$E$: ] Energy
\end{itemize}
\end{column}
\begin{column}{.4\textwidth}
\begin{itemize}
\item[$\coord $: ] Electron coordinates
\item[$\Phi $: ] Almost exact wave function
\item[$\Psi $: ] Trial wave function
\end{itemize}
\end{column}
\end{columns}
#+END_SRC
* Quantum Monte Carlo (QMC)
#+LATEX: \begin{columns}
#+LATEX: \begin{column}{0.4\textwidth}
- Very low memory requirements (no integrals)
- Distribute walkers on different cores or compute nodes
- No blocking communication: near-ideal scaling
- Difficulty: parallelize within a QMC trajectory
#+LATEX: \end{column}
#+LATEX: \begin{column}{0.6\textwidth}
#+ATTR_LATEX: :width \textwidth
[[./Qmc.png]]
#+LATEX: \end{column}
#+LATEX: \end{columns}
* QMC kernel library (QMCkl)
** Computational kernels
- QMCkl will contain the main kernels of QMC methods
- Written together by QMC experts and HPC experts
- Multiple high performance implementations of the kernels, tuned
for different
- architectures
- problem sizes
- requested accuracy (reduced precision)
- The sequence of kernels will be scheduled with the StarPU runtime
* QMC kernel library (QMCkl)
** Two implementations
- /Documentation/ : easy to read and understand, not necessarily efficient
- /High performance/ : efficient, but not necessarily readable by physicists/chemists
- Both /Documentation/ and /High performance/ have the same API.
** Advantages
- The code can stay easy to understand by the physicists/chemists
Performance-related aspects are delegated to the library
- Changing architecture requires only linking with another
version of the library
- Scientific code development does not break the performance
- Better re-use of the optimization effort among the community
* Literate programming :noexport:
#+BEGIN_quote
Literate programming is a programming paradigm introduced by Donald
Knuth in which a computer program is given an explanation of its
logic in a natural language, such as English, interspersed with
snippets of macros and traditional source code, from which
compilable source code can be generated. (Wikipedia)
#+END_quote
* Documentation library :noexport:
Literate programming with org-mode:
- Here, comments are more important than code
- Can add graphics, \LaTeX formulas, tables, etc
- Documentation always synchronized with the code
- Some routines can be generated by embedded scripts
- Most of the the first report was generated from the documentation
- Kernels are implemented in Fortran for readability
- The API is C-compatible: QMCkl appears like a C library
$\Longrightarrow$ can be used in all other languages
* Design strategy
1. Kernel extraction: QMC specialists agree on the
mathematical expression of the problem
2. A mini-application is written to find the optimal data layout
with HPC experts from real-size examples
3. The kernel is written in the documentation library
4. The documentation library is linked in a QMC code to check correctness
5. HPC experts provide an HPC version of the kernel
6. The HPC library is linked in the QMC codes of the CoE
* Our first application : 3-body Jastrow factor
#+LATEX: \newcommand{\Jeen}{J_{\text{een}}}
#+LATEX: \newcommand{\Nel}{N_{\text{elec}}}
#+LATEX: \newcommand{\Nat}{N_{\text{nucl}}}
#+LATEX: \newcommand{\Nord}{N_{\text{nord}}}
#+LATEX: \newcommand{\lmax}{p-k-2\delta_{k,0}}
#+LATEX: \newcommand{\br}{\mathbf{r}}
#+LATEX: \newcommand{\bR}{\mathbf{R}}
#+LATEX: \newcommand{\ttr}{\, \bar{\mathtt{r}}}
#+LATEX: \newcommand{\tR}{\, \bar{\mathtt{R}}}
#+LATEX: \newcommand{\tP}{\, \bar{\mathtt{P}}}
\[
\Jeen (\br,\bR) = \sum_{\alpha=1}^{\Nat} \sum_{i=1}^{\Nel} \sum_{j=1}^{i-1}
\sum_{p=2}^{\Nord} \sum_{k=0}^{p-1}
\sum_{l=0}^{\lmax} c_{lkp\alpha}
\left( {r}_{ij} \right)^k
\left[ \left( {R}_{i\alpha} \right)^l + \left( {R}_{j\alpha} \right)^l \right]
\left( {R}_{i\,\alpha} \, {R}_{j\alpha} \right)^{(p-k-l)/2}
\]
#+LATEX: \begin{columns}
#+LATEX: \begin{column}{0.5\textwidth}
#+ATTR_LATEX: :width \textwidth
[[./speedup.pdf]]
#+LATEX: \end{column}
#+LATEX: \begin{column}{0.5\textwidth}
- Gradient and Laplacian are also required
- Up to $20\times$ faster than in the original code
- $\sim 80\%$ of the AVX-512 peak is reached
- Expressed with a DGEMM kernel $\Longrightarrow$ also efficient on GPU
#+LATEX: \end{column}
#+LATEX: \end{columns}
* Links
- TREX web site : https://trex-coe.eu
- QMCkl documentation : https://trex-coe.github.io/qmckl
- QMCkl repository : https://github.com/trex-coe/qmckl
* Export :noexport:
#+BEGIN_SRC elisp :output none
(setq org-latex-listings 'minted)
(setq org-latex-custom-lang-environments
'(
(f90 "fortran")
))
(setq org-latex-minted-options
'(("frame" "lines")
("fontsize" "\\scriptsize")
("linenos" "")))
(setq org-latex-to-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
(org-beamer-export-to-pdf)
#+END_SRC
#+RESULTS:
: /home/scemama/TEX/ISC2021/scemama.pdf

View File

@ -1,4 +1,4 @@
% Created 2021-06-28 Mon 14:25
% Created 2021-06-30 Wed 12:12
% Intended LaTeX compiler: pdflatex
\documentclass[aspectratio=169]{beamer}
\usepackage[utf8]{inputenc}
@ -27,6 +27,8 @@
\definecolor{darkblue}{rgb}{0.,0.2,0.7}
\definecolor{darkred}{rgb}{0.6,0.1,0.1}
\definecolor{darkpink}{rgb}{0.7,0.0,0.7}
\newcommand{\coord }{{\bf r}_1, \dots, {\bf r}_N }
\newcommand{\dcoord }{\dd {\bf r}_1 \dots \dd{\bf r}_N }
\usetheme{trex}
\author{Anthony Scemama}
\date{12/03/2021}
@ -42,7 +44,7 @@
\maketitle
\begin{frame}[label={sec:org58acecb}]{Quantum chemistry}
\begin{frame}[label={sec:org52bec56}]{Quantum chemistry}
\begin{columns}
\begin{column}{0.25\textwidth}
\begin{center}
@ -57,7 +59,7 @@
\end{columns}
\end{frame}
\begin{frame}[label={sec:org07dc1a1}]{Quantum chemistry}
\begin{frame}[label={sec:org2a0da55}]{Quantum chemistry}
\begin{columns}
\begin{column}{0.6\textwidth}
\begin{exampleblock}{}
@ -87,7 +89,7 @@
- Health & Drug design\\
- Electronics & Nano- and micro-electronics\\
- Materials & Carbon nanotubes, graphene, \dots{}\\
- Catalysis & Enzymatic reactions, petrol\\
- Catalysis & Enzymatic reactions, petroleum\\
\end{tabular}
\end{center}
\end{exampleblock}
@ -95,7 +97,7 @@
\end{columns}
\end{frame}
\begin{frame}[label={sec:orgf844e6b}]{TREX: Targeting REal chemical accuracy at the EXascale}
\begin{frame}[label={sec:org7ad98d0}]{TREX: Targeting REal chemical accuracy at the EXascale}
\begin{columns}
\begin{column}{0.4\textwidth}
\begin{center}
@ -104,12 +106,6 @@
\end{column}
\begin{column}{0.6\textwidth}
\begin{exampleblock}{QMC: Quantum Monte Carlo methods}
\begin{itemize}
\item Massively parallelisable (multiple QMC trajectories)
\item Difficulty: take advantage of parallelism within a trajectory
\end{itemize}
\end{exampleblock}
\begin{exampleblock}{Objective: Make codes ready for exascale}
How: Instead of re-writing codes, provide libraries
\begin{itemize}
@ -117,21 +113,69 @@ How: Instead of re-writing codes, provide libraries
\item One library for high-performance (\alert{QMCkl})
\end{itemize}
\end{exampleblock}
\begin{exampleblock}{QMC: Quantum Monte Carlo methods}
\begin{itemize}
\item Highly accurate
\item Massively parallelisable (multiple QMC trajectories)
\item CPU intensive
\end{itemize}
\end{exampleblock}
\end{column}
\end{columns}
\end{frame}
\begin{frame}[label={sec:org9bd59c0}]{Presentation of TREX}
\begin{frame}[label={sec:orgd075e20}]{Quantum Monte Carlo (QMC)}
\alert{Problem}: Stochastic resolution of the Schr\"odinger equation for $N$ electrons
\begin{eqnarray}
E &= &\frac{\int \dcoord \Phi(\coord) {\cal H} \Phi(\coord)}
{\int \dcoord \Phi(\coord) \Phi(\coord)} \nonumber \\
&\sim & \sum \frac{ {\cal H}\Psi(\coord )}{\Psi(\coord )}
\text{, sampled with } (\Psi \times \Phi)
\nonumber
\end{eqnarray}
\begin{columns}
\begin{column}{.5\textwidth}
\begin{itemize}
\item TREX CoE: Targeting REal chemical accuracy at the eXascale
\item Started in Oct. 2020
\item[$\cal H $: ] Hamiltonian operator
\item[$E$: ] Energy
\end{itemize}
\end{column}
\begin{column}{.4\textwidth}
\begin{itemize}
\item[$\coord $: ] Electron coordinates
\item[$\Phi $: ] Almost exact wave function
\item[$\Psi $: ] Trial wave function
\end{itemize}
\end{column}
\end{columns}
\end{frame}
\begin{frame}[label={sec:orgfb14f88}]{QMC kernel library (QMCkl)}
\begin{frame}[label={sec:org933f7ec}]{Quantum Monte Carlo (QMC)}
\begin{columns}
\begin{column}{0.4\textwidth}
\begin{itemize}
\item Codesign: Written together by QMC experts and HPC experts
\item Contains all major kernels of QMC methods
\item Very low memory requirements (no integrals)
\item Distribute walkers on different cores or compute nodes
\item No blocking communication: near-ideal scaling
\item Difficulty: parallelize within a QMC trajectory
\end{itemize}
\end{column}
\begin{column}{0.6\textwidth}
\begin{center}
\includegraphics[width=\textwidth]{./Qmc.png}
\end{center}
\end{column}
\end{columns}
\end{frame}
\begin{frame}[label={sec:org8b6768c}]{QMC kernel library (QMCkl)}
\begin{block}{Computational kernels}
\begin{itemize}
\item QMCkl will contain the main kernels of QMC methods
\item Written together by QMC experts and HPC experts
\item Multiple high performance implementations of the kernels, tuned
for different
\begin{itemize}
@ -139,14 +183,22 @@ for different
\item problem sizes
\item requested accuracy (reduced precision)
\end{itemize}
\item Reference implementation : \emph{Documentation} : easy to read and
understand, not necessarily efficient
\item Final implementations : \emph{High performance} : efficient, but not
necessarily readable by physicists/chemists
\item Kernels will be scheduled with the StarPU runtime
\end{itemize}
\end{block}
\end{frame}
\begin{frame}[label={sec:org929f042}]{Advantages}
\begin{frame}[label={sec:org24ef7da}]{QMC kernel library (QMCkl)}
\begin{block}{Two implementations}
\begin{itemize}
\item \emph{Documentation} : easy to read and understand, not necessarily efficient
\item \emph{High performance} : efficient, but not necessarily readable by physicists/chemists
\item Both \emph{Documentation} and \emph{High performance} have the same API.
\end{itemize}
\end{block}
\begin{block}{Advantages}
\begin{itemize}
\item The code can stay easy to understand by the physicists/chemists
Performance-related aspects are delegated to the library
@ -155,46 +207,23 @@ version of the library
\item Scientific code development does not break the performance
\item Better re-use of the optimization effort among the community
\end{itemize}
\end{block}
\end{frame}
\begin{frame}[label={sec:org8ded82f}]{Literate programming}
\begin{quote}
Literate programming is a programming paradigm introduced by Donald
Knuth in which a computer program is given an explanation of its
logic in a natural language, such as English, interspersed with
snippets of macros and traditional source code, from which
compilable source code can be generated. (Wikipedia)
\end{quote}
\end{frame}
\begin{frame}[label={sec:org01ef9da}]{Documentation library}
Literate programming with org-mode:
\begin{itemize}
\item Here, comments are more important than code
\item Can add graphics, \LaTeX formulas, tables, etc
\item Documentation always synchronized with the code
\item Some routines can be generated by embedded scripts
\item Most of the the first report was generated from the documentation
\item Kernels are implemented in Fortran for readability
\item The API is C-compatible: QMCkl appears like a C library
\(\Longrightarrow\) can be used in all other languages
\end{itemize}
\end{frame}
\begin{frame}[label={sec:orge55dfb7}]{Codesign strategy}
\begin{frame}[label={sec:org8e1f375}]{Design strategy}
\begin{enumerate}
\item Kernel extraction: QMC specialists agree on the
mathematical expression of the problem
\item A mini-application is written to find the best data layout
\item A mini-application is written to find the optimal data layout
with HPC experts from real-size examples
\item The kernel is written in the documentation library
\item The documentation library is linked in a QMC code to check correctness
\item HPC experts provide an HPC version of the kernel
\item The library is linked in the QMC codes of the CoE
\item The HPC library is linked in the QMC codes of the CoE
\end{enumerate}
\end{frame}
\begin{frame}[label={sec:orgfdcab81}]{Our first application : 3-body Jastrow factor}
\begin{frame}[label={sec:orge2ab500}]{Our first application : 3-body Jastrow factor}
\newcommand{\Jeen}{J_{\text{een}}}
\newcommand{\Nel}{N_{\text{elec}}}
\newcommand{\Nat}{N_{\text{nucl}}}
@ -215,315 +244,29 @@ with HPC experts from real-size examples
\left( {R}_{i\,\alpha} \, {R}_{j\alpha} \right)^{(p-k-l)/2}
\]
can be rewritten as
\[
\Jeen(\br,\bR) =
\sum_{p=2}^{\Nord}\sum_{k=0}^{p-1}
\sum_{l=0}^{\lmax}
\sum_{\alpha=1}^{\Nat}
c_{lkp\alpha}
\sum_{i=1}^{\Nel}
{\tR}_{i,\alpha,(p-k-l)/2}\,
{\tP}_{i,\alpha,k,(p-k+l)/2} \; \text{\scriptsize \alert{($\downarrow$ complexity)}}
\]
with
\[
{\tP}_{i, \alpha, k, l} = \sum_{j=1}^{\Nel}
{\ttr}_{i,j,k}\,{\tR}_{j,\alpha,l}. \; \text{\alert{\scriptsize (GEMM)}}
\]
\end{frame}
\begin{frame}[label={sec:org3e25bfe}]{Our first application : Gradient and Laplacian}
\newcommand{\Jeen}{J_{\text{een}}}
\newcommand{\Nel}{N_{\text{elec}}}
\newcommand{\Nat}{N_{\text{nucl}}}
\newcommand{\Nord}{N_{\text{nord}}}
\newcommand{\lmax}{p-k-2\delta_{k,0}}
\newcommand{\br}{\mathbf{r}}
\newcommand{\bR}{\mathbf{R}}
\newcommand{\ttr}{\, \bar{\mathtt{r}}}
\newcommand{\tR}{\, \bar{\mathtt{R}}}
\newcommand{\tP}{\, \bar{\mathtt{P}}}
\newcommand{\tg}{\, \bar{\mathtt{g}}}
\newcommand{\tG}{\, \bar{\mathtt{G}}}
\newcommand{\tQ}{\, \bar{\mathtt{Q}}}
\begin{eqnarray*}
\nabla_{im} \Jeen(\br,\bR) & = &
\sum_{p=2}^{\Nord}\sum_{k=0}^{p-1}
\sum_{l=0}^{\lmax}
\sum_{\alpha=1}^{\Nat}
c_{lkp\alpha}
\sum_{i=1}^{\Nel}
{\tG}_{i,m,\alpha,(p-k-l)/2} {\tP}_{i,\alpha,k,(p-k+l)/2} + \\
&& {\tG}_{i,m,\alpha,(p-k+l)/2} {\tP}_{i,\alpha,k,(p-k-l)/2} +
{\tR}_{i,\alpha,(p-k-l)/2} {\tQ}_{i,m,\alpha,k,(p-k+l)/2} + \\
&& {\tR}_{i,\alpha,(p-k+l)/2} {\tQ}_{i,m,\alpha,k,(p-k-l)/2} +
\delta_{m,4} \big( \\
&& {\tG}_{i,1,\alpha,(p-k+l)/2} {\tQ}_{i,1,\alpha,k,(p-k-l)/2} +
{\tG}_{i,2,\alpha,(p-k+l)/2} {\tQ}_{i,2,\alpha,k,(p-k-l)/2} + \\
&& {\tG}_{i,3,\alpha,(p-k+l)/2} {\tQ}_{i,3,\alpha,k,(p-k-l)/2} +
{\tG}_{i,1,\alpha,(p-k-l)/2} {\tQ}_{i,1,\alpha,k,(p-k+l)/2} + \\
&& {\tG}_{i,2,\alpha,(p-k-l)/2} {\tQ}_{i,2,\alpha,k,(p-k+l)/2} +
{\tG}_{i,3,\alpha,(p-k-l)/2} {\tQ}_{i,3,\alpha,k,(p-k+l)/2} \big)
\end{eqnarray*}
with
\[
{\tG}_{i, m, \alpha, l} = \frac{\partial \left( {R}_{i\alpha} \right)^l}
{\partial r_i}, \phantom{ space }
{\tg}_{i, m, j, k} = \frac{\partial \left( {r}_{ij} \right)^k}
{\partial r_i}, \phantom{ space }
\text{ and }
{\tQ}_{i, m, \alpha, k, l} = \sum_{j=1}^{\Nel}
{\tg}_{i,m,j,k}\,{\tR}_{j,\alpha,l}
\]
\end{frame}
\begin{frame}[label={sec:org0200bcf}]{Speed up}
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{center}
\includegraphics[height=0.8\textheight]{./speedup.pdf}
\includegraphics[width=\textwidth]{./speedup.pdf}
\end{center}
\(\sim 80\%\) of the AVX-512 peak is reached on a Skylake CPU.
\end{column}
\begin{column}{0.5\textwidth}
\begin{itemize}
\item Gradient and Laplacian are also required
\item Up to \(20\times\) faster than in the original code
\item \(\sim 80\%\) of the AVX-512 peak is reached
\item Using a DGEMM kernel \(\Longrightarrow\) also efficient on GPU
\end{itemize}
\end{column}
\end{columns}
\end{frame}
\begin{frame}[label={sec:org4f9d92a}]{Links}
\begin{frame}[label={sec:org5b9dcc8}]{Links}
\begin{itemize}
\item TREX web site : \url{https://trex-coe.eu}
\item QMCkl documentation : \url{https://trex-coe.github.io/qmckl}
\item QMCkl repository : \url{https://github.com/trex-coe/qmckl}
\end{itemize}
\end{frame}
\begin{frame}[label={sec:orgd018cbe},fragile]{CoEs Co-Design Workshop}
March 12 9:00-12:00 and 14:00-17:00
The goal of this workshop is to first get an overview of what CoEs think of co-design and what they do in that context and then to build a shared and common view on this important issue.
The workshop consists of two round tables where each panellist will make a short presentation that will be followed by a discussion among the panellists and with all participants. The workshop is open to all CoE members, so please disseminate largely.
\begin{block}{Session 1 - 9:00 12:00}
Different levels of co-design, where do CoEs come in ?
Panelists: Fabio Affinito, Guillaume Houzeaux, Jesus Labarta, Soline
Laforet, Antony Scemama,
Supercomputer are rather complex systems build using innovative technologies, both on the hardware and software sides. Therefore, co-design can be applied at different levels : chip, network, low-level software, programming models and environment, libraries or applications….
In its design, a computer can also be more general purpose or tuned for a specific class of application.
This round table will discuss all these issues and how CoEs can best contribute.
Zoom link :
\url{https://zoom.us/j/96850634356?pwd=Q0ViUlVYL0tSWXlEeGVVTTJYcWpBdz09}
\begin{enumerate}
\item Short presentation of yourself and of your background.
\begin{itemize}
\item Guillaume Houzeaux: BSC. Sticks : Comp. mechanics
\item Jesus Labarta: BSC
\item Soline Laforet: Atos, Earth Science
\item Fabio Affinito: CINECA, Coordinator of support team
\end{itemize}
\end{enumerate}
\begin{enumerate}
\item Questions :
\end{enumerate}
• How would you define co-design ? (Introduction)
Each of you can make a short speech to present your global view on co-design.
\begin{itemize}
\item JS
\begin{itemize}
\item Codesign implies design. We design applications
\item Codimensioning is not codesign
\item Holistic: every layer in the architecture take design
decisions on the same project
\end{itemize}
\item SL:
\begin{itemize}
\item HPC is not the main field of activity of hardware providers
\item Software environment is important
\end{itemize}
\item FA: \ldots{}
\item GH: Application developer rely on the lower level
\end{itemize}
\begin{verbatim}
Multiple people of different communities work on the same project, each
bringing its domain-specific expertise. Better than the sum of its parts.
\end{verbatim}
• What are the new challenges for co-design related to the future exascale system?
\begin{verbatim}
The software stack is becoming inceasingly complex. In HPC, we
need to use programming languages close to the hardware, with lots
of dangerous constructs. Writing correct software in these
languages becomes increasingly difficult.
Scientists can't understand their codes any more.
\end{verbatim}
\begin{itemize}
\item JL:
\begin{itemize}
\item Applications are more important than "shining" showing Flops/s
\item People program to their own mental model of the machine
\item General purpose vs specific : specific is suicide
\end{itemize}
\end{itemize}
• How does your CoE address the co-design activity? (SL)
\begin{verbatim}
- Move the critical performance outside of the codes in libraries
- QMCkl
- Design an API : collaboration between quantum chemists and computational
scientists. Documentation library were computational kernels are understandable
by HPC experts. The library is re-implemented by HPC experts for targeted
architectures.
- Kernel extraction: we go back to latex formulas, and write a mini-application.
Figure out the data structures for the kernel with HPC experts, and tune the
mini-application. Then, re-implement the kernel in the library.
\end{verbatim}
• What are the co-desing activities operated in you CoE and to
what extent do you think that these activities will actually
influence the HPC hardware design?
\begin{verbatim}
- Move the critical performance outside of the codes in libraries
- QMCkl
- Design an API : collaboration between quantum chemists and computational
scientists. Documentation library were computational kernels are understandable
by HPC experts. The library is re-implemented by HPC experts for targeted
architectures.
- Kernel extraction: we go back to latex formulas, and write a mini-application.
Figure out the data structures for the kernel with HPC experts, and tune the
mini-application. Then, re-implement the kernel in the library.
\end{verbatim}
• how general purpose/special purpose should designs be? 
\begin{verbatim}
Don't re-invent the wheel. But to get the wheel, you often
need to buy the bus and take away the wheel.
Lots of systems preventing you to extract the wheel
because the bus should be used without the wheel.
\end{verbatim}
• Which levels of co-design are relevant?
• What are the differences between developing a library and a program?
\begin{verbatim}
- In a code, you can trust that the parameters are valid.
Many checks before a the routine can do its job.
- Error handling: the library should not decide to crash the program
but return the error and its description to the calling code.
\end{verbatim}
• How holistic is holistic? 
• Can we measure the speed/rate/success of co-design? 
\begin{verbatim}
- In the 1st 6 months, we have reritten a kernel in co-design.
It give the same result as the naive formulation, but with a 20x speedup,
reaching 80% of the peak of a CPU.
\end{verbatim}
• what is the importance of the role of CoEs in helping scientific
communities to follow the evolution of the next HPC architectures?
\begin{verbatim}
- Isolated users are afraid of architecture changes. A CoE builds a community,
and it is a riving force that helps the users to change, and adapt their codes.
\end{verbatim}
• separation of concerns: how much this concept is working when
co-designing applications?
\begin{verbatim}
- Our libraries are good examples.
\end{verbatim}
\end{block}
\begin{block}{Questions / comments}
\begin{itemize}
\item JSC: We need different supercomputing centers specialized
for different application profiles.
\item Miguel Vasquez: Compromises. Need workload managers
\item Gavin Pringle (Excellerat): No CoE will even convince a hardware vendor.
Access to hardware prototypes.
\item Mariano Vazquez (CompBioMed): Centralize Codesign and
dissemination plan
\item Pasqua d'ambra CNR: appreciates vision of library design
\item Jesus Labrata: EPI
\begin{itemize}
\item ARM-based, SVE cores.
\item RISCV core
\item High bandwidth per code
\item Large vector operations
\item Emulator is available
\item How to handle locality
\item Sparse matrix vector is a kernel to optimize
\item \url{https://ssh.hca.bsc.es/epi/ftp/}
\url{https://ssh.hca.bsc.es/epi/ftp/doc/}
\item Pasqua d'Ambra (CNR), EoCoE : BLAS is a succes of codesign strategy
Same for Graph operations
\end{itemize}
\end{itemize}
Pasqua d'Ambra: sparse linear algebra kernels
Jesus Labarta: EPI
Karim H: MdlS
Miguel Vasquez: containers are not a solution
Peter V Coveney: Exascale Linpack is nonsense
\end{block}
\begin{block}{Session 2 14:00-17:00}
\url{https://zoom.us/j/94418315362?pwd=VWRESW95dzkySWZyU1NiSkhzK3JQdz09}
Co-Design for new usage
Panelists : Peter Coveney, Marta Garcia, Berk Hess, Leopold Talirz, Bruno Raffin 
Exascale computer are very likely to run more complex workloads than present supercomputer. This evolution is mainly driven by the development of data-analytics and the need to couple “standard” HPC computation and sophisticated data treatments. The new workloads will require to (co-)design hardware and software tools to manage complex workflows, code coupling, large ensemble runs, (in situ)data-analytics,…
Zoom link :
\url{https://zoom.us/j/94418315362?pwd=VWRESW95dzkySWZyU1NiSkhzK3JQdz09}
\begin{enumerate}
\item Short presentation of yourself and of your background.
\item Questions :
\end{enumerate}
• How do you think HPC workloads will evolve with exascale computers ? How does this influence the design of the system / applications
• what makes ensemble simulation and complex workflows prime candidates for exascale computing/computers?
 
• What are the possibility offered by new hardware, especially those allowing data-intensive workload (GPU, NVRam, flash,…) ?
• Data : Should HPC centers archiving/hosting Large scientific data set ?
• Should HPC centers be designed to host science portals?
• Should HPC centers host workflow-management-type workloads ? How should workflow be properly integrate in HPC centers ?
• What is your center of excellence doing to promote new usage of HPC or adapt to them ?
• What spread of maturity do we expect in codes concerning parallelization and acceleration?
• Which levels of co-design are relevant?
• Should we target more than software/software co-design?
• Which are the "must-have" or key things to succeed in the co-design task ?
• Which are the pitfalls or dangers along the road that can make co-design fail?
Idea: leave linpack to the americans, and propose a better benchmark.
\end{block}
\end{frame}
\end{document}

BIN
speedup.pdf Normal file

Binary file not shown.