[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/10: talks: fosdem-2017/hpc: Incorporate Pjotr's part.
From: |
Ludovic Courtès |
Subject: |
02/10: talks: fosdem-2017/hpc: Incorporate Pjotr's part. |
Date: |
Sun, 5 Feb 2017 12:00:17 +0000 (UTC) |
civodul pushed a commit to branch master
in repository maintenance.
commit 255fa874b0d9b2195fe93549ec5da10a15f1bef6
Author: Ludovic Courtès <address@hidden>
Date: Thu Feb 2 23:46:20 2017 +0100
talks: fosdem-2017/hpc: Incorporate Pjotr's part.
---
.gitignore | 1 +
talks/fosdem-2017/hpc/outline.org | 3 +
talks/fosdem-2017/hpc/section2.tex | 164 ++++++++++++++++++++++++++++++++++++
talks/fosdem-2017/hpc/talk.tex | 33 +++++++-
4 files changed, 197 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 824224e..27413cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -102,3 +102,4 @@
/talks/fosdem-2017/hpc/talk.snm
/talks/fosdem-2017/hpc/talk.toc
/talks/fosdem-2017/hpc/talk.vrb
+/talks/fosdem-2017/hpc/section2.tex.aux
diff --git a/talks/fosdem-2017/hpc/outline.org
b/talks/fosdem-2017/hpc/outline.org
index 374cbc4..3505152 100644
--- a/talks/fosdem-2017/hpc/outline.org
+++ b/talks/fosdem-2017/hpc/outline.org
@@ -1,5 +1,8 @@
#+TITLE: Optimized & Reproducible HPC Software Deployment
+https://fosdem.org/2017/schedule/event/hpc_deployment_guix/
+Sat. 11:30, H.2213
+
* current HPC software environments are broken
** distros are old and inflexible, not upgraded
** thus, sysadmins write their own modules
diff --git a/talks/fosdem-2017/hpc/section2.tex
b/talks/fosdem-2017/hpc/section2.tex
new file mode 100644
index 0000000..32aad77
--- /dev/null
+++ b/talks/fosdem-2017/hpc/section2.tex
@@ -0,0 +1,164 @@
+%% \begin{frame}{The stated problem}
+%% \begin{itemize}
+%% \item HPC environments generally run old software (kernel, glibc, build
tools)
+%% \item Newer software is installed through other routes
+%% \item Software targeting architectures such as Intel PHI require cross
compilation
+%% \end{itemize}
+%% \end{frame}
+
+%% \begin{frame}{Supercomputer}
+%% \begin{itemize}
+%% \item \emph{Propriety} Intel/NVIDIA/Oracle software is up-to-date
+%% \item Python, R, gcc and llvm tend to be out of date
+%% \item Modern languages Dlang, Go, Julia are not supported
+%% \item Also Openblas and OpenCL libraries may not be supported
+%% \item True on most HPC systems
+%% \end{itemize}
+%% \end{frame}
+
+%% \begin{frame}{FOSS}
+%% \begin{itemize}
+%% \item We are FOSS people - we want recent FOSS tools - how do we cope?
+%% \item Docker? Brew? Conda? From source?
+%% \item And, yes, we want reproducibility too
+%% \end{itemize}
+%% \end{frame}
+
+%% \begin{frame}{GNU Guix on HPC}
+%% \begin{itemize}
+%% \item Guix installs in a root mounted /gnu/store ...
+%% \item Allow for running a privileged Guix daemon?
+%% \item Perhaps allow for a mounted /gnu/store?
+%% \item If not, what to do?
+%% \item Answer: relocatable Guix
+%% \end{itemize}
+%% \end{frame}
+
+\begin{frame}[fragile]{Insight 1}
+ The first key insight: Guix store paths provide unique fingerprints:
+
+\small
+\begin{verbatim}
+/gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23/lib/libc.so
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]{Linked libraries}
+ \small
+ldd `which ldc2`
+\begin{verbatim}
+libconfig.so.9 /gnu/store/1v4an...-libconfig-1.5/lib/libconfig.so.9
+librt.so.1 /gnu/store/m9vxv...-glibc-2.23/lib/librt.so.1
+libdl.so.2 /gnu/store/m9vxv...-glibc-2.23/lib/libdl.so.2
+libpthread.so.0 /gnu/store/m9vxv...-glibc-2.23/lib/libpthread.so.0
+libz.so.1 /gnu/store/5992i...-zlib-1.2.8/lib/libz.so.1
+libm.so.6 /gnu/store/m9vxv...-glibc-2.23/lib/libm.so.6
+libstdc++.so.6 /gnu/store/9nifw...-gcc-4.9.3-lib/lib/libstdc++.so.6
+libgcc_s.so.1 /gnu/store/9nifw...-gcc-4.9.3-lib/lib/libgcc_s.so.1
+libc.so.6 /gnu/store/m9vxv...-glibc-2.23/lib/libc.so.6
+ /gnu/store/m9vxv...-glibc-2.23/lib/ld-linux-x86-64.so.2
+\end{verbatim}
+\end{frame}
+
+\begin{frame}{Relocate}
+\begin{itemize}
+\item Guix binaries have unique fingerprints for PATHs
+\item Replace these with the target prefix
+\item Only dependency is the kernel
+\end{itemize}
+\end{frame}
+
+
+\begin{frame}[fragile]{After relocation}
+ \small
+ ldd $\sim$/opt/ldc-test/ldc-1.1.0-pk9rkm4zvdp6pglam7s2/bin/ldc2
+\begin{verbatim}
+qlibconfig.so.9 ~/opt/ldc-test/libconfig-1.5-1v4anv1.../lib/libconfig.so.9
+librt.so.1 ~/opt/ldc-test/glibc-2.23-m9vxvh.../lib/librt.so.1
+libdl.so.2 ~/opt/ldc-test/glibc-2.23-m9vxvh.../lib/libdl.so.2
+libpthread.so.0 ~/opt/ldc-test/glibc-2.23-m9vxvh.../lib/libpthread.so.0
+libz.so.1 ~/opt/ldc-test/zlib-1.2.8-5992iq1.../lib/libz.so.1
+libm.so.6 ~/opt/ldc-test/glibc-2.23-m9vxvh.../lib/libm.so.6
+libstdc++.so.6 ~/opt/ldc-test/gcc-4.9.3-lib-9nifwk7.../lib/libstdc++.so.6
+libgcc_s.so.1 ~/opt/ldc-test/gcc-4.9.3-lib-9nifwk7.../lib/libgcc_s.so.1
+libc.so.6 ~/opt/ldc-test/glibc-2.23-m9vxvh.../lib/libc.so.6
+ ~/opt/ldc-test/glibc-2.23-m9vxvh.../lib/ld-linux-x86-64.so.2
+\end{verbatim}
+\end{frame}
+
+\begin{frame}{What really happened here?}
+
+ \begin{itemize}
+ \item All Guix packages are isolated in the store
+ \item Path is a fingerprint, e.g.
\texttt{/gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23}
+ \item Scan all files and replace fingerprints with relative path
\texttt{$\sim$/opt/ldc-test/glibc-2.23-m9vxvhdj691bq1f85lpf}
+ \item First attempt by using Eelco Dolstra's Patchelf tool worked for shared
libs by rewriting \texttt{RPATH} in binaries
+ \end{itemize}
+\end{frame}
+
+\begin{frame}{Other files}
+ \begin{itemize}
+ \item Text files that reference the store can be rewritten (Ruby, Perl, bash
scripts)
+ \item Some formats are not zero-terminated (compiled Python and JVM files)
+ \item Also in ELF files there are references that are not zero-terminated
+ \item Solution: keep the file path at exactly the same length and patch all
+ \end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]{Insight 2}
+ The second key insight: if a path gets rewritten with the exact same size
+ string it will always work (unless there is encryption or some CRC checking)
+
+\small
+\begin{verbatim}
+/gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23/lib/libc.so
+/home/user/opt/ldc-test/glibc-2.23-m9vxvhdj691bq1f851p/lib/libc.so
+\end{verbatim}
+\end{frame}
+
+
+\begin{frame}{Same size patching}
+ \begin{enumerate}
+ \item start from store path, e.g.
+ \texttt{/gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23}
+ \item reverse the contents
+ \texttt{/gnu/store/glibc-2.23-m9vxvhdj691bq1f85lpflvnhcvrdilih}
+ \item overwrite with prefix and shorten the HASH value to match the same size
+ \texttt{/home/user/opt/ldc-test/glibc-2.23-m9vxvhdj691bq1f851p}
+ \item and replace in all files
+ \end{enumerate}
+\end{frame}
+
+\begin{frame}[fragile]{Example}
+ So, store path
+ \small
+\begin{verbatim}
+ /gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23/bin/ldc2
+
+ prefix /home/usr/opt/ldc-test/ becomes
+ /home/user/opt/ldc-test/glibc-2.23-m9vxvhdj691bq1f851p/bin/ldc2
+
+ prefix /usr/local/share/ldc-1.1.0/ becomes
+ /usr/local/share/ldc-1.1.0/glibc-2.23-m9vxvhdj691bq1f8/bin/ldc2
+\end{verbatim}
+Note: prefix can be up to $\sim 40$ letters long
+\end{frame}
+
+\begin{frame}{So far\ldots}
+ Successfully compiled and run
+\begin{itemize}
+\item ldc2 1.1.0: the LLVM D compiler
+\item ruby 2.3.0: with ssl and nokogiri
+\item sambamba: tool used in many sequencing HPCs around the world
+\item more to come, including OpenCL, R, Python and Julia
+\end{itemize}
+\end{frame}
+
+\begin{frame}{Cross compile}
+\begin{itemize}
+\item Install compilers that can cross compile binaries
+\item LLVM can output C code
+\item Provide GNU Guix packages for Intel PHI and NVIDIA TESLA
+\item GNU Guix has elegant support for different targets, including a build
farm for ARM, ...
+\end{itemize}
+\end{frame}
diff --git a/talks/fosdem-2017/hpc/talk.tex b/talks/fosdem-2017/hpc/talk.tex
index d91e010..50eb0ae 100644
--- a/talks/fosdem-2017/hpc/talk.tex
+++ b/talks/fosdem-2017/hpc/talk.tex
@@ -486,10 +486,12 @@
\setbeamercolor{normal text}{bg=guixblue2}
\begin{frame}
- \Huge{\textbf{Relocatable binaries (Pjotr).}}
+ \Huge{\textbf{Relocatable binaries.}}
\end{frame}
\setbeamercolor{normal text}{fg=white,bg=black}
+\input{section2.tex}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamercolor{normal text}{bg=guixblue2}
\begin{frame}[plain]
@@ -540,31 +542,54 @@
\end{frame}
\setbeamercolor{normal text}{fg=white,bg=black}
+\begin{frame}{Future}
+ Implications carry beyond HPC
+ \\
+ \begin{itemize}
+ \item Automated builds with testing for different architectures
+ \item Repository of binary packages
+ \item One-click installs: download and run \texttt{install.sh}
+ \item Ship software easily
+ \item Talking about a holy grail\ldots
+ \end{itemize}
+\end{frame}
+
\begin{frame}{Summary}
\Large{
\begin{itemize}
\item Guix supports \highlight{reproducible software environments}
\item ... allows for \highlight{experimentation} through customization
- \item relocation allows unprivileged Guix usage in HPC
+ \item relocation allows \highlight{unprivileged} Guix usage in HPC
\end{itemize}
}
\end{frame}
+\begin{frame}{Acknowledgements}
+\small
+\begin{itemize}
+\item Roel Janssen (@roelj), Dennis Mungai (@Brainiarc7), and Frederick
Muriithi (@fredmanglis) for helping with packaging D compilers, sambamba, Ruby
packages, OpenCL etc.
+%\item GNU Guix project leaders Ludovic Court\`{e}s and Ricardo Wurmus
+\item The GNU and GNU Guix communities (many, many talented individuals)
+\end{itemize}
+\end{frame}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[plain]
\vfill{
\vspace{2.5cm}
\center{\includegraphics[width=0.2\textwidth]{images/GuixSD}}\\[1.0cm]
- address@hidden://gnu.org/software/guix/}}}
+ %% address@hidden
+ \center{\alert{\url{https://gnu.org/software/guix/}}}
+ \\
}
-
\end{frame}
\begin{frame}{}
\begin{textblock}{12}(2, 8)
\tiny{
+ Copyright \copyright{} 2017 Pjotr Prins\\
Copyright \copyright{} 2010, 2012--2017 Ludovic Courtès address@hidden
GNU GuixSD logo, CC-BY-SA 4.0, \url{http://gnu.org/s/guix/graphics}
- branch master updated (d4843f4 -> c8c1e2a), Ludovic Courtès, 2017/02/05
- 09/10: talks: fosdem-2017/services: Add PDF., Ludovic Courtès, 2017/02/05
- 07/10: talks: fosdem-2017/hpc: Add PDF., Ludovic Courtès, 2017/02/05
- 10/10: Merge branch 'wip-fosdem', Ludovic Courtès, 2017/02/05
- 04/10: talks: fosdem-2017/hpc: Move status bits to the first part., Ludovic Courtès, 2017/02/05
- 05/10: talks: fosdem-2017/hpc: Update OpenHub stats., Ludovic Courtès, 2017/02/05
- 06/10: talks: fosdem-2017/hpc: Last-minute tweaks., Ludovic Courtès, 2017/02/05
- 02/10: talks: fosdem-2017/hpc: Incorporate Pjotr's part.,
Ludovic Courtès <=
- 08/10: talks: fosdem-2017/services: Morning tweaks., Ludovic Courtès, 2017/02/05
- 03/10: talks: fosdem-2017: Add services talk., Ludovic Courtès, 2017/02/05
- 01/10: talks: Add beginning of FOSDEM HPC talk., Ludovic Courtès, 2017/02/05