~sbinet/talks

ref: chep-2018 talks/2015/20150121-hsf-go-fads/slides.tex -rw-r--r-- 12.8 KiB
0161a383 — Sebastien Binet 2018-07-09-chep-alice-fer: add TeX+PDF versions 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
%\documentclass[trans]{beamer}
\documentclass[9pt]{beamer}

% Try the class options [notes], [notes=only], [trans], [handout],
% [red], [compress], [draft], [class=article] and see what happens!

% Copyright 2003 by Till Tantau <tantau@users.sourceforge.net>.
%
% This program can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
% archives in directory macros/latex/base/lppl.txt.

% For a green structure color use:
%\colorlet{structure}{green!50!black}

%%%%%%%%%% User macros%%%%%%%%%%%
\newcommand{\mypurple}[1]{{\color[rgb]{0.7,0,0.8}#1}}
\newcommand{\myred}  [1] {{\color{red}#1}}
\newcommand{\myblue} [1] {{\color{blue}#1}}
\newcommand{\mygreen}[1] {{\color[rgb]{0,0.5,0}#1}}
\newcommand{\Nat}{\mathbb{N}}
\def\sla  {\!\!\!\slash}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mode<article> % only for the article version
{
  \usepackage{beamerbasearticle}
  \usepackage{fullpage}
  \usepackage{hyperref}
}

%\beamertemplateshadingbackground{red!10}{blue!10}
%\beamertemplateshadingbackground{blue!10}{blue!10}

%\usepackage{beamerthemeshadow}

\usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade}
\usepackage{amsmath,amssymb}
\usepackage[latin1]{inputenc}
\usepackage{colortbl}
\usepackage[english]{babel}
%\usepackage{verbatim}
%\usepackage{listings}
\usepackage[procnames]{listings}

%\usepackage{lmodern}
\usepackage[T1]{fontenc} 

\usepackage{times}

% for code colouring
\include{pythonlisting}
\include{cpplisting}
\usepackage{minted}

% Use some nice templates
\beamertemplatetransparentcovereddynamic
\usetheme{Binet}
%\usetheme{Madrid}
%\usetheme{Boadilla}
%\usetheme{Berkeley}
%\usetheme{Rochester}

%\def\command#1{\list{}{\leftmargin=2em\itemindent-\leftmargin\def\makelabel##1{\hss##1}}%
%\item\extractcommand#1@\par\topsep=0pt}
%\def\endcommand{\endlist}
%\def\extractcommand#1#2@{\strut\declare{\texttt{\string#1}}#2}

%
% The following info should normally be given in you main file:
%

\hypersetup{%
  pdftitle={go-fads},%
  pdfauthor={Sebastien Binet}
  %pdfsubject={AthenaMP},
  %pdfkeywords={ATLAS,Athena,python,COW,parallelization},
%  pdfpagemode=FullScreen%
}

\title[go-fads]{\texttt{fads}\\a (\texttt{Go}-based) FAst Detector Simulation toolkit}
\author[S. Binet]{S\'ebastien~Binet}%\inst{1}
\institute[LAL]{
%  \inst{1}%
  LAL/IN2P3}
\date{2015-01-21}

% \begin{center}
% On behalf of Core people
% \end{center}

\pgfdeclaremask{lal}{lal}
%\pgfdeclaremask{ubp}{UBP-logo}
\pgfdeclareimage[mask=lal,width=2cm]{lal-logo}{lal}
%\pgfdeclareimage[mask=ubp,width=1cm]{ubp-logo}{UBP-logo}

\logo{%
  \vbox{%
    \hbox{\pgfuseimage{lal-logo}}%
  }%
}


\begin{document}
\lstset{language=C++}

\frame{\titlepage
%  \hskip0.44\paperwidth
%  \insertlogo

    \begin{beamercolorbox}[sep=8pt,center]{mylogo}
      \usebeamercolor[fg]{mylogo}\insertlogo
    \end{beamercolorbox}

}

%\section*{Outline}
%\frame{\tableofcontents[part=1]}%,pausesections]}

%\AtBeginSubsection[]
%{
%  \frame<handout:0>
%  {
%    \frametitle{Outline}
%    \tableofcontents[current,currentsubsection]
%  }
%}

\part<presentation>{Main Talk}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\section[Outline]{Outline}

% \frame<beamer>{
%   \frametitle{Outline}
%   \begin{columns}
% \begin{column}{0.49\textwidth}
%   \begin{block}{}
%   \tableofcontents
%   \end{block}
% \end{column}
% \end{columns}

% }
%\frame{\partpage}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section[mysection]{mysection}

\frame{
  \frametitle{\texttt{fads}}

  \texttt{fads} is a \texttt{``FAst Detector Simulation''} toolkit.

  \begin{block}{}
    \begin{itemize}
    \item morally a translation of
      \myblue{\href{https://cp3.irmp.ucl.ac.be/projects/delphes}{\texttt{C++-Delphes}}}
      into \myblue{\href{https://golang.org}{\texttt{Go}}}

    \item a testbed for \texttt{R\&D} in
      \myblue{\href{https://golang.org}{\texttt{Go}}} and concurrent
      frameworks

      \item uses
        \myblue{\href{https://github.com/go-hep/fwk}{\texttt{go-hep/fwk}}}
        to expose, manage and harness concurrency into the usual
        \texttt{HEP} event loop (\texttt{initialize | process-events |
          finalize})
    \end{itemize}
  \end{block}

  \begin{block}{}
    Code is on \texttt{github} (\texttt{BSD-3}):
    \begin{itemize}
      \item \myblue{\href{https://github.com/go-hep/fwk}{\texttt{https://github.com/go-hep/fwk}}}
      \item \myblue{\href{https://github.com/go-hep/fads}{\texttt{https://github.com/go-hep/fads}}}
    \end{itemize}
  \end{block}

  \begin{block}{}
    Documentation is served by \myblue{\href{https://godoc.org}{\texttt{godoc.org}}}, Continuous Integration by \myblue{\href{https://drone.io/github.com/go-hep/fads/latest}{\texttt{drone.io}}}
        
    \begin{itemize}
    \item \myblue{\href{https://godoc.org/github.com/go-hep/fwk}{\texttt{https://godoc.org/github.com/go-hep/fwk}}}
    \item \myblue{\href{https://godoc.org/github.com/go-hep/fads}{\texttt{https://godoc.org/github.com/go-hep/fads}}}
    \end{itemize}
  \end{block}
}

\begin{frame}[fragile]
  \frametitle{\texttt{go-hep/fads} - Installation}

  \begin{block}{}
    As easy as:
\begin{minted}[]{sh}
$ export GOPATH=$HOME/dev/gocode
$ export PATH=$GOPATH/bin:$PATH

$ go get github.com/go-hep/fads/...
\end{minted}

    
  Yes, with the ellipsis at the end, to also install sub-packages.
  \end{block}

  \begin{block}{}
    \begin{itemize}
      \item \texttt{go get} will recursively download and install all
        the packages that
        \myblue{\href{https://github.com/go-hep/fads}{\texttt{go-hep/fads}}}
        depends on. (no \texttt{Makefile} needed)

      \item you get a \myred{statically linked} executable in a matter
        of seconds (even for large projects)
      \item \myred{simple} deployment and distribution
      \item the \mypurple{speed} of development of \texttt{python}
        with the \mypurple{speed} of execution of \texttt{C++}
    \end{itemize}
  \end{block}
\end{frame}

\frame{
  \frametitle{\texttt{go-hep/fwk} - Concurrency}
  \begin{block}{}
    \myblue{\href{https://github.com/go-hep/fwk}{\texttt{go-hep/fwk}}}
    enables:
    \begin{itemize}
    \item event-level concurrency
      \item tasks-level concurrency
    \end{itemize}
  \end{block}

\quad\\
 \myblue{\href{https://github.com/go-hep/fwk}{\texttt{go-hep/fwk}}}
  relies on \myblue{\href{https://golang.org}{\texttt{Go}}}'s runtime
  to properly schedule \mypurple{goroutines}.

\quad\\
 For sub-task concurrency, users are by construction required
    to use \myblue{\href{https://golang.org}{\texttt{Go}}}'s
    constructs (\texttt{goroutines} and \texttt{channels}) so
    everything is consistent \myred{and} the \mypurple{runtime} has
    the \myred{complete picture}.

    \begin{exampleblock}{}
      \emph{Note:} \myblue{\href{https://golang.org}{\texttt{Go}}}'s
      runtime isn't yet \texttt{NUMA}-aware.\\
      A proposal for \texttt{Go-1.5} (June-2015) is in the \myblue{\href{https://docs.google.com/document/d/1d3iI2QWURgDIsSR6G2275vMeQ_X7w-qxM2Vp7iGwwuM/pub}{\texttt{works}}}
    \end{exampleblock}
}

\begin{frame}[fragile]
  \frametitle{\texttt{go-hep/fads} - real world use case}

  \begin{block}{}
    \begin{itemize}
      \item translated
        \myblue{\href{https://cp3.irmp.ucl.ac.be/projects/delphes}{\texttt{C++-Delphes}}}'
        \textsc{Atlas} data-card into \texttt{Go}
      \item
        \myblue{\href{https://github.com/go-hep/fads/blob/master/cmd/fads-app/main.go}{\texttt{go-hep/fads-app}}}
      \item installation:
        \begin{minted}[]{sh}
$ go get github.com/go-hep/fads/cmd/fads-app
$ fads-app -help
Usage: fads-app [options] <hepmc-input-file>

ex:
 $ fads-app -l=INFO -evtmax=-1 ./testdata/hepmc.data

options:
  -cpu-prof=false: enable CPU profiling
  -evtmax=-1: number of events to process
  -l="INFO": log level (DEBUG|INFO|WARN|ERROR)
  -nprocs=0: number of concurrent events to process
        \end{minted}
    \end{itemize}
  \end{block}
\end{frame}

\frame{
  \frametitle{\texttt{go-hep/fads} - components}

  \begin{block}{}
    \begin{itemize}
      \item a \texttt{HepMC} converter
      \item  particle propagator
      \item  calorimeter simulator
      \item  energy rescaler, momentum smearer
      \item  isolation
      \item  b-tagging, tau-tagging
      \item  jet-finder (reimplementation of FastJet in Go: \myblue{\href{https://github.com/go-hep/fastjet}{\texttt{go-hep/fastjet}}})
      \item  histogram service (from \myblue{\href{https://github.com/go-hep/fwk}{\texttt{go-hep/fwk}}})

    \end{itemize}
  \end{block}

  \begin{exampleblock}{}
    Caveats:
    \begin{itemize}
      \item no real persistency to speak of (\emph{ie:} \texttt{JSON},
        \texttt{ASCII} and \texttt{Gob})

        \item jet clustering limited to $N^3$ (slowest and dumbest
          scheme of \texttt{C++-FastJet})
    \end{itemize}
  \end{exampleblock}
}

\frame{
\begin{center}
\includegraphics[width=0.95\linewidth]{figs/fads-dflow.png}
\end{center}
}

\frame{
  \frametitle{Performances - testbenches}
  \begin{block}{}
    \begin{itemize}
      \item Linux: Intel(R) Core(TM)2 Duo CPU @ 2.53GHz, 4GB RAM, 2 cores
      \item MacOSX-10.6: Intel(R) Xeon(R) CPU @ 2.27GHz, 172GB RAM, 16 cores
      \item Linux: Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz, 40 cores

    \end{itemize}
  \end{block}
}

\frame{
  \frametitle{Linux (40 cores) testbench: memory}
\begin{center}
\includegraphics[width=0.95\linewidth]{figs/lhcb3-rss.png}
\end{center}
}

\frame{
  \frametitle{Linux (40 cores) testbench: event throughput}
\begin{center}
\includegraphics[width=0.95\linewidth]{figs/lhcb3-hz.png}
\end{center}
}

\frame{
  \begin{center}
    \begin{block}{}
      \begin{center}
        \texttt{go-hep}
      \end{center}
    \end{block}
  \end{center}
}

\frame{
  \frametitle{\texttt{go-hep} project}

  A set of pure-\texttt{Go} or bindings to \texttt{HEP} libraries

  \begin{block}{}
    \begin{itemize}
      \item \myblue{\href{https://github.com/go-hep/fads}{\texttt{go-hep/fads}}}: fast detector simulation toolkit
      \item \myblue{\href{https://github.com/go-hep/fastjet}{\texttt{go-hep/fastjet}}}: jet clustering algorithms (\emph{WIP})
      \item \myblue{\href{https://github.com/go-hep/fmom}{\texttt{go-hep/fmom}}}: 4-vectors
      \item \myblue{\href{https://github.com/go-hep/fwk}{\texttt{go-hep/fwk}}}: concurrent framework

      \item \myblue{\href{https://github.com/go-hep/hbook}{\texttt{go-hep/hbook}}}: histograms and n-tuples (\emph{WIP})
      \item \myblue{\href{https://github.com/go-hep/hplot}{\texttt{go-hep/hplot}}}: interactive plotting (\emph{WIP})
      \item \myblue{\href{https://github.com/go-hep/hepmc}{\texttt{go-hep/hepmc}}}: \texttt{HepMC} in \texttt{Go} (EDM + \texttt{I/O})

    \end{itemize}
  \end{block}
}

\frame{
  \frametitle{\texttt{go-hep} + \texttt{astrogo} projects}

  \begin{block}{}
    \begin{itemize}
    \item \myblue{\href{https://github.com/go-hep/hepevt}{\texttt{go-hep/hepevt}}}: \texttt{HEPEVT} bindings
    \item \myblue{\href{https://github.com/go-hep/heppdt}{\texttt{go-hep/heppdt}}}: \texttt{HEP} particle data table
    \item \myblue{\href{https://github.com/go-hep/lhef}{\texttt{go-hep/lhef}}}: Les Houches Event File format
      
    \item \myblue{\href{https://github.com/go-hep/croot}{\texttt{go-hep/croot}}}: bindings to a subset of \texttt{ROOT} \texttt{I/O}
    \item \myblue{\href{https://github.com/go-hep/rio}{\texttt{go-hep/rio}}}: \texttt{go-hep} record oriented \texttt{I/O}
    \item \myblue{\href{https://github.com/go-hep/sio}{\texttt{go-hep/sio}}}: \texttt{LCIO} \texttt{I/O}
    \item \myblue{\href{https://github.com/go-hep/slha}{\texttt{go-hep/slha}}}: \texttt{SUSY} Les Houches Accord \texttt{I/O}
      
\quad\\
    \item \myblue{\href{https://github.com/astrogo/cfitsio}{\texttt{astrogo/cfitsio}}}: bindings to \texttt{FITSIO}
    \item \myblue{\href{https://github.com/astrogo/fitsio}{\texttt{astrogo/fitsio}}}: pure \texttt{Go} \texttt{I/O} for \texttt{FITS} files
    \item \myblue{\href{https://github.com/astrogo/vo}{\texttt{astrogo/vo/votable}}}: \texttt{I/O} for \texttt{VOTable} (\emph{WIP})
      
\quad\\
    \item \myblue{\href{https://github.com/sbinet/go-hdf5}{\texttt{sbinet/hdf5}}}: bindings to \texttt{HDF5}
    \end{itemize}
  \end{block}
}

\frame{
  \frametitle{\texttt{go-hep} \& HSF}
  \begin{block}{}
Most of development workflow already addressed (doc, CI, DVCS)

HSF could provide (from \myblue{\href{https://github.com/go-hep}{\texttt{go-hep}}} POV):

\begin{itemize}
  \item wider audience (users, developers)
  \item  test machines/architectures
  \item  storage area for input data (for tests) and/or (binary) releases
  \item  agreement on \mypurple{cross-language} interoperability (file formats, data layout (\texttt{POD})) in a \mypurple{non pure-\texttt{C++}} environment
\end{itemize}
  \end{block}
}
\end{document}