|
| 1 | +\documentclass{beamer} |
| 2 | +\usetheme{Madrid} |
| 3 | +\beamertemplatenavigationsymbolsempty |
| 4 | +\setbeamertemplate{blocks}[rounded][shadow=true] |
| 5 | + |
| 6 | +\usepackage{listings} |
| 7 | + |
| 8 | +\usepackage{amssymb} |
| 9 | +\usepackage{amsmath} |
| 10 | + |
| 11 | +\definecolor{mygreen}{rgb}{0,0.6,0} |
| 12 | + |
| 13 | +\lstset{ |
| 14 | + basicstyle=\footnotesize, |
| 15 | + breakatwhitespace=false, |
| 16 | + breaklines=false, |
| 17 | + captionpos=b, |
| 18 | + commentstyle=\color{blue}, |
| 19 | + extendedchars=true, |
| 20 | + keepspaces=true, |
| 21 | + keywordstyle=\color{mygreen}, |
| 22 | + language=Fortran, |
| 23 | + numbers=left, |
| 24 | + numbersep=2pt, |
| 25 | + numberstyle=\tiny\color{gray}, |
| 26 | + rulecolor=\color{black}, |
| 27 | + showspaces=false, |
| 28 | + showstringspaces=false, |
| 29 | + showtabs=false, |
| 30 | + stepnumber=1, |
| 31 | + tabsize=2, |
| 32 | + title=\lstname |
| 33 | +} |
| 34 | + |
| 35 | +\usepackage{setspace} |
| 36 | +\setstretch{1.5} |
| 37 | + |
| 38 | +\title{Fortran Standard Library} |
| 39 | +\author[]{Jeremie Vandenplas\\[3mm] |
| 40 | +Bálint Aradi, |
| 41 | +Izaak Beekman, |
| 42 | +Ondrej Certik, |
| 43 | +Milan Curcic, |
| 44 | +Pierre de Buyl, |
| 45 | +Juan Fiol, |
| 46 | +Michael Hirsch, |
| 47 | +Ivan Pribec, |
| 48 | +Nathaniel Shaffer} |
| 49 | +\date{July 2, 2020} |
| 50 | + |
| 51 | +\begin{document} |
| 52 | +\begin{frame}[t] |
| 53 | + \titlepage |
| 54 | +\end{frame} |
| 55 | + |
| 56 | +\begin{frame}[c]{Fortran Standard} |
| 57 | + \begin{itemize} |
| 58 | + \item Published by the International Organization for Standardization (ISO) |
| 59 | + \item Limited set of intrinsic procedures |
| 60 | + \item Possibility to add new intrinsic procedures and modules |
| 61 | + \begin{itemize} |
| 62 | + \item After standardization and implementation in compilers |
| 63 | + \end{itemize} |
| 64 | + \item No Standard Library |
| 65 | + \begin{itemize} |
| 66 | + \item Several attempts in the past (e.g. available on GitHub) |
| 67 | + \end{itemize} |
| 68 | + \end{itemize} |
| 69 | + \center |
| 70 | + \textcolor{red}{\textbf{Consequence: we all reinvent the wheel continuously!}} |
| 71 | +\end{frame} |
| 72 | + |
| 73 | + |
| 74 | +\begin{frame}[c]{Aim} |
| 75 | + \center |
| 76 | + \Large |
| 77 | + \textcolor{blue}{Develop} and \textcolor{blue}{provide}\\ |
| 78 | + a \textcolor{blue}{community} driven and agreed-upon de facto\\ |
| 79 | + \textcolor{blue}{standard library}\\ |
| 80 | + for Modern Fortran |
| 81 | +\end{frame} |
| 82 | + |
| 83 | + |
| 84 | +\begin{frame}[c]{Fortran Standard Library - stdlib} |
| 85 | + \Large |
| 86 | + \begin{itemize} |
| 87 | + \item One of the four pillars of \textcolor{blue}{fortran-lang} |
| 88 | + \item \textcolor{blue}{MIT} License |
| 89 | + \item Aims to \textcolor{mygreen}{collaborate} with the \textcolor{blue}{Fortran Standard Committee} |
| 90 | + \item Links: |
| 91 | + \begin{itemize} |
| 92 | + \item GitHub: https://github.com/fortran-lang/stdlib |
| 93 | + \item API docs: https://stdlib.fortran-lang.org |
| 94 | + \end{itemize} |
| 95 | + \end{itemize} |
| 96 | +\end{frame} |
| 97 | + |
| 98 | + |
| 99 | +\begin{frame}[t]{General scope} |
| 100 | + Similar to \textcolor{blue}{SciPy} or |
| 101 | + to the default built-in \textcolor{blue}{Matlab scientific environment} |
| 102 | + |
| 103 | + \textcolor{mygreen}{Three} topics |
| 104 | + \begin{itemize} |
| 105 | + \item \textcolor{blue}{Algorithms} |
| 106 | + \begin{itemize} |
| 107 | + \item Merging, searching, sorting, ... |
| 108 | + \end{itemize} |
| 109 | + \item \textcolor{blue}{Mathematics} |
| 110 | + \begin{itemize} |
| 111 | + \item Linear algebra, sparse matrices, special functions, fast Fourier transform, random numbers, statistics, ordinary differential equations, numerical integration, optimization, ... |
| 112 | + \end{itemize} |
| 113 | + \item \textcolor{blue}{Utilities} |
| 114 | + \begin{itemize} |
| 115 | + \item Containers, strings, files, OS/environment integration, unit testing, assertions, logging, ... |
| 116 | + \end{itemize} |
| 117 | + \end{itemize} |
| 118 | +\end{frame} |
| 119 | + |
| 120 | + |
| 121 | +\begin{frame}[c]{Current state of stdlib} |
| 122 | + %https://github.com/fortran-lang/stdlib\\ |
| 123 | + Since \textcolor{blue}{December 2019} on GitHub: |
| 124 | + \begin{itemize} |
| 125 | + \item \textcolor{blue}{Issues / ideas / comments} |
| 126 | + \begin{itemize} |
| 127 | + \item 47 contributors |
| 128 | + \item $>$ 110 GitHub issues |
| 129 | + \end{itemize} |
| 130 | + \item \textcolor{blue}{Source codes} |
| 131 | + \begin{itemize} |
| 132 | + \item 16 contributors |
| 133 | + \item $>$ 100 Pull Requests |
| 134 | + \end{itemize} |
| 135 | + \end{itemize} |
| 136 | +\end{frame} |
| 137 | + |
| 138 | + |
| 139 | +\begin{frame}[c]{Currently discussed} |
| 140 | + Several discussions on: |
| 141 | + \begin{columns} |
| 142 | + \begin{column}{0.5\textwidth} |
| 143 | + \begin{itemize} |
| 144 | + \item Assertion |
| 145 | + \item Logging |
| 146 | + \item OS integration |
| 147 | + \item Random numbers |
| 148 | + \end{itemize} |
| 149 | + \end{column} |
| 150 | + \begin{column}{0.5\textwidth} |
| 151 | + \begin{itemize} |
| 152 | + \item Sparse matrices |
| 153 | + \item Special functions |
| 154 | + \item Strings |
| 155 | + \item ... |
| 156 | + \end{itemize} |
| 157 | + \end{column} |
| 158 | + \end{columns} |
| 159 | +\end{frame} |
| 160 | + |
| 161 | + |
| 162 | +\begin{frame}[c]{Currently implemented in stdlib} |
| 163 | + \begin{block}{~\vspace{0.5cm}} |
| 164 | + \vspace{-0.8cm} |
| 165 | + \begin{tabular}{ccc} |
| 166 | + \textcolor{white}{\bf Module} &\textcolor{white}{\bf Description} &\textcolor{white}{\bf \# procedures} \\ |
| 167 | + ascii & String manipulations & 16\\ |
| 168 | + error & Catching and handling errors & 2\\ |
| 169 | + io & Input/output helper and convenience & 3\\ |
| 170 | + kinds & Kind definition & -\\ |
| 171 | + linalg & Linear algebra & 3\\ |
| 172 | + optval & Fallback value for optional arguments & 1\\ |
| 173 | + quadrature & Numerical integration & 4\\ |
| 174 | + stats & Descriptive statistics & 5\\ |
| 175 | + system & OS utilities & 1 \\ |
| 176 | + \end{tabular} |
| 177 | + \end{block} |
| 178 | +\end{frame} |
| 179 | + |
| 180 | + |
| 181 | +\begin{frame}[c]{Currently implemented in stdlib} |
| 182 | + Support of \textcolor{blue}{any rank} (up to 15) and \textcolor{blue}{any kind} |
| 183 | + (\textcolor{mygreen}{integer}, \textcolor{mygreen}{real}, \textcolor{mygreen}{complex}) |
| 184 | + \begin{itemize} |
| 185 | + \item When appropriate |
| 186 | + \item \textcolor{blue}{Meta-programming} |
| 187 | + \begin{itemize} |
| 188 | + \item \textit{fypp} = Python powered preprocessor |
| 189 | + \end{itemize} |
| 190 | + \item E.g., for the function `mean`: 600 auto-generated functions |
| 191 | + \end{itemize} |
| 192 | +\end{frame} |
| 193 | + |
| 194 | +\begin{frame}[fragile]{Example - \textit{optval} + \textit{fypp}} |
| 195 | + |
| 196 | + \begin{lstlisting} |
| 197 | + #:set KINDS_TYPES = REAL_KINDS_TYPES + INT_KINDS_TYPES + & |
| 198 | + & CMPLX_KINDS_TYPES + [('l1','logical')] |
| 199 | + ... |
| 200 | + #:for k1, t1 in KINDS_TYPES |
| 201 | + pure elemental function optval_${t1[0]}$${k1}$(x, default)& |
| 202 | + result(y) |
| 203 | + ${t1}$, intent(in), optional :: x |
| 204 | + ${t1}$, intent(in) :: default |
| 205 | + ${t1}$ :: y |
| 206 | + ... |
| 207 | + end function optval_${t1[0]}$${k1}$ |
| 208 | + #:endfor\end{lstlisting} |
| 209 | + |
| 210 | +\end{frame} |
| 211 | + |
| 212 | + |
| 213 | +\begin{frame}[fragile]{Example - \textit{optval}} |
| 214 | + \begin{lstlisting} |
| 215 | + ... |
| 216 | + use stdlib_experimental_optval, only: optval |
| 217 | + ... |
| 218 | + real function root(x, n) |
| 219 | + real, intent(in) :: x |
| 220 | + integer, intent(in), optional :: n |
| 221 | + root = x**(1.0/optval(n, 2)) |
| 222 | + end function |
| 223 | + ... \end{lstlisting} |
| 224 | +\end{frame} |
| 225 | + |
| 226 | + |
| 227 | +\begin{frame}[fragile]{Examples} |
| 228 | + \begin{lstlisting} |
| 229 | + ... |
| 230 | + use stdlib_experimental_io, only: loadtxt, savetxt |
| 231 | + use stdlib_experimental_linalg, only: diag |
| 232 | + use stdlib_experimental_stats, only: moment |
| 233 | + ... |
| 234 | + real, allocatable :: A(:,:) |
| 235 | + call loadtxt('example.dat', A) |
| 236 | + ... |
| 237 | + print*, diag(A) |
| 238 | + ... |
| 239 | + call savetxt('moment.dat',& |
| 240 | + moment(A, order = 3, dim = 1, mask = (A > 5.))) |
| 241 | + ... \end{lstlisting} |
| 242 | +\end{frame} |
| 243 | + |
| 244 | + |
| 245 | +\begin{frame}[c]{API docs (https://stdlib.fortran-lang.org)} |
| 246 | + \begin{center} |
| 247 | + \includegraphics[width=0.9\textwidth]{apidocsstdlib} |
| 248 | + \end{center} |
| 249 | +\end{frame} |
| 250 | + |
| 251 | + |
| 252 | +\begin{frame}[c]{API docs (https://stdlib.fortran-lang.org)} |
| 253 | + Automatically generated by \textcolor{blue}{FORD} %https://github.com/Fortran-FOSS-Programmers/ford |
| 254 | + \begin{itemize} |
| 255 | + \item Source codes |
| 256 | + \item \textcolor{blue}{Markdown specs} for all procedures |
| 257 | + \begin{itemize} |
| 258 | + \item \textit{Description} |
| 259 | + \item \textit{Syntax} |
| 260 | + \item \textit{Arguments} |
| 261 | + \item \textit{Output} / \textit{Return value} |
| 262 | + \item \textit{Example(s)} |
| 263 | + \end{itemize} |
| 264 | + \end{itemize} |
| 265 | + |
| 266 | +\end{frame} |
| 267 | + |
| 268 | + |
| 269 | +\begin{frame}[c]{How to contribute to stdlib?} |
| 270 | + \begin{center} |
| 271 | + \Huge{\textcolor{red}{Any contribution is welcome!}} |
| 272 | + \end{center} |
| 273 | +\end{frame} |
| 274 | + |
| 275 | +\begin{frame}[c]{How to contribute to stdlib?} |
| 276 | + \textcolor{blue}{Through GitHub}\\ |
| 277 | + \begin{itemize} |
| 278 | + \item \textcolor{mygreen}{Issues} |
| 279 | + \begin{itemize} |
| 280 | + \item Proposition of ideas, issues, comments |
| 281 | + \end{itemize} |
| 282 | + \item \textcolor{mygreen}{Pull Requests} |
| 283 | + \begin{itemize} |
| 284 | + \item To contribute to the source code and specs |
| 285 | + \item Might be based on existing contributors' code (License!) |
| 286 | + \end{itemize} |
| 287 | + \end{itemize} |
| 288 | + \textcolor{blue}{Code of Conduct}\\ |
| 289 | + \begin{itemize} |
| 290 | + \item Please check it first! |
| 291 | + \end{itemize} |
| 292 | +\end{frame} |
| 293 | + |
| 294 | +\begin{frame}[c]{Contributing to the source code?} |
| 295 | + \textcolor{blue}{Workflow} (See the complete description on GitHub) |
| 296 | + \begin{enumerate} |
| 297 | + \item Proposition of an \textbf{idea} |
| 298 | + \item Proposition of the \textbf{API} |
| 299 | + \item Discussion of the \textbf{specs} |
| 300 | + \item Pull request of an \textbf{implementation} in the experimental namespace + associated unit tests |
| 301 | + \item Stable \textbf{release} of procedures in the experimental namespace (still to be clarified) |
| 302 | + \end{enumerate} |
| 303 | +\end{frame} |
| 304 | + |
| 305 | + |
| 306 | +\begin{frame}[c]{Thank you to all contributors!} |
| 307 | + \begin{columns} |
| 308 | + \begin{column}{0.33\textwidth} |
| 309 | + \begin{center} |
| 310 | + Bálint Aradi\\ |
| 311 | + Izaak Beekman\\ |
| 312 | + Neil Carlson\\ |
| 313 | + Ondrej Certik\\ |
| 314 | + Milan Curcic\\ |
| 315 | + Pierre de Buyl\\ |
| 316 | + \end{center} |
| 317 | + \end{column} |
| 318 | + \begin{column}{0.33\textwidth} |
| 319 | + \begin{center} |
| 320 | + Martien Diehl\\ |
| 321 | + Juan Fiol\\ |
| 322 | + J. Henneberg\\ |
| 323 | + Michael Hirsch\\ |
| 324 | + Ivan Pribec\\ |
| 325 | + Yuichiro Sakamoto\\ |
| 326 | + \end{center} |
| 327 | + \end{column} |
| 328 | + \begin{column}{0.33\textwidth} |
| 329 | + \begin{center} |
| 330 | + Nathaniel Shaffer\\ |
| 331 | + Pedro Costa\\ |
| 332 | + Jeremie Vandenplas\\ |
| 333 | + Ashwin Vishnu\\ |
| 334 | + \end{center} |
| 335 | + \end{column} |
| 336 | + \end{columns} |
| 337 | + \begin{center} |
| 338 | + \textcolor{mygreen}{Also to all contributors who opened and commented issues/PR on GitHub!} |
| 339 | + \end{center} |
| 340 | +\end{frame} |
| 341 | + |
| 342 | +\begin{frame}[c]{} |
| 343 | + \centering \Huge |
| 344 | + \emph{Thank you!} |
| 345 | +\end{frame} |
| 346 | + |
| 347 | +\end{document} |
0 commit comments