Skip to content
Snippets Groups Projects
Commit f1792e83 authored by Mathieu Peybernes's avatar Mathieu Peybernes
Browse files

Merge branch 'master' of ssh://c4science.ch/source/SCM-lecture

parents 5154eae7 82778d6f
No related branches found
No related tags found
No related merge requests found
......@@ -108,6 +108,32 @@
left=\dimexpr\minted@auto@numwidth{+1}\relax,
}}
\tcbset{bash/.style={
colframe=black!70,
listing engine=minted,
listing only,
minted style=emacs,
minted language=bash,
size=fbox,
breakable,
enhanced,
minted options={
autogobble=true,
linenos,
breaklines=true,
breakbefore=.,
numbersep=2mm,
escapeinside=||,
},
overlay={%
\begin{tcbclipinterior}
\fill[gray!25] (frame.south west) rectangle ([xshift=\dimexpr\minted@auto@numwidth{}\relax]frame.north west);
\end{tcbclipinterior}
},
% in "left", \c@verbatim@cnt is not stepped yet, hence the argument "+1"
left=\dimexpr\minted@auto@numwidth{+1}\relax,
}}
% \EscMintinline[options]{<language>}{<backslash-escaped text>}
\def\EscMintinline{%
\FVExtraRobustCommand
......@@ -179,6 +205,16 @@
#1
}
\newtcbinputlisting{bashfile}[2][]{%
bash,
minted options app={
fontsize=\small,
},
listing file={#2},
% width=80ex,
#1
}
\newcommand{\bashinline}[1]{\EscMintinline{bash}{#1}}
\newcommand{\cxxinline}[1]{\EscMintinline{C++}{#1}}
\newcommand{\cmd}[1]{\EscMintinline[style=colorful]{console}{#1}}
%newmintinline[cmd]{console}{style=colorful,autogobble}
......
......@@ -55,11 +55,11 @@
\begin{frame}
\frametitle{Compilation}
\framesubtitle{Compilation options}
Many compilation options can be used to display more informations such as:
Many compilation options can be used to manipulate, optimize or debug such as:
\begin{itemize}
\item "Manipulation": \cmd{-o}, \cmd{-c}, etc.
\item "Debug": \cmd{-g}, \cmd{-traceback} (gcc), etc.
\item "Optimization": \cmd{-On}, \cmd{-fastmath}, etc.
\item "Debug": \cmd{-g}, \cmd{-traceback} (gcc), etc.
\item Option summary for GNU: \url{https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html\#Option-Summary}
\end{itemize}
\end{frame}
......@@ -76,6 +76,17 @@
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Compilation}
\framesubtitle{Exercise compilationWith2Files}
\begin{itemize}
\item Go to the directory \cmd{compilationWith2Files}
\item The previous code has been splitted into two files: \cmd{main.F90} and \cmd{saxpy.F90}
\item compile and execute the code
\item Check the results compared to the \cmd{simpleCompilation} exercise
\end{itemize}
\end{frame}
\begin{frame}[t,fragile]
\frametitle{Compilation}
\framesubtitle{Link to libraries}
......@@ -115,9 +126,9 @@
\framesubtitle{Exercise compilationWithLibrary}
\begin{itemize}
\item Go to the directory \cmd{compilationWithLibrary}
\item Compile the code \cmd{main.F90} with library \cmd{libsaxpy.so}
\item Compile the code \cmd{main.F90} with shared library \cmd{libsaxpy.so}
\item Execute the code
\item Check the results according to exercise \cmd{simpleCompilation}
\item Check the results according to the solution of exercise \cmd{simpleCompilation}
\end{itemize}
\end{frame}
......@@ -243,6 +254,14 @@ prepend_path("INCLUDE","/ssoft/spack/arvine/v1/opt/spack/linux-rhel7-skylake_avx
\item Cmake
\end{itemize}
\end{frame}
\begin{frame}[t,fragile]
\frametitle{Compilation}
\framesubtitle{Makefile example}
\bashfile[title={examples/compilationWithMakefile/Makefile}]{examples/compilationWithMakefile/Makefile}
% minted options app={firstline=1,
% lastline=40}]{examples/compilationWithMakefile}
\end{frame}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "../../SCM_slides"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment