\framesubtitle{A tool to organize your environment}
\begin{itemize}
\item HPC clusters are particular because many software and versions of
them are installed alongside
\item We need a tool to make the software easily available to everyone
\item The main tools used today are \cmd{environment-modules} and \cmd{Lmod}
\item At SCITAS, we chose \cmd{Lmod} (we'll see later why)
\end{itemize}
\pause
\vfill
\begin{itemize}
\item Those tools package different software and their configurations into
\textit{modules}
\item When you need to use a software, you need to \textit{load} the
corresponding module
\item Examples of (made-up) modules:
\begin{itemize}
\item \cmd{intel-19.0.2}: provides Intel compiler version 19.0.2
\item \cmd{data-analysis}: provides tools for data-analysis such as
Python with different packages, and Matlab
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Software modules}
\framesubtitle{Quick tutorial}
\begin{itemize}
\item Lmod is called using the \cmd{module} command followed by an action:
\begin{itemize}
\item \cmd{avail}: print a list of available modules
\item \cmd{load/unload <modules>}: load/unload the \cmd{<modules>}
\item \cmd{purge}: unload all modules
\item \cmd{swap <module1> <module2>}: swap \cmd{<module1>} for \cmd{<module2>}
\item \cmd{list}: print a list of currently loaded modules
\item \cmd{spider <module>}: print all possible versions of \cmd{<module>}
\item \cmd{show}: print the module configuration
\item \cmd{save/restore <name>}: save/restore current module collection under \cmd{<name>}
\item \cmd{help}: print help
\end{itemize}
\item Many of those commands are also available in \cmd{environment-modules}
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Software modules}
\framesubtitle{Lmod main strength}
\begin{itemize}
\item Lmod supports a hierarchical software stack
\item When you switch a module, it will automatically reload the ones
depending on it
\item You need to load a compiler, and an MPI and BLAS implementation to
have access to all modules
\end{itemize}
\end{frame}
\note{
\begin{itemize}
\item Demo time !
\item Module avail to see available modules. Not all are present.
\item Load a compiler, avail, mpi, avail, BLAS, avail
\item Change compiler version
\item Save, purge, restore
\item Spider
\item Introduce ml
\end{itemize}
}
\subsection{Compilation}
\label{sec:compilation}
\begin{frame}
\frametitle{Compilation}
\framesubtitle{0100101110101001010...}
\begin{itemize}
\item A computer only understands ON and OFF states (1 and 0)
\item It would be very inconvenient for us to code in binary
\item We therefore use different levels of abstraction (languages), e.g. C, C++, Fortran
\item We need a translator!
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Compilation}
\framesubtitle{The four compilation steps}
\begin{itemize}
\item Translation is made by a compiler in 4 steps
\begin{description}
\item[Preprocessing] Format source code to make it ready for compilation (remove comments, execute preprocessing directives such as \cxxinline{\#include}, etc.)
\item[Compiling] Translate the source code (C, C++, Fortran, etc) into assembly, a very basic CPU-dependent language
\item[Assembly] Translate the assembly into machine code and store it in object files
\item[Linking] Link all the object files into one executable
\end{description}
\item In practice, the first three steps are combined together and simply
called ``compiling''
\end{itemize}
\end{frame}
\begin{frame}[t,fragile]
\frametitle{Compilation}
\framesubtitle{The four compilation steps (visually)}
\hspace{6cm}
\begin{minipage}{0.5\textwidth}
\begin{itemize}
\item<5> Note that in reality, everything is done transparently