1. Homepage
  2. Programming
  3. Distributed Systems - Assignment 2: Decode and Search

Distributed Systems - Assignment 2: Decode and Search

Engage in a Conversation
GRIFFITH COLLEGEDistributed SystemsDecode and SearchMPIC++

CourseNana.COM

Standard penalties will be applied to work that is submitted late, as per faculty guidelines.
CourseNana.COM

All work must be your own
If you copy from someone else, both parties will be awarded a grade of 0. CourseNana.COM

Use of AI tools such as OpenAI or ChatGPT is strictly prohibited. Avoid the use of any online resources excepting Stack Overflow. Do not share your code anywhere. CourseNana.COM

By submitting your assignment you accept that you understand what plagiarism is and that your assignment is not plagiarised in any way. CourseNana.COM

Any cases of suspected plagiarism will be thoroughly investigated and may be brought in for VIVA. CourseNana.COM

Learning Outcomes CourseNana.COM

Programme and related module learning outcomes that this assignment is assessing: CourseNana.COM

1,3 CourseNana.COM

Assessment Criteria CourseNana.COM

Assessment criteria applied to this assignment, such as: CourseNana.COM

q Presentation
q CodeStructureandCleanliness q CodePerformance
q AppropriateOutput
q AppropriateMethodSelection CourseNana.COM

Assignment 2: Decode and Search CourseNana.COM

Ensure your code is well commented, as well as neat and readable. Code that fails to compile will incur a penalty of 30%. CourseNana.COM

Work that is submitted late will incur standard penalties as per faculty guidelines. CourseNana.COM

For all programs you write: print your name and student number to the console once, and include a comment at the top with your full name and student number. CourseNana.COM

You are given a template which includes several helper methods. Use this template to complete the tasks for part 1. CourseNana.COM

____________________________________________________________________________________________

Part 1 – MPI Program 50% CourseNana.COM

____________________________________________________________________________________________

The provided a template .cpp file containing several helper methods: createData(), decryptText(), searchText(), and exportText(). You do not need to modify these methods, only invoke as needed. You are also provided your own text file to be decoded and searched. Include this in the same directory as your executable file. CourseNana.COM

Use the given template to create a distributed decryption MPI program to be run using 4 nodes: CourseNana.COM

  1. a)  The given text file is encrypted with a traditional Caesar cipher using a key from 1-25. The key to be used to decrypt the text file should be taken from the user in console by Node0. The key should then be broadcast to all other nodes. CourseNana.COM

    Example: plaintext = ‘abcd’ key = 2 ciphertext = ‘cdef’ CourseNana.COM

  2. b)  Node0 will read the txt file and store the data into an array by invoking createData(). The array should then be partitioned into equal sized chunks to be distributed among all nodes. CourseNana.COM

  3. c)  Each node will decrypt their given chunk using the key provided in console using the decryptText() function stored into a new char array called decipheredArray. After deciphering the text, each node will print its deciphered array. CourseNana.COM

  4. d)  Each node will then invoke searchData() on its deciphered partial array to find how many instances of the word “DISTRIBUTED” is contained in its partition. After the function is called, each of the nodes will print its rank and the amount of hits found. CourseNana.COM

  1. e)  Node 3 will collect each of the hits from the multiple nodes and add these together. The result subsequently placed into a new variable, which will be called totalhits. Node 2 will output this variable to console in the format: “Distributed was found a total of <totalhits> times.” CourseNana.COM

  2. f)  Each node will have a decrypted partial array of differing sizes. Use strlen(partialArray) to store the length of each partial array. Node 0 will collect all the partial decrypted text arrays from each of the nodes, store into decryptedTotalArray and export as a text file by invoking the exportText() function. Save the text file as <yourname>DecryptedText.txt Include in your submission. CourseNana.COM

Remember to close the MPI library and return control to the OS. Ensure your code will work with a world size of 4. CourseNana.COM

____________________________________________________________________________________________

Part 2 – Documentation 40% CourseNana.COM

____________________________________________________________________________________________

You are to write a report relating to your code for part 1. This is a compulsory part of your submission. Any submissions that do not include a report will receive an automatic 0. CourseNana.COM

Use the provided template to complete your report. Answer each question in the report, providing explanations, diagrams and screenshots as requested. CourseNana.COM

Remember to change the Name and StudentNumber at the top of the report, and save as a PDF. CourseNana.COM

You will also be graded on the quality of your code. Ensure any code you submit is robust, well commented, and well structured. CourseNana.COM

Always include a comment at the top of your code with your name and student number, and output these to console once. CourseNana.COM

Submit your .cpp file (do not include header or makefiles) and pdf report archived into a .zip file. CourseNana.COM

Tips: CourseNana.COM

Þ Keep your code simple: Coordinator() and Participant() not needed. Þ Read the brief, then read it again. Then read the brief. CourseNana.COM

Þ Ensure your code is tidy and readable.
Þ Include appropriate comments.
Þ Make sure your code compiles and runs correctly. CourseNana.COM

o Anything not working, comment out and tell me why.
Þ Information that you output to console should be clear and concise. CourseNana.COM

CourseNana.COM

o For example, your name/number should only be printed once Þ Use the most appropriate MPI function for the task.
Þ Use the provided template and helper methods.  CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
GRIFFITH COLLEGE代写,Distributed Systems代写,Decode and Search代写,MPI代写,C++代写,GRIFFITH COLLEGE代编,Distributed Systems代编,Decode and Search代编,MPI代编,C++代编,GRIFFITH COLLEGE代考,Distributed Systems代考,Decode and Search代考,MPI代考,C++代考,GRIFFITH COLLEGEhelp,Distributed Systemshelp,Decode and Searchhelp,MPIhelp,C++help,GRIFFITH COLLEGE作业代写,Distributed Systems作业代写,Decode and Search作业代写,MPI作业代写,C++作业代写,GRIFFITH COLLEGE编程代写,Distributed Systems编程代写,Decode and Search编程代写,MPI编程代写,C++编程代写,GRIFFITH COLLEGEprogramming help,Distributed Systemsprogramming help,Decode and Searchprogramming help,MPIprogramming help,C++programming help,GRIFFITH COLLEGEassignment help,Distributed Systemsassignment help,Decode and Searchassignment help,MPIassignment help,C++assignment help,GRIFFITH COLLEGEsolution,Distributed Systemssolution,Decode and Searchsolution,MPIsolution,C++solution,