You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: presentation/linux_bash_metacentrum_course.tex
+46-35Lines changed: 46 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -3751,8 +3751,8 @@ \subsection{Packages}
3751
3751
\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
3752
3752
\item The task is always same, the exact work-flow and commands more or less differ among distributions\ldots
3753
3753
\item Tools like Android Google Play, Apple Store or Windows Store are inspired from Linux\ldots
3754
-
3755
3754
\end{itemize}
3755
+
\vfill
3756
3756
\begin{block}{Task}
3757
3757
Install some new software into your Linux. Use graphical as well as command-line tools. See following slides for instructions.
3758
3758
\end{block}
@@ -3768,7 +3768,7 @@ \subsection{Packages}
3768
3768
\item\texttt{zypper up} --- update
3769
3769
\item\texttt{zypper dup} -- upgrade to newer release of whole distribution
3770
3770
\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
\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}
3840
3841
\item Red Hat, Fedora, CENTOS, Scientific Linux and others: \url{http://yum.baseurl.org/} and newer \url{https://fedoraproject.org/wiki/DNF}
3841
3842
\item Debian (and derivatives): \url{https://www.debian.org/doc/manuals/debian-reference/ch02.en.html} and \url{https://wiki.debian.org/PackageManagement}
3842
3843
\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}
3868
3869
\item You need to install compilation tools for your distribution and programming languages you are going to use
3869
3870
\item Commonly, extra dependencies are required to compile the application
3870
3871
\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)
3872
3873
\item All requirements should be listed in README or INSTALL documents of particular package --- user must install them manually\ldots
3873
3874
\end{itemize}
3874
3875
\end{itemize}
3876
+
\vfill
3875
3877
\begin{bashcode}
3876
3878
# openSUSE and SUSE Linux Enterprise
3877
3879
zypper in -t pattern devel_basis devel_C_C++
3878
3880
# Debian, Ubuntu and derivatives like Linux Mint and others
3879
3881
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)
3882
3883
dnf groupinstall "Development Tools""C Development Tools and Libraries"
3883
3884
yum groupinstall "Development Tools""C Development Tools and Libraries"
3884
3885
\end{bashcode}
@@ -3894,8 +3895,8 @@ \subsection{Compilation}
3894
3895
mkdir raxml # Create working directory
3895
3896
cd raxml/ # Go there
3896
3897
# 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
3899
3900
ls # List files
3900
3901
rm -rf Windows* # No need of Windows version - delete it
3901
3902
# Compile standard version (other versions are available for better CPU)
@@ -3908,13 +3909,14 @@ \subsection{Compilation}
3908
3909
\begin{frame}[fragile]{Compilation of SAMtools}
3909
3910
\begin{itemize}
3910
3911
\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}
\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
4014
4017
\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
4015
4018
\begin{itemize}
4016
4019
\item It is possible to connect by webDAV to ownCloud (slide \ref{transfers}) --- many applications support it
@@ -4028,8 +4031,7 @@ \subsection{Information}
4028
4031
\item To use MetaCentrum fill registration form \url{https://metavo.metacentrum.cz/en/application/form}
4029
4032
\item To use data storage fill registration form \url{https://einfra.cesnet.cz/perun-registrar-fed/?vo=storage}
4030
4033
\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}
4033
4035
\end{itemize}
4034
4036
\item Information about data storage \url{https://du.cesnet.cz/en/start} contains detailed usage instructions
4035
4037
\item Information about MetaCentrum \url{https://www.metacentrum.cz/en/}
@@ -4045,7 +4047,7 @@ \subsection{Information}
4045
4047
\item Manage your user account at \url{http://metavo.metacentrum.cz/en/myaccount/}
4046
4048
\item Personal view on actual resources and running tasks is at \url{https://metavo.metacentrum.cz/pbsmon2/person}
4047
4049
\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
4049
4051
\item Most of computers are running \href{https://www.debian.org/}{Debian GNU/Linux}
4050
4052
\end{itemize}
4051
4053
\end{frame}
@@ -4054,15 +4056,17 @@ \subsection{Usage}
4054
4056
4055
4057
\begin{frame}[fragile]{MetaCentrum usage}
4056
4058
\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
4058
4060
\item Same credentials are used for all front ends, for SSH login as well as file transmissions
4059
4061
\end{itemize}
4062
+
\vfill
4060
4063
\begin{bashcode}
4061
4064
# Login to selected server (tarkil is located in Prague)
4062
4065
ssh USER@tarkil.metacentrum.cz
4063
4066
# Continue as in any other command line...
4064
4067
qsub ... # Submit the job (see later)
4065
4068
\end{bashcode}
4069
+
\vfill
4066
4070
\begin{itemize}
4067
4071
\item In home directory on the server prepare all needed data and non-interactive script (interactive are more complicated) which will do the calculations
4068
4072
\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}
4099
4103
cp -a "$DATADIR"/"$WORKDIR"/* "$SCRATCHDIR"/ || exit 1 # If fails, exit
4100
4104
# Change working directory - script goes to the directory where
4101
4105
# calculations are done
4102
-
cd "$SCRATCHDIR"/ || exit 2 # If it fails, exit script
4106
+
cd "$SCRATCHDIR"/ || exit 1 # If it fails, exit script
4103
4107
\end{bashcode}
4104
4108
\vfill
4105
4109
Ends on following slide\ldots
@@ -4124,6 +4128,7 @@ \subsection{Tasks}
4124
4128
# This is all needed, the script is ready to be launched...
4125
4129
exit
4126
4130
\end{bashcode}
4131
+
\vfill
4127
4132
\begin{itemize}
4128
4133
\item Make \texttt{metacentrum.sh} executable and modify it to fit your needs\ldots
4129
4134
\item If it was written on Windows, convert EOL (and encoding)\ldots
\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
4138
4143
\end{itemize}
4144
+
\vfill
4139
4145
\begin{bashcode}
4140
4146
# We will run up to 5 days (120 hours), require one physical computer
4141
4147
# with 8 CPU threads, 24 GB of RAM, 10 GB of disk space and we get all
qstat -u $USER # Information about $USER's jobs (queued and running)
4147
4153
qstat 123456789 # The task ID is available from commands above or mail
4148
4154
qstat -f 123456789 # Print a lot of details
4149
4155
qdel 123456789 # Terminate scheduled or running task
@@ -4154,7 +4160,7 @@ \subsection{Tasks}
4154
4160
\begin{itemize}
4155
4161
\item Specify needed time
4156
4162
\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}
4158
4164
\item User \href{mailto:meta@cesnet.cz}{may ask} to prolong the walltime --- it is needed to write in advance
4159
4165
\end{itemize}
4160
4166
\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}
4244
4250
\begin{itemize}
4245
4251
\item See information at \url{https://wiki.metacentrum.cz/wiki/How_to_compute/Interactive_jobs}
4246
4252
\end{itemize}
4253
+
\vfill
4247
4254
\begin{bashcode}
4255
+
# Secure we can log off in the meantime
4256
+
screen # Or tmux
4248
4257
# Again launch qsub according to actual needs
4249
4258
# Note "-I" for interactive session and missing script name
# After we get the interactive task, we are on new server
4277
-
screen # Secure we can log off in the meantime
4278
4288
module add gui # We need to add GUI module
4279
4289
gui start # Start GUI (see above link for details)
4280
4290
gui info -p # Print information about running VNC sessions
4281
4291
# Including address, port and password to connect
4282
4292
\end{bashcode}
4283
4293
\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
4285
4295
\item Work as on normal Linux desktop\ldots
4286
4296
\item With \texttt{screen} we can disconnect as usually
4287
4297
\item It provides limited amount of resources, not suitable for big tasks
@@ -4322,6 +4332,7 @@ \subsection{Data storage}
4322
4332
\item All members of the group must be able to manipulate the data
0 commit comments