6CS005-High Performance Computing - IT Computer Science Assignment Help

Download Solution Order New Solution
Assignment Task


Task 

Assessment overview
This portfolio is split up into 4 separate tasks which will test your knowledge of advanced multithreading and GPGPU programming using CUDA. Each task should be zipped up into a single zip folder containing all C/CUDA and resource files for the submission on Canvas. All questions below will be explained in week 1 lecture (recorded). 

 

1.Matrix Multiplication 
You will create a matrix multiplication program which uses multithreading, you will be taught two CPU multithreading concepts: POSIX threads and Open Multi-Processing (OpenMP). Matrices are often two-dimensional arrays varying in sizes (can also be 3D), for your application, you will only need to multiply two-dimensional ones. Your program will read in the matrix from a file (txt), store them appropriately using dynamic memory and multiply them by splitting the tasks across “n” threads (any number of threads via command line arguments). Each matrix will be in a separate file. You should also use command line arguments to allow the user to enter the which matrices need to be multiplied. The data files will be given to you however, you will need to initially identify the dimensions of the matrix to determine whether they can be multiplied. If the matrices cannot be multiplied, your program should notify the user. For example, if Matrix A is 3x3 and Matrix B is 2x2, you cannot multiply them. If Matrix A is 2x3 and Matrix B is 2x2, then this can be multiplied. You will need to research how to multiply matrices, this will also be covered in the lectures. The resulting matrix should be outputted to a file. It is up to you which multithreading library you use (Pthreads or OMP). 
You will be given 10 data files to experiment with but remember, the dimensions need to be detected dynamically. During marking, we will be using a different dataset and therefore, do not hard-code your program to work with specific dimensions of matrices.

Read data from file appropriately 

  1. Using dynamic memory (malloc) for matrix A and matrix B 
  2. Creating an algorithm to multiply matrices correctly 
  3. Using multithreading with equal computations 
  4. Printing the correct output matrix to a file 


 

2.Password cracking using multithreading 
In this task, you will be asked to use the “crypt” library to decrypt a password using multithreading. You will be provided with two programs. The first program called “EncryptSHA512.c” allows you to encrypt a password. For this assessment, you will be required to decrypt a 4-character password consisting of 2 capital letters, and 2 numbers. The format of the password should be “LetterLetterNumberNumber.” For example, “HP93.” Once you have generated your password, this should then be entered into your program to decrypt the password. The method of input for the encrypted password is up to you. The second program is a skeleton code to crack the password on a single thread without any multithreading syntax. Your task is to use the pthread or omp library to split the workload over many threads and find the password. Once the password has been found, the program should finish meaning not all combinations of 2 letters and 2 numbers should be explored unless it’s ZZ99 AND the last thread happens to finish last. 

  1. Cracks a password using multithreading and dynamic slicing based on thread count 
  2. Program finishes appropriately when password has been found 


3.Password Cracking using CUDA 
Using a similar concept as question 2, you will now crack passwords using CUDA. As a kernel function cannot use the crypt library, you will be given an encryption function instead which will generate a password for you.  Your program will take in an encrypted password and decrypt it using many threads on the GPU. CUDA allows multidimensional thread configurations so your kernel function (which runs on the GPU) will need to be modified according to how you call your function. 

  1. Generate encrypted password in the kernel function (using CudaCrypt function) to be compared to original encrypted password 
  2. Allocating the correct amount of memory on the GPU based on input data. Memory is freed once used 
  3. Program works with varying numbers of blocks and threads (blocks <= 26, threads <= 26) 
  4. Decrypted password sent back to the CPU and printed 


4.Box Blur using CUDA
Your program will decode a PNG file into an array and apply the box blur filter. Blurring an image reduces noise by taking the average RGB values around a specific pixel and setting it’s RGB to the mean values you’ve just calculated. This smoothens the colour across a matrix of pixels. For this assessment, you will use a 3x3 matrix. For example, if you have a 5x5 image such as the following (be aware that the coordinate values will depend on how you format your 2D array):
The shaded region above represents the pixel we want to blur, in this case, we are focusing on pixel 1,2 (x,y) (Centre of the matrix). to apply the blur for this pixel, you would sum all the Red values from the surrounding coordinates including 1,2 (total of 9 R values) and find the average (divide by 9). This is now the new Red value for coordinate 1,2. You must then repeat this for Green and Blue values. This must be repeated throughout the image. If you are working on a pixel which is not fully surrounded by pixels (8 pixels), you must take the average of however many neighbouring pixels there are. 


Your task is to use CUDA to blur an image. 

NOTE – this program should work with any amount of threads.

  1. Reading in an image file into a single or 2D array 
  2. Applying Box filter on image 
  3. Using multithreading appropriately to apply Box filter
  4. Using dynamic memory – malloc 
  5. Outputting the correct image with Box Blur applied 

 

This 6CS005-IT Computer Science Assignment has been solved by our IT Computer Science Expert at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing Style. Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. 

You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turn tin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.