| 1 |
%* installation (deps, build/install procedure, making module/ml work) |
| 2 |
%* configuration (either via ./configure at build time, or via |
| 3 |
% $LMOD_FOO), most important configure options |
| 4 |
%* setting up the system spider cache: configuring Lmod, updating spider |
| 5 |
% cache, difference between system/user spider cache |
| 6 |
%* + all (other) aspects mentioned on slide #26 in this slide deck: |
| 7 |
% explained + example :) |
| 8 |
%* what settarg is all about |
| 9 |
|
| 10 |
\documentclass{beamer} |
| 11 |
|
| 12 |
\usetheme[headernav]{TACC} %%Drop the 'headernav' if you don't like |
| 13 |
%%the stuff at the top of your slide |
| 14 |
|
| 15 |
\usepackage{amsmath,amssymb,amsthm} |
| 16 |
\usepackage{alltt} |
| 17 |
\usepackage{graphicx} |
| 18 |
|
| 19 |
\title{Transitioning to Lmod} |
| 20 |
|
| 21 |
|
| 22 |
\author{Robert McLay} |
| 23 |
\institute{The Texas Advanced Computing Center} |
| 24 |
|
| 25 |
\date{January 28, 2014} %% Use this if you want to fix the date in |
| 26 |
%% stone rather than use \today |
| 27 |
|
| 28 |
\newcommand{\bfnabla}{\mbox{\boldmath$\nabla$}} |
| 29 |
\newcommand{\laplacian}[1]{\bfnabla^2 #1} |
| 30 |
\newcommand{\grad}[1]{\bfnabla #1} |
| 31 |
\newcommand{\tgrad}[1]{\bfnabla^T #1} |
| 32 |
\newcommand{\dvg}[1]{\bfnabla \cdot #1} |
| 33 |
\newcommand{\curl}[1]{\bfnabla \times #1} |
| 34 |
\newcommand{\lap}[1]{\bfnabla^2 #1} |
| 35 |
|
| 36 |
\begin{document} |
| 37 |
|
| 38 |
\begin{frame} |
| 39 |
\titlepage |
| 40 |
\end{frame} |
| 41 |
|
| 42 |
\section{Introduction} |
| 43 |
|
| 44 |
\begin{frame}{Transitioning to Lmod} |
| 45 |
\begin{itemize} |
| 46 |
\item What does Lmod offer? |
| 47 |
\item A transition strategy |
| 48 |
\item New features |
| 49 |
\end{itemize} |
| 50 |
\end{frame} |
| 51 |
|
| 52 |
|
| 53 |
\begin{frame}{Why You Might Want To Switch} |
| 54 |
\begin{itemize} |
| 55 |
\item Active Development; Frequent Releases; Bug fixes. |
| 56 |
\item Vibrant Community |
| 57 |
\item It is used from Norway to Isreal to New Zealand from Stanford to MIT to NASA |
| 58 |
\item Enjoy many capabilities w/o changing a single module file |
| 59 |
\item Debian and Fedora packages available |
| 60 |
\item Many more advantages when you're ready |
| 61 |
\end{itemize} |
| 62 |
\end{frame} |
| 63 |
|
| 64 |
\begin{frame}{Features requiring no changes to modulefiles} |
| 65 |
\begin{itemize} |
| 66 |
\item Reads TCL modulefiles directly (Cray modules supported) |
| 67 |
\item User default and named collections of modules |
| 68 |
\item Module cache system: Faster avail, spider, etc |
| 69 |
\item Tracking module usage |
| 70 |
\item A few edge cases where Env. Modules and Lmod differ |
| 71 |
\end{itemize} |
| 72 |
\end{frame} |
| 73 |
|
| 74 |
\begin{frame}{Features of Lmod with small changes to modulefiles} |
| 75 |
\begin{itemize} |
| 76 |
\item Family function: Prevent users from loading two compilers at |
| 77 |
the same time (experts can override) |
| 78 |
\item Properties: (MIC-aware, Beta, etc) |
| 79 |
\item Sticky modules |
| 80 |
\item ... |
| 81 |
\end{itemize} |
| 82 |
\end{frame} |
| 83 |
|
| 84 |
\begin{frame}{Lmod supports a software hierarchy} |
| 85 |
\begin{itemize} |
| 86 |
\item Lmod supports flat layout of modules |
| 87 |
\item Some really cool features if you have a software hierarchy |
| 88 |
\begin{itemize} |
| 89 |
\item Protecting users from mismatched modules |
| 90 |
\item Auto Swapping of Compiler and MPI dependent modules |
| 91 |
\end{itemize} |
| 92 |
\item When you are ready, it will be there |
| 93 |
\end{itemize} |
| 94 |
\end{frame} |
| 95 |
|
| 96 |
\section{A Transition Strategy} |
| 97 |
|
| 98 |
\begin{frame}{A Transition Strategy} |
| 99 |
\begin{itemize} |
| 100 |
\item Install Lmod in your account |
| 101 |
\item Staff \& Friendly Opt-in Testing |
| 102 |
\item Deploy to your users with an Opt-out choice |
| 103 |
\item Some users can run TCL/C modules |
| 104 |
\item Others can run Lmod |
| 105 |
\item No single user can run both at the same time! |
| 106 |
\end{itemize} |
| 107 |
\end{frame} |
| 108 |
|
| 109 |
\begin{frame}{Personal Testing of Lmod} |
| 110 |
\begin{itemize} |
| 111 |
\item Install it in your account |
| 112 |
\begin{itemize} |
| 113 |
\item Take current list and remove in reverse order to find |
| 114 |
required modules |
| 115 |
\item LMOD\_SYSTEM\_DEFAULT\_MODULES=mod1:mod2:mod3 |
| 116 |
\item \texttt{\bf \$ module purge;} |
| 117 |
\item Redefine module command to use Lmod |
| 118 |
\item \texttt{\bf \$ module restore;} |
| 119 |
\end{itemize} |
| 120 |
\item I normally run a personal copy of Lmod in all my accounts |
| 121 |
(including \texttt{\bf darter}, a Cray XC-30) |
| 122 |
\item Test, build a spider cache, module avail |
| 123 |
\item Module collections, ... |
| 124 |
\end{itemize} |
| 125 |
\end{frame} |
| 126 |
|
| 127 |
\begin{frame}{Staff \& Friendly User Testing} |
| 128 |
\begin{itemize} |
| 129 |
\item Install Lmod in system location. |
| 130 |
\item Install \emph{/etc/profile.d/z00\_lmod.sh} to redefine the |
| 131 |
\texttt{\bf module} cmd. |
| 132 |
\item Load system default modules (if any) after previous step |
| 133 |
\item Users who have a file named \texttt{$\sim$/.lmod} use Lmod |
| 134 |
\item At TACC we did this for 6 months |
| 135 |
\end{itemize} |
| 136 |
\end{frame} |
| 137 |
|
| 138 |
\begin{frame}{Deploy} |
| 139 |
\begin{itemize} |
| 140 |
\item When you are ready, change \emph{/etc/profile.d/z00\_lmod.sh} |
| 141 |
\item Users can opt-out |
| 142 |
\item We supported this for another 6 months |
| 143 |
\item We broke Env. Module support when we added the family function |
| 144 |
\item Both transitions generated very few tickets (2 + 2) |
| 145 |
\end{itemize} |
| 146 |
\end{frame} |
| 147 |
|
| 148 |
\begin{frame}{For those who can't type: ``\texttt{ml}''} |
| 149 |
\begin{itemize} |
| 150 |
\item \texttt{ml} is a wrapper: |
| 151 |
\begin{itemize} |
| 152 |
\item With no argument: \texttt{ml} means \texttt{module list} |
| 153 |
\item With a module name: \texttt{ml foo} means \texttt{module |
| 154 |
load foo}. |
| 155 |
\item With a module command: \texttt{ml spider} means |
| 156 |
\texttt{module spider}. |
| 157 |
\end{itemize} |
| 158 |
\item See \texttt{ml --help} for more documentation. |
| 159 |
\end{itemize} |
| 160 |
\end{frame} |
| 161 |
|
| 162 |
\section{Hierarchical Module layout} |
| 163 |
|
| 164 |
\begin{frame}[fragile] |
| 165 |
\frametitle{Example of Lmod (I)} |
| 166 |
{\tiny |
| 167 |
\begin{alltt} |
| 168 |
\$ {\color{blue} module avail} |
| 169 |
------------------ /opt/apps/modulefiles/MPI/intel/12.0/mpich2/1.4 ------------------ |
| 170 |
petsc/3.1 (default) petsc/3.1-debug pmetis/4.0 tau/2.20.3 |
| 171 |
|
| 172 |
------------------- /opt/apps/modulefiles/Compiler/intel/12.0 ----------------------- |
| 173 |
boost/1.45.0 gotoblas2/1.13 openmpi/1.4.3 |
| 174 |
boost/1.46.0 mpich2/1.3.2 openmpi/1.5.1 |
| 175 |
boost/1.46.1 (default) mpich2/1.4 (default) openmpi/1.5.3 (default) |
| 176 |
|
| 177 |
-------------------------- /opt/apps/modulefiles/Core ------------------------------- |
| 178 |
StdEnv intel/11.1 papi/4.1.4 |
| 179 |
admin/admin-1.0 intel/12.0 (default) scite/2.28 |
| 180 |
ddt/ddt lmod/lmod tex/2010 |
| 181 |
dmalloc/dmalloc local/local (default) unix/unix (default) |
| 182 |
fdepend/1.2 mkl/mkl visit/visit |
| 183 |
gcc/4.4 noweb/2.11b |
| 184 |
gcc/4.5 (default) |
| 185 |
\end{alltt} |
| 186 |
} |
| 187 |
\end{frame} |
| 188 |
|
| 189 |
\begin{frame}[fragile] |
| 190 |
\frametitle{Example of Lmod (II)} |
| 191 |
{\tiny |
| 192 |
\begin{alltt} |
| 193 |
{\color{blue}\$ module list} |
| 194 |
Currently Loaded Modules: |
| 195 |
1) StdEnv 2) gcc/4.5 3) mpich2/1.4 4) petsc/3.1 |
| 196 |
{\color{blue}\$ module unload gcc} |
| 197 |
Inactive Modules: |
| 198 |
1) mpich2 2) petsc |
| 199 |
{\color{blue}\$ module list} |
| 200 |
Currently Loaded Modules: |
| 201 |
1) StdEnv |
| 202 |
Inactive Modules: |
| 203 |
1) mpich2 2) petsc |
| 204 |
{\color{blue}\$ module load intel} |
| 205 |
Activating Modules: |
| 206 |
1) mpich2 2) petsc |
| 207 |
{\color{blue}\$ module swap intel gcc} |
| 208 |
Due to MODULEPATH changes the follow modules have been reloaded: |
| 209 |
1) mpich2 2) petsc |
| 210 |
\end{alltt} |
| 211 |
} |
| 212 |
\end{frame} |
| 213 |
|
| 214 |
\begin{frame}{module avail vs. module spider} |
| 215 |
\begin{itemize} |
| 216 |
\item Can't show every module with \texttt{\bf module avail} |
| 217 |
\item Lmod added the command \texttt{\bf module spider} to walk |
| 218 |
the tree. |
| 219 |
\end{itemize} |
| 220 |
\end{frame} |
| 221 |
\begin{frame}[fragile] |
| 222 |
\frametitle{Module Proprieties (I)} |
| 223 |
\begin{itemize} |
| 224 |
\item Modules can have properties |
| 225 |
\item At TACC, we have MIC, and GPU accelerators. |
| 226 |
\item Some libraries are MIC aware. |
| 227 |
{\small |
| 228 |
\begin{verbatim} |
| 229 |
add_property("arch","mic") |
| 230 |
\end{verbatim} |
| 231 |
} |
| 232 |
\item This is controlled by the table in lmodrc.lua |
| 233 |
\end{itemize} |
| 234 |
\end{frame} |
| 235 |
|
| 236 |
\begin{frame}[fragile] |
| 237 |
\frametitle{Module Properties (II)} |
| 238 |
\begin{itemize} |
| 239 |
\item Some modules will be ``MIC'' aware: mkl, fftw3, phdf5, ... |
| 240 |
\item Lmod will decorate these modules: |
| 241 |
{\tiny |
| 242 |
\begin{alltt} |
| 243 |
1) unix/unix 3) ddt/ddt 5) mpich2/1.5 7) phdf5/1.8.9 {\color{blue}(m)} |
| 244 |
2) intel/13.0 4) mkl/mkl {\color{red}(*)} 6) petsc/3.2 8) StdEnv |
| 245 |
|
| 246 |
Where: |
| 247 |
{\color{blue}(m)}: module is build natively for MIC |
| 248 |
{\color{red}(*)}: module is build natively for MIC and offload to the MIC |
| 249 |
|
| 250 |
------ |
| 251 |
add_property("arch","mic") -- > phdf5 |
| 252 |
add_property("arch","mic:offload") -- > mkl |
| 253 |
\end{alltt} |
| 254 |
} |
| 255 |
\item What properties would you like to support? |
| 256 |
\end{itemize} |
| 257 |
\end{frame} |
| 258 |
|
| 259 |
\begin{frame}{Spider Cache} |
| 260 |
\begin{itemize} |
| 261 |
\item Modulefiles can have properties |
| 262 |
\item Want to show properties with \texttt{\bf module avail} |
| 263 |
\item Ugh! \emph{Must read all modulefiles} |
| 264 |
\item Faster to read one file than walk a directory tree. |
| 265 |
\item Spider cache was created. |
| 266 |
\end{itemize} |
| 267 |
\end{frame} |
| 268 |
|
| 269 |
\begin{frame}{Spider Cache (II)} |
| 270 |
\begin{itemize} |
| 271 |
\item Good News: having a spider cache speeds avail, spider |
| 272 |
\item Bad News: Sites must maintain up-to-date cache file. |
| 273 |
\item Lmod trusts valid system caches for avail and spider. |
| 274 |
\item Two kinds of caches: User \& System |
| 275 |
\end{itemize} |
| 276 |
\end{frame} |
| 277 |
|
| 278 |
\begin{frame}{User spider cache file} |
| 279 |
\begin{itemize} |
| 280 |
\item Used if no system cache is available. |
| 281 |
\item Written when it takes more than 2 seconds to build |
| 282 |
\item Valid for 24 hours. |
| 283 |
\item Rare if system caches exist. |
| 284 |
\end{itemize} |
| 285 |
\end{frame} |
| 286 |
|
| 287 |
\begin{frame}{System spider cache file} |
| 288 |
\begin{itemize} |
| 289 |
\item Sites can have one or more cache files. |
| 290 |
\item A shared file system $\Rightarrow$ One |
| 291 |
per system |
| 292 |
\item At TACC: |
| 293 |
\begin{itemize} |
| 294 |
\item Each nodes creates a local system cache |
| 295 |
\item Master |
| 296 |
\end{itemize} |
| 297 |
\end{itemize} |
| 298 |
\end{frame} |
| 299 |
|
| 300 |
|
| 301 |
\section{Design ideas behind Lmod \& Settarg} |
| 302 |
|
| 303 |
\begin{frame}{The Design ideas behind Lmod} |
| 304 |
\begin{itemize} |
| 305 |
\item Lmod has been design to make me happy! |
| 306 |
\item It is fast, predictable and powerful. |
| 307 |
\item Action happen with minimal typing: |
| 308 |
\begin{itemize} |
| 309 |
\item ml |
| 310 |
\item well chosen defaults. |
| 311 |
\item Hierarchical module layout |
| 312 |
\item tab-completion |
| 313 |
\item never use ``\texttt{\bf swap}'' |
| 314 |
\item don't use category/name/version. |
| 315 |
\end{itemize} |
| 316 |
\end{itemize} |
| 317 |
\end{frame} |
| 318 |
|
| 319 |
|
| 320 |
\begin{frame}{What are the implications?} |
| 321 |
\begin{itemize} |
| 322 |
\item Fast typing of commands |
| 323 |
\item Use of versions is rare. |
| 324 |
\item Strong use of autoswapping in three ways: |
| 325 |
\begin{itemize} |
| 326 |
\item Auto swapping of the same name: ml zlib |
| 327 |
\item Swapping of dependent modules MPI, PETSc, etc |
| 328 |
\item Autoswapping of compilers, mpi stacks. |
| 329 |
\end{itemize} |
| 330 |
\end{itemize} |
| 331 |
\end{frame} |
| 332 |
|
| 333 |
\begin{frame}{Numerical Software development (by me!)} |
| 334 |
\begin{itemize} |
| 335 |
\item change between debug, optimize, builds |
| 336 |
\item change compilers, mpi stacks, solvers, etc |
| 337 |
\item No ``make clean'' required when changing any of the above |
| 338 |
\item Make it ease to compare and contrast two different builds |
| 339 |
\item Integrated with module system |
| 340 |
\item Easy to know the state |
| 341 |
\end{itemize} |
| 342 |
\end{frame} |
| 343 |
|
| 344 |
\begin{frame}{Settarg} |
| 345 |
\begin{itemize} |
| 346 |
\item TARG: A family of environment variables that describe the |
| 347 |
build environment. |
| 348 |
\item Makefile can use those variables to control the build. |
| 349 |
\item Title Bar reports state of TARG |
| 350 |
\item PATH updated automatically: PATH=./\$TARG:\$PATH |
| 351 |
\end{itemize} |
| 352 |
\end{frame} |
| 353 |
|
| 354 |
\begin{frame}[fragile] |
| 355 |
\frametitle {settarg} |
| 356 |
\begin{itemize} |
| 357 |
\item Provides safety, flexibility and repeatability in a dynamic environment. |
| 358 |
\item Dynamically updates the state when modules change: |
| 359 |
{\small |
| 360 |
\begin{alltt} |
| 361 |
\$ {\color{red} env | grep '^TARG'} |
| 362 |
{\color{blue}TARG_BUILD_SCENARIO=dbg |
| 363 |
TARG=OBJ/_x86_64_dbg_gcc-4.6_mpich-3.0 |
| 364 |
TARG_MPI_FAMILY=mpich |
| 365 |
TARG_MPI=mpich-3.0} |
| 366 |
\${\color{red} module swap mpich openmpi; opt; env | grep '^TARG'} |
| 367 |
{\color{blue}TARG_BUILD_SCENARIO=opt |
| 368 |
TARG=OBJ/_x86_64_opt_gcc-4.6_openmpi-1.6 |
| 369 |
TARG_MPI=openmpi-1.6 |
| 370 |
TARG_MPI_FAMILY=openmpi} |
| 371 |
\end{alltt} |
| 372 |
} |
| 373 |
\end{itemize} |
| 374 |
\end{frame} |
| 375 |
|
| 376 |
\begin{frame}[fragile] |
| 377 |
\frametitle {settarg (II)} |
| 378 |
\begin{itemize} |
| 379 |
\item Typically TARG is OBJ/\$ARCH\_\$SCENARIO\_\$CMPLR\_\$MPI |
| 380 |
\item \texttt{TARG=OBJ/\_x86\_64\_dbg\_gcc-4.6\_mpich-3.0} |
| 381 |
\item User can extend this with user level or directory level |
| 382 |
specialization. |
| 383 |
\item \texttt{OBJ/\_x86\_64\_dbg\_intel-14.0\_mpich-3.0\_petsc-3.4} |
| 384 |
\item A makefile can modified to write generated file into \$TARG. |
| 385 |
\item Never need to ``\texttt{make clobber}'' when switching |
| 386 |
scenario, compiler, etc. |
| 387 |
\end{itemize} |
| 388 |
\end{frame} |
| 389 |
|
| 390 |
% Notes on settarg: |
| 391 |
% * It is my world and I just let you live in it. (;->) |
| 392 |
% * Lmod and settarg and ml are designed to be fast and interactive. |
| 393 |
% It is minimal typing to achieve my goals. |
| 394 |
% * It is a well designed module system where user can use the |
| 395 |
% defaults and not type in versions. |
| 396 |
% * I change between dbg and opt builds frequently. |
| 397 |
% * I also change between gcc and intel compiler frequently. |
| 398 |
% C++ error msgs can be hard to understand. Sometimes the other |
| 399 |
% compiler says something to me that the other did not. |
| 400 |
% * I tend to debug with gcc and run with intel. |
| 401 |
% * So switching between compilers and dbg/opt build need to be |
| 402 |
% easy and fast. |
| 403 |
% * Settarg also needs to know if certain modules are loaded: |
| 404 |
% compiler, mpi, solvers etc. |
| 405 |
% * Settarg does these things: |
| 406 |
% ** Reads the state of the modules |
| 407 |
% ** Builds the TARG and the TARG family of env vars. |
| 408 |
% ** changes the path. |
| 409 |
% ** changes the title bar in an xterm. |
| 410 |
|
| 411 |
|
| 412 |
\section{What's new in Lmod} |
| 413 |
|
| 414 |
\begin{frame}{What's new in Lmod} |
| 415 |
\begin{itemize} |
| 416 |
\item Full support for reading Cray module files. |
| 417 |
\item Better support for running Lmod on shared home file systems. |
| 418 |
\item Priority Path: Some paths are more equal than others. |
| 419 |
\item \texttt{\bf sh\_to\_modulefile} converts shell scripts into modulefiles. |
| 420 |
\item Support for \texttt{\bf load(atleast("gcc","4.8"))} |
| 421 |
\end{itemize} |
| 422 |
\end{frame} |
| 423 |
|
| 424 |
\begin{frame}{Auto swap} |
| 425 |
\begin{itemize} |
| 426 |
\item An improvement suggested by Maxime Boissonneault. |
| 427 |
\item Replace \texttt{\bf module load gcc; module swap gcc intel} |
| 428 |
\item With \texttt{\bf module load gcc; module load intel} |
| 429 |
\item Let Lmod figure out that a swap is required and do it for you! |
| 430 |
\end{itemize} |
| 431 |
\end{frame} |
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
|
| 436 |
\end{document} |