HPC Lab Manual Zeel
HPC Lab Manual Zeel
BACHELOR OF TECHNOLOGY
SEMESTER VII
Computer Science & Engineering Department
CERTIFICATE
Head of Department………….……
TABLE OF CONTENTS
Page No
Date of Marks
Sr.no Experiment Title Date of Start
Completion
Sign
(Out of10)
From To
Write a program on an
unloaded cluster forseveral
different numbers of nodes
04 and record the time taken in
each case. Draw a graph of
execution time against the
number of nodes
PRACTICAL : 01
INTRODUCTION:
➢ It is a free service provided by Google that enables users to experiment with machine
learning, data science, and artificial intelligence without requiring any setup or installation
of local software.
▪ Google Colab is a free, cloud-based platform that allows users to write and execute
code in a web browser.
➢ Pre-installed Libraries:
▪ Colab comes pre-installed with popular machine learning libraries such as Keras,
PyTorch, and TensorFlow, making it easy to start working on projects without setting
up a local environment.
▪ Colab provides access to GPUs like Tesla K80 and TPUs, which are typically
expensive and difficult to access, for free.
➢ Real-time Output:
▪ Colab displays the output of code in real-time, allowing users to see the results of their
code as they write it.
➢ Collaboration:
➢ Version Control:
▪ Colab provides version control, allowing users to track changes to their code and
collaborate with others.
➢ Code Generation:
▪ Colab allows users to generate code using natural language prompts, reducing the need
for manual coding.
➢ Autocomplete:
➢ Chatbot:
▪ Colab’s chatbot, Gemini, allows users to ask questions and get answers directly in
the notebook.
▪ Colab allows users to access and edit files stored in their Google Drive account.
➢ Customizable:
➢ Free Storage:
▪ Colab provides free storage for notebooks and files, making it easy to store and
access large datasets.
▪ Colab provides free access to GPUs and TPUs, making it suitable for running
computationally intensive machine learning models without needing expensive
hardware.
➢ Easy Collaboration:
▪ Like Google Docs, Colab allows multiple users to collaborate on the same notebook
in real-time, making it ideal for group projects and teaching.
➢ No Setup Required:
▪ Users can start coding immediately without worrying about installing software or
managing dependencies. This ease of use is especially beneficial for beginners.
▪ Colab is seamlessly integrated with Google Drive, allowing users to easily save,
share, and manage their notebooks and datasets.
▪ Colab supports many popular Python libraries for data science and machine
learning, such as TensorFlow, Keras, PyTorch, NumPy, pandas, and more.
➢ Interactive Visualization:
➢ Free Access:
▪ While there are premium options available, the basic features and access to
powerful hardware are available for free, which is a significant advantage for
students and hobbyists.
➢ Resource Limitations:
▪ The free version has resource limitations, including restricted access to high-
performance GPUs/TPUs, limited session durations, and usage limits. These can be
a bottleneck for large-scale projects.
➢ Session Disconnections:
▪ Sessions can get disconnected if left idle for too long, which can lead to loss of
progress if work is not saved frequently.
➢ Limited Customizations:
▪ While Colab supports many libraries out of the box, installing and managing custom
libraries or software can be cumbersome compared to a local environment.
➢ Privacy Concerns:
▪ Since code and data are hosted on Google’s servers, there may be concerns about
data privacy and security, especially for sensitive information.
➢ Performance Variability:
▪Performance can vary based on current demand and server load, which may lead to
inconsistent experience, especially with the free tier.
➢ Dependency on Internet Connection:
➢ Python:
▪ Colab’s primary language, with extensive support for popular libraries and
frameworks like TensorFlow, PyTorch, and scikit-learn.
➢ R:
▪ Colab supports R programming language, allowing users to run R code and leverage
popular R libraries and packages.
➢ Julia:
▪ Colab supports Julia, a new language for high-performance numerical and scientific
computing.
➢ Scala:
➢ Other Languages:
▪ Colab also supports other languages, including but not limited to:
• Java
• C++
• C#
• MATLAB
• Fortran
▪ NOTE:
• While Colab supports these languages, the level of support and integration may
vary.
• For example, some languages may require additional setup or configuration to
work properly.
▪ Key Takeaway:
STEPS:
3. Installing packages
4. Implementing a C program
PRACTICAL : 02
1. !ls –l
Theory
The command `ls -l` lists all files and directories in the current directory in a detailed
(long) format. It includes information such as permissions, number of links, owner,
group, size, and timestamp of the last modification for each item.
Output
2. !echo -e
Theory
The `echo -e` command in Unix-based systems prints text to the terminal, interpreting
escape sequences (like `\n` for a new line or `\t` for a tab). It allows for formatted output,
such as inserting special characters or controlling text display.
Output
3. !pwd
Theory
The `pwd` command, used in a Jupyter notebook, executes the shell command `pwd`
(print working directory) to display the current working directory of the notebook
environment. This helps to confirm the directory in which the notebook is operating.
Output
4. !mkdir -help
Theory
The `mkdir` command is used to create new directories in a filesystem. The `–help`
option displays usage information and details about the command's available options.
Output
5. !df –h
Theory
The `df -h` command in Unix-like operating systems displays disk space usage for all
mounted filesystems in a human-readable format, showing sizes in powers of 1024
(e.g., KB, MB, GB). This command provides an overview of available and used disk
space on each filesystem.
Output
6. !uname –a
Theory
The command `uname -a` displays comprehensive information about the current
operating system and kernel, including the system name, node name (hostname), kernel
version, build date, architecture, and more. It provides a complete overview of the
system's environment, useful for system administration and troubleshooting.
Output
7. !whoami
Theory
Output
Theory
The command "ps aux | head -n 10" displays the first 10 lines of the output from the "ps
aux" command. It lists information about all processes currently running on the system,
showing details such as user, CPU usage, memory usage, and command.
Output
9. !uptime
Theory
The `uptime` command is used in Unix-like operating systems to display the current
time, how long the system has been running, how many users are currently logged in,
and the system load averages for the past 1, 5, and 15 minutes. It is commonly used for
monitoring and troubleshooting system performance.
Output
Theory
The command `top -bn1 | head -n 10` runs the `top` utility in batch mode for a single
iteration (`-bn1`) and displays the first 10 lines of the output. This typically shows
system summary information, including uptime, CPU load, and memory usage.
Output
11.!free –h
Theory
The command `free -h` displays the amount of free and used memory in the system, in
human-readable format (e.g., GB or MB).
Output
12.!date
Theory
The `date` command in Unix-based systems displays the current date and time. It
provides a simple way to check the system's date settings.
Output
13.!id
Theory
The `id` command in Unix-like systems displays the user ID (UID) and group ID (GID)
associated with the current user, along with supplementary group IDs.
Output
14.!hostname
Theory
The `hostname` command displays the name of the current host or system. It is used to
retrieve and view the hostname configuration on Unix-like operating systems.
Output
15. !clear
Theory
The "clear" command clears the terminal screen, removing all previous output and
providing a clean workspace for new commands.
Output
16.!w
Theory
The command "w" displays information about currently logged-in users and their
activities on a Unix-like operating system, including load averages and uptime.
Output
17.!last
Theory
The `last` command displays a list of recent login activities on a Unix/Linux system,
showing who logged in and when.
Output
18.!vmstat
Theory
Output
19.!arch
Theory
The `arch` command displays the architecture of the current system's processor,
providing essential hardware information in Unix-like operating systems.
Output
Theory
`getconf ARG_MAX` retrieves the maximum length in bytes of arguments to the `exec`
functions. This helps determine the limit on the length of command-line arguments that
can be passed to a program.
Output