Skip to content

Latest commit

 

History

History

README.md

Advanced Computing with Python and GCP - [UDS23402J]

📌 Introduction

This directory contains programs for the Advanced Computing with Python and GCP subject (subject code UDS23402J).

⚙️ Prerequisites

  • Linux environment based on Debian (WSL can be used on Windows)
  • GCC compiler
  • OpenMPI or MPICH for MPI program

🖥️ System Setup

To run these programs, ensure you have the following packages installed:

sudo apt update && sudo apt install gcc mpich -y

🚀 Program 1: Google Cloud Console Project Setup

This experiment involves setting up a project in Google Cloud Console and exploring essential cloud computing concepts such as IAM Roles, Cloud Storage, VPC, VM Instances, Zones, and Firewall Security.

🚀 Program 2: Parallel Thread Printing using OpenMP

This program demonstrates creating and printing "Hello" messages from multiple parallel threads using OpenMP.

🔹 How to compile?

gcc program_2.c -fopenmp -o omp_program

🔹 How to run?

./omp_program

🚀 Program 3: MPI Communication Example

This program demonstrates inter-process communication using MPI, where one process sends a message to another process.

🔹 How to compile?

mpicc program_3.c -o mpi_program

🔹 How to run?

mpirun -np 2 ./mpi_program

🚀 Program 4: Multiplicative Inverse Matrices

This program demonstrates the calculation of multiplicative inverse matrices using Python.

🔹 How to run?

python3 program_4.py

🔹 Output

Original Matrix (A):
[[1 2]
 [3 4]]

Inverse of Matrix (A^-1):
[[-2.   1. ]
 [ 1.5 -0.5]]

Dot Product of Matrix (A) and its Inverse (A^-1):
[[1.0000000e+00 0.0000000e+00]
 [8.8817842e-16 1.0000000e+00]]

🚀 Program 5: List to Array Conversion

This program demonstrates the conversion of a list to an array using Python.

🔹 How to run?

python3 program_5.py

🔹 Output

Original list: [2, 3, 4, 6]
Datatype: <class 'list'>

Numpy Array: [2 3 4 6]
Datatype: <class 'numpy.ndarray'>

🚀 Program 6: ndarray from list of tuples of integers

This program demonstrates the creation of an ndarray from a list of tuples of integers using Python.

🔹 How to run?

python3 program_6.py

🔹 Output

Original list: [(1, 2, 3), (4, 5, 6)]
Datatype: <class 'list'>

Numpy Array:
[[1 2 3]
 [4 5 6]]
Datatype: <class 'numpy.ndarray'>

🚀 Program 7: Using print function

Print your name using the 'print' function in python.

🔹 How to run?

python3 program_7.py

🔹 Output

Hello, I am Saurabh Mishra