Skip to content

Commit 724ab20

Browse files
committed
Upades of the MetaCentrum chapter.
Signed-off-by: V-Z <vojta@trapa.cz>
1 parent 6584dd5 commit 724ab20

File tree

1 file changed

+46
-35
lines changed

1 file changed

+46
-35
lines changed

presentation/linux_bash_metacentrum_course.tex

Lines changed: 46 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3751,8 +3751,8 @@ \subsection{Packages}
37513751
\item There use to be web services to look for packages, also from other sources --- \href{https://software.opensuse.org/search}{openSUSE}, \href{https://www.debian.org/distrib/packages\#search_packages}{Debian}, \href{https://packages.ubuntu.com/}{Ubuntu} (+ \href{https://launchpad.net/ubuntu/+search}{Launchpad} and \href{https://launchpad.net/ubuntu/+ppas}{PPAs}), \href{https://apps.fedoraproject.org/packages/}{Fedora},~\ldots
37523752
\item The task is always same, the exact work-flow and commands more or less differ among distributions\ldots
37533753
\item Tools like Android Google Play, Apple Store or Windows Store are inspired from Linux\ldots
3754-
37553754
\end{itemize}
3755+
\vfill
37563756
\begin{block}{Task}
37573757
Install some new software into your Linux. Use graphical as well as command-line tools. See following slides for instructions.
37583758
\end{block}
@@ -3768,7 +3768,7 @@ \subsection{Packages}
37683768
\item \texttt{zypper up} --- update
37693769
\item \texttt{zypper dup} -- upgrade to newer release of whole distribution
37703770
\item \texttt{zypper se \textit{term}} --- search \textit{term}
3771-
\item \texttt{rpmorphan} and/or \texttt{zypper} \texttt{pa} -{-}\texttt{orphaned} -{-}\texttt{unneeded} --- list packages, which can be safely removed
3771+
\item \texttt{zypper} \texttt{pa} -{-}\texttt{orphaned} -{-}\texttt{unneeded} --- list packages, which can be safely removed
37723772
\item \texttt{yast sw\_single} --- interactive manager
37733773
\item \texttt{zypper lr} --- list repositories
37743774
\item \texttt{zypper ar \textit{repository}} --- add \textit{repository} (URL of remote \texttt{*.repo} file)
@@ -3784,19 +3784,20 @@ \subsection{Packages}
37843784
\begin{itemize}
37853785
\item Root password is required: use \texttt{sudo\ldots} or \texttt{su}~-
37863786
\item Package name \texttt{*.deb}
3787-
\item \texttt{apt-get install \textit{package}} --- install \textit{package}
3788-
\item \texttt{apt-get remove \textit{package}} --- remove \textit{package}
3789-
\item \texttt{apt-get update} --- refresh repositories
3790-
\item \texttt{apt-get upgrade} -- upgrade packages
3791-
\item \texttt{apt-get dist-upgrade} -- upgrade to newer release of whole distribution
3792-
\item \texttt{apt-cache search \textit{term}} --- search \textit{term}
3793-
\item \texttt{apt-get autoremove} --- clear packages
3787+
\item \texttt{apt install \textit{package}} --- install \textit{package}
3788+
\item \texttt{apt remove \textit{package}} --- remove \textit{package}
3789+
\item \texttt{apt update} --- refresh repositories
3790+
\item \texttt{apt upgrade} -- upgrade packages
3791+
\item \texttt{apt dist-upgrade} -- upgrade to newer release of whole distribution
3792+
\item \texttt{apt search \textit{term}} --- search \textit{term}
3793+
\item \texttt{apt autoremove} --- clear packages
37943794
\item \texttt{aptitude} --- interactive manager
37953795
\item \texttt{cat /etc/apt/sources.list} --- list repositories
37963796
\item \texttt{nano /etc/apt/sources.list} --- add/remove/edit repositories
3797-
\item \texttt{dpkg-*}, \texttt{apt-*} commands for other tasks
3798-
\item \texttt{aptitude} is used in similar way as \texttt{apt-get} (e.g. \texttt{aptitude install \textit{package}},~\ldots)
3799-
\item \texttt{man aptitude}, \texttt{man apt-XXX} (e.g. \texttt{man apt-get}), \texttt{man dpkg-XXX}, \texttt{man apt} --- usage help
3797+
\item \texttt{dpkg}-\texttt{*}, \texttt{apt}-\texttt{*} commands for other tasks
3798+
\item \texttt{aptitude} is used in similar way as \texttt{apt} (e.g. \texttt{aptitude install \textit{package}},~\ldots)
3799+
\item Similar tasks can be done with \texttt{apt}, \texttt{apt}-\texttt{get}, or \texttt{aptitude}
3800+
\item \texttt{man aptitude}, \texttt{man apt}-\texttt{XXX} (e.g. \texttt{man apt}), \texttt{man dpkg}-\texttt{XXX}, \texttt{man apt} --- usage help
38003801
\end{itemize}
38013802
\end{frame}
38023803
@@ -3836,7 +3837,7 @@ \subsection{Packages}
38363837
38373838
\begin{frame}{Manuals for package management}
38383839
\begin{itemize}
3839-
\item openSUSE and SUSE Linux Enterprise: \url{https://doc.opensuse.org/documentation/leap/startup/html/book.opensuse.startup/part.reference.software.html} and \url{https://en.opensuse.org/Portal:Zypper}
3840+
\item openSUSE and SUSE Linux Enterprise: \url{https://doc.opensuse.org/documentation/leap/startup/html/book.opensuse.startup/part-reference-software.html} and \url{https://en.opensuse.org/Portal:Zypper}
38403841
\item Red Hat, Fedora, CENTOS, Scientific Linux and others: \url{http://yum.baseurl.org/} and newer \url{https://fedoraproject.org/wiki/DNF}
38413842
\item Debian (and derivatives): \url{https://www.debian.org/doc/manuals/debian-reference/ch02.en.html} and \url{https://wiki.debian.org/PackageManagement}
38423843
\item Ubuntu (and derivatives): \url{https://help.ubuntu.com/stable/ubuntu-help/addremove.html} and \url{https://help.ubuntu.com/community/AptGet/Howto}
@@ -3868,17 +3869,17 @@ \subsection{Compilation}
38683869
\item You need to install compilation tools for your distribution and programming languages you are going to use
38693870
\item Commonly, extra dependencies are required to compile the application
38703871
\begin{itemize}
3871-
\item Packages for compilation use to end with -\texttt{dev} or -\texttt{devel} (e.g. if the software requires package \texttt{zlib} to run, install also its developmental version \texttt{zlib-dev(el) }to be able to compile it)
3872+
\item Packages for compilation use to end with -\texttt{dev} or -\texttt{devel} (e.g. if the software requires package \texttt{zlib} to run, install also its developmental version \texttt{zlib}-\texttt{dev(el)} to be able to compile it)
38723873
\item All requirements should be listed in README or INSTALL documents of particular package --- user must install them manually\ldots
38733874
\end{itemize}
38743875
\end{itemize}
3876+
\vfill
38753877
\begin{bashcode}
38763878
# openSUSE and SUSE Linux Enterprise
38773879
zypper in -t pattern devel_basis devel_C_C++
38783880
# Debian, Ubuntu and derivatives like Linux Mint and others
38793881
apt-get install build-essential # Or "aptitude install build-essential"
3880-
# Red Hat, CENTOS, Scientific Linux, Fedora and derivatives (2 options)
3881-
3882+
# Red Hat, CENTOS, Fedora and derivatives (2 options)
38823883
dnf groupinstall "Development Tools" "C Development Tools and Libraries"
38833884
yum groupinstall "Development Tools" "C Development Tools and Libraries"
38843885
\end{bashcode}
@@ -3894,8 +3895,8 @@ \subsection{Compilation}
38943895
mkdir raxml # Create working directory
38953896
cd raxml/ # Go there
38963897
# Get source code from GitHub (svn downloads only changed files)
3897-
svn co https://github.com/stamatak/standard-RAxML/tags/v8.2.11
3898-
cd v8.2.11/ # Go to newly created directory
3898+
svn co https://github.com/stamatak/standard-RAxML/tags/v8.2.12
3899+
cd v8.2.12/ # Go to newly created directory
38993900
ls # List files
39003901
rm -rf Windows* # No need of Windows version - delete it
39013902
# Compile standard version (other versions are available for better CPU)
@@ -3908,13 +3909,14 @@ \subsection{Compilation}
39083909
\begin{frame}[fragile]{Compilation of SAMtools}
39093910
\begin{itemize}
39103911
\item See \url{http://www.htslib.org/download/}
3911-
\item Ensure packages \texttt{zlib} and \texttt{zlib-dev(el)} are installed --- required for running and compilation, see \href{https://github.com/samtools/samtools/blob/master/INSTALL}{INSTALL} and \href{https://github.com/samtools/samtools/blob/master/README}{README}
3912+
\item Ensure packages \texttt{zlib} and \texttt{zlib}-\texttt{dev(el) }are installed --- required for running and compilation, see \href{https://github.com/samtools/samtools/blob/master/INSTALL}{INSTALL} and \href{https://github.com/samtools/samtools/blob/master/README}{README}
39123913
\end{itemize}
3914+
\vfill
39133915
\begin{bashcode}
3914-
wget https://github.com/samtools/samtools/releases/download/1.7/
3915-
samtools-1.7.tar.bz2 # Download SAMtools
3916-
tar xjvf samtools-1.7.tar.bz2 # Unpack the archive
3917-
cd samtools-1.7/ # Go to the unpacked directory
3916+
wget https://github.com/samtools/samtools/releases/download/1.10/
3917+
samtools-1.10.tar.bz2 # Download SAMtools
3918+
tar xjvf samtools-1.10.tar.bz2 # Unpack the archive
3919+
cd samtools-1.10/ # Go to the unpacked directory
39183920
./configure # Configure settings for compilation
39193921
./configure --help # See various configuring options
39203922
./configure --without-curses # Compile without ncurses support
@@ -3935,6 +3937,7 @@ \subsection{Java}
39353937
\item Linux usually use \href{https://openjdk.java.net/}{OpenJDK} --- search for packages named \texttt{*openjdk*}
39363938
\item Let's download e.g. \href{http://tree.bio.ed.ac.uk/software/figtree/}{FigTree} from \url{http://tree.bio.ed.ac.uk/download.php?id=96&num=3}
39373939
\end{itemize}
3940+
\vfill
39383941
\begin{bashcode}
39393942
# Go to directory where you downloaded it
39403943
cd directory/with/downloaded/figtree
@@ -4009,8 +4012,8 @@ \subsection{Information}
40094012
\begin{itemize}
40104013
\item Massive computations --- \href{https://www.cesnet.cz/services/massive-computations-metacentrum/?lang=en}{MetaCentrum}
40114014
\item Large \href{https://www.cesnet.cz/services/data-storage/?lang=en}{data storage}
4012-
\item \href{https://www.cesnet.cz/services/filesender/?lang=en}{FileSender} to be able to send up to 500~GB file
4013-
\item \href{https://www.metacentrum.cz/en/Sluzby/MetaCloud/}{MetaCloud} --- computing (HPC) cloud similar to e.g. Amazon Elastic Compute Cloud (EC2) or Google Compute Engine
4015+
\item \href{https://www.cesnet.cz/services/filesender/?lang=en}{FileSender} to be able to send up to 1.9~TB file
4016+
\item \href{https://www.metacentrum.cz/en/Sluzby/Cloud/}{Cloud} --- computing (HPC) cloud similar to e.g. Amazon Elastic Compute Cloud (EC2) or Google Compute Engine
40144017
\item \href{https://www.cesnet.cz/services/owncloud/?lang=en}{ownCloud} to backup and/or sync data across devices (default capacity is 100~GB, user may ask for more) --- similar to e.g. Dropbox
40154018
\begin{itemize}
40164019
\item It is possible to connect by webDAV to ownCloud (slide \ref{transfers}) --- many applications support it
@@ -4028,8 +4031,7 @@ \subsection{Information}
40284031
\item To use MetaCentrum fill registration form \url{https://metavo.metacentrum.cz/en/application/form}
40294032
\item To use data storage fill registration form \url{https://einfra.cesnet.cz/perun-registrar-fed/?vo=storage}
40304033
\item After registration for MetaCentrum, user can join MetaCloud via \url{https://perun.metacentrum.cz/fed/registrar/?vo=meta&group=metacloud}
4031-
\item Users not having access to \href{https://www.eduid.cz/en/index}{EduID} have to register first at HostelID \url{https://hostel.eduid.cz/en/}
4032-
\item Note some browser do not have required certificate and registration pages do not work correctly. \href{https://www.mozilla.org/firefox/}{Mozilla Firefox} should be safe choice every time.
4034+
\item Users not having access to \href{https://www.eduid.cz/en/index}{EduID} have to register first at HostelID \url{http://hostel.eduid.cz/en/index.html}
40334035
\end{itemize}
40344036
\item Information about data storage \url{https://du.cesnet.cz/en/start} contains detailed usage instructions
40354037
\item Information about MetaCentrum \url{https://www.metacentrum.cz/en/}
@@ -4045,7 +4047,7 @@ \subsection{Information}
40454047
\item Manage your user account at \url{http://metavo.metacentrum.cz/en/myaccount/}
40464048
\item Personal view on actual resources and running tasks is at \url{https://metavo.metacentrum.cz/pbsmon2/person}
40474049
\item List of available applications \url{https://wiki.metacentrum.cz/wiki/Kategorie:Applications}
4048-
\item It has 8~front ends where users log and thousands of computers doing the calculations --- they are not accessed directly to run task
4050+
\item It has 9~\href{https://wiki.metacentrum.cz/wiki/Frontend}{front ends} where users log and thousands of computers doing the calculations --- they are not accessed directly to run task
40494051
\item Most of computers are running \href{https://www.debian.org/}{Debian GNU/Linux}
40504052
\end{itemize}
40514053
\end{frame}
@@ -4054,15 +4056,17 @@ \subsection{Usage}
40544056
40554057
\begin{frame}[fragile]{MetaCentrum usage}
40564058
\begin{itemize}
4057-
\item User can transfer data on one of \href{https://wiki.metacentrum.cz/wiki/Frontend}{frontends} (next slide) by e.g. \texttt{scp} or \href{https://winscp.net/}{WinSCP} from Windows
4059+
\item User can transfer data on one of \href{https://wiki.metacentrum.cz/wiki/Frontend}{frontends} (next slide) by e.g. \texttt{scp} or \href{https://winscp.net/}{WinSCP} from Windows or \href{https://filezilla-project.org/}{FileZilla} from anywhere
40584060
\item Same credentials are used for all front ends, for SSH login as well as file transmissions
40594061
\end{itemize}
4062+
\vfill
40604063
\begin{bashcode}
40614064
# Login to selected server (tarkil is located in Prague)
40624065
ssh USER@tarkil.metacentrum.cz
40634066
# Continue as in any other command line...
40644067
qsub ... # Submit the job (see later)
40654068
\end{bashcode}
4069+
\vfill
40664070
\begin{itemize}
40674071
\item In home directory on the server prepare all needed data and non-interactive script (interactive are more complicated) which will do the calculations
40684072
\item Tasks are not launched immediately, but using \texttt{qsub} the task is submitted into queue and system decides when it will be launched
@@ -4099,7 +4103,7 @@ \subsection{Tasks}
40994103
cp -a "$DATADIR"/"$WORKDIR"/* "$SCRATCHDIR"/ || exit 1 # If fails, exit
41004104
# Change working directory - script goes to the directory where
41014105
# calculations are done
4102-
cd "$SCRATCHDIR"/ || exit 2 # If it fails, exit script
4106+
cd "$SCRATCHDIR"/ || exit 1 # If it fails, exit script
41034107
\end{bashcode}
41044108
\vfill
41054109
Ends on following slide\ldots
@@ -4124,6 +4128,7 @@ \subsection{Tasks}
41244128
# This is all needed, the script is ready to be launched...
41254129
exit
41264130
\end{bashcode}
4131+
\vfill
41274132
\begin{itemize}
41284133
\item Make \texttt{metacentrum.sh} executable and modify it to fit your needs\ldots
41294134
\item If it was written on Windows, convert EOL (and encoding)\ldots
@@ -4136,14 +4141,15 @@ \subsection{Tasks}
41364141
\item \url{https://wiki.metacentrum.cz/wiki/How_to_compute/Requesting_resources}
41374142
\item Personal view \url{https://metavo.metacentrum.cz/pbsmon2/person} has nice overview of available resources and tasks and allows comfortable construction of submission command
41384143
\end{itemize}
4144+
\vfill
41394145
\begin{bashcode}
41404146
# We will run up to 5 days (120 hours), require one physical computer
41414147
# with 8 CPU threads, 24 GB of RAM, 10 GB of disk space and we get all
41424148
# information mails (for abort, beginning, exit)
41434149
qsub -l walltime=120:0:0 -l select=1:ncpus=8:mem=24gb:scratch_local=10gb
41444150
-m abe metacentrum.sh
41454151
# Check how the task is running (above web) and
4146-
qstat -u $USER # Or qstat | grep $USER
4152+
qstat -u $USER # Information about $USER's jobs (queued and running)
41474153
qstat 123456789 # The task ID is available from commands above or mail
41484154
qstat -f 123456789 # Print a lot of details
41494155
qdel 123456789 # Terminate scheduled or running task
@@ -4154,7 +4160,7 @@ \subsection{Tasks}
41544160
\begin{itemize}
41554161
\item Specify needed time
41564162
\begin{itemize}
4157-
\item Always \texttt{hours:minutes:seconds}, so e.g. for 4~weeks use -\texttt{l~walltime=672:00:00} (28~$\cdot$~24), for two days and 12 hours -\texttt{l~walltime=60:00:00}
4163+
\item Always \texttt{hours:minutes:seconds}, so e.g. for 4~weeks use -\texttt{l~walltime=672:0:0} (28~$\cdot$~24), for two days and 12 hours -\texttt{l~walltime=60:0:0}
41584164
\item User \href{mailto:meta@cesnet.cz}{may ask} to prolong the walltime --- it is needed to write in advance
41594165
\end{itemize}
41604166
\item Ask for as much RAM as you need (e.g. -\texttt{l~mem=8gb} to request 8~GB)
@@ -4244,18 +4250,22 @@ \subsection{Tasks}
42444250
\begin{itemize}
42454251
\item See information at \url{https://wiki.metacentrum.cz/wiki/How_to_compute/Interactive_jobs}
42464252
\end{itemize}
4253+
\vfill
42474254
\begin{bashcode}
4255+
# Secure we can log off in the meantime
4256+
screen # Or tmux
42484257
# Again launch qsub according to actual needs
42494258
# Note "-I" for interactive session and missing script name
42504259
qsub -I -l walltime=2:0:0 -l select=1:ncpus=1:mem=2gb:scratch_local=1gb
42514260
# Wait for job to start..
4261+
cd $SCRATCHDIR # Go to $SCRATCHDIR - work there
42524262
# After we get the interactive task, we are on new server
42534263
hostname # See where we are - we can connect to that server directly
42544264
ssh USER@given.server.cz # User name and password are the same
42554265
# Server address is output from "hostname"
4256-
screen # Secure we can log off in the meantime
42574266
# When you logout, the task is done (use screen to secure connection)
42584267
\end{bashcode}
4268+
\vfill
42594269
\begin{itemize}
42604270
\item Work as on normal Linux server\ldots
42614271
\item With \texttt{screen} we can disconnect as usually and let tasks run in background
@@ -4269,19 +4279,19 @@ \subsection{Graphical connection}
42694279
\item See information at \url{https://wiki.metacentrum.cz/wiki/Remote_desktop}
42704280
\end{itemize}
42714281
\begin{bashcode}
4282+
screen # Secure we can log off in the meantime
42724283
# Again launch qsub according to actual needs
42734284
# Note "-I" for interactive session and missing script name
42744285
qsub -I -l walltime=2:0:0 -l select=1:ncpus=1:mem=2gb:scratch_local=1gb
42754286
# Wait for job to start..
42764287
# After we get the interactive task, we are on new server
4277-
screen # Secure we can log off in the meantime
42784288
module add gui # We need to add GUI module
42794289
gui start # Start GUI (see above link for details)
42804290
gui info -p # Print information about running VNC sessions
42814291
# Including address, port and password to connect
42824292
\end{bashcode}
42834293
\begin{itemize}
4284-
\item Launch your favorite VNC client (\href{https://www.kde.org/applications/internet/krdc/}{KRDC}, \href{https://www.tightvnc.com/}{TightVNC},~\ldots) and use credentials from above output to connect
4294+
\item Launch your favorite VNC client (\href{https://kde.org/applications/internet/krdc/}{KRDC}, \href{https://www.tightvnc.com/}{TightVNC},~\ldots) and use credentials from above output to connect
42854295
\item Work as on normal Linux desktop\ldots
42864296
\item With \texttt{screen} we can disconnect as usually
42874297
\item It provides limited amount of resources, not suitable for big tasks
@@ -4322,6 +4332,7 @@ \subsection{Data storage}
43224332
\item All members of the group must be able to manipulate the data
43234333
\end{itemize}
43244334
\end{itemize}
4335+
\vfill
43254336
\begin{bashcode}
43264337
# Change group ownership to XXX
43274338
chgrp -R XXX /tape_tape/VO_XXX 2>/dev/null

0 commit comments

Comments
 (0)