FIT3143 - Parallel Computing (S2, 2020) Assignment 2 - Frequently Asked Questions Note: This document will be periodically updated with new questions and possible revisions to current answers. Last updated: 23rd October 2020, 1 AM AEDT (16 questions) 1. What if my team consists of three members? A: The depth of the simulator and report will increase: a) The team is required to simulate a fault detection and response method, as mentioned in page 3 of the assignment specifications (See Question 7 in this FAQ). b) The length of the report increases from max 3,000 words to up to 4,000 words. 2. What do I need to submit for this assignment? A: Please refer to the submission requirements in pages 4 and 5 of the assignment specifications. 3. Is each team member required to make a submission in Moodle? A: Yes - individual submission. Although you are working in a group of two (or three) members and your code files, report and log files will be the same within a group, each team member is required to make a submission independently in Moodle. 4. I have read the assignment specifications. However, I am still not sure how to start the assignment. So, how do I start the assignment? A: The following response includes sub-questions with answers: Let’s say the wireless sensor network comprises 20 nodes and a base station. These nodes are arranged in a 4 x 5 (rectangular-shaped) grid as per the tabulated illustration in the following page. In this example, each node and base station is a Message Passing Interface (MPI) Process, so now you have a total of 21 MPI processes. Let’s say MPI Rank21 is the base station and the remaining ranks simulate the sensor nodes. 1of 12 Let’s assume your map/grid looks like the following: 0 1 2 3 4 0 Rank0 (0,0) Rank1 (0,1) Rank2 (0,2) Rank3 (0,3) Rank4 (0,4) 1 Rank5 (1,0) Rank6 (1,1) Rank7 (1,2) Rank8 (1,3) Rank9 (1,4) 2 Rank10 (2,0) Rank11 (2,1) Rank12 (2,2) Rank13 (2,3) Rank14 (2,4) 3 Rank15 (3,0) Rank16 (3,1) Rank17 (3,2) Rank18 (3,3) Rank19 (3,4) What are “adjacent nodes”? All the immediate neighbours in top-bottom and left-right directions are “adjacent nodes”. For instance, by referring to the grid layout above: ● For node Rank6 (1,1), adjacent nodes are: Rank1, Rank11, Rank5, Rank7. ● For node Rank10 (2,0), adjacent nodes are: Rank5, Rank15, Rank11. ● For node Rank15 (3,0), adjacent nodes are: Rank10, Rank16. Communication scheme: Each node communicates with adjacent nodes directly. Non-adjacent nodes (such as Rank11 and Rank14) can’t communicate directly. Communication between the nodes and base station may take place using any of the following methods: ● Blocking or non-blocking Send/Receive ● Broadcast ● Scatter/Gather ● Any other method that you think is appropriate. 2of 12 What is an “Event”? At each sensor node, the program/simulation will iteratively run (until a termination message is received from the base station). Each iteration runs at a y millisecond interval (where y = you decide). At each iteration: a) The sensor node will generate a random number to simulate a surface temperature value at a given time. You can specify a range for random number generation to increase the chances of generating high surface temperature values. The rest of the points are similar as mentioned in page 2 of the assignment specifications. b) If the generated random value exceeds a pre-defined threshold, this constitutes a possible event. The node will then send a request to its immediate adjacent neighbourhood nodes to acquire their readings for comparison purposes. To reiterate, the neighbourhood nodes refers to immediate top, bottom, right and left adjacent nodes. c) Upon receiving sensor readings from its neighbourhood nodes, the node compares these readings to its own readings to check if the readings are similar. d) Should the readings from at least two or more neighbourhood nodes match the sensor readings of the local node (within a predefined tolerance range), the node sends a report (i.e., alert) to the base station. e) The report sent to the base station should include information about the time at which an alert is detected, sensor value readings, number of messages compared with the neighbourhood modes, etc. You should demonstrate efficiency when reporting an alert message to the base station. In this context, you should minimize the number of send messages to the base station when reporting an alert condition. f) The sensor node repeats parts (a) to (e) until upon receiving a termination message from the base station. Once the node receives a termination message, the node cleans up and exits. 5. How about the base station? What does it do? A: To expand on the specifications of the base station in page 3 of the assignment specifications: a) The base station runs an iterative loop for a number of iterations. The number of iterations is set by you. Each iteration runs at a y millisecond interval (where y = you decide). Once the number of iterations has been reached, the 3of 12 base station could then issue a termination signal to all sensor nodes and shutdown the program. b) At each iteration, the base station checks for any messages sent by sensor nodes. If the base station receives a message from the sensor node, before logging the message into disk (i.e, writing the message to a log file), the base station needs to first compare the received sensor readings (and timestamp) with that of the readings received from the infrared satellite image. c) You can simulate the infrared satellite image data as a thread (running asynchronously) in the base station. Here, the thread periodically generates a random number to simulate surface temperatures measured from space. (best if you use the same range of random values as mentioned in Question 4(a) above). The thread also generates a random coordinate based on the sensor grid setup. This random number is mapped to a timestamp and stored in a global array. The size of the global array is fixed (you decide the size) and old values are omitted from the array to allow for new values to be pushed into the array. For instance, the thread can generate the following tabulated data which is stored into an array: Timestamp Reading (e.g., Celsius) Coordinate (grid) 20200920-11:50:05 90 (0,2) 20200920-11:54:01 88 (1,2) 20200920-11:59:01 108 (2,2) d) Continuing from part (c) above, upon receiving an alert message from a sensor node, the base station compares the sensor’s reading, location and timestamp with that of the readings in the global array. If there is a match (not necessarily has to be an exact match), then the base station logs the alert into a log file. If there is no match, the base station can also log the alert as a false alert. In your report, you could then include an analysis on the number of true and false alarms. 6. What should a base station log? A: As much information as possible. Examples include: ● Timestamp of the alert message ● Alert type (True or False) ● Reporting Node information 4of 12 ● Adjacent node information ● Infrared satellite reading ● Communication time ● Number of messages sent by reporting node to base station ● Number matching adjacent nodes’ temperature reading to the reporting node’s temperature reading. An example of an entry by the base station into the log file: ------------------------------------------------------ Iteration : 15 Logged Time : Wed 2020-09-16 19:23:12 Alert Reported Time : Wed 2020-09-16 19:23:11 Alert Type: True Reporting Node Coord Temp MAC IP 12 (2,2) 98 54:bf:64:91:f8:8a 118.139.135.57 Adjacent Nodes Temp Coord Temp MAC IP 7 (1,2) 96 54:bf:64:91:f8:8a 118.139.135.57 11 (2,1) 95 54:bf:64:91:f8:8a 118.139.135.57 13 (2,3) 97 54:bf:64:91:f8:8b 118.139.135.58 17 (3,2) 80 54:bf:64:91:f8:8b 118.139.135.58 Infrared Satellite Reporting Time (Celsius) : Wed 2020-09-16 19:23:08 Infrared Satellite Reporting (Celsius) : 98 Infrared Satellite Reporting Coord : (2,2) Communication Time (seconds) : 0.075 Total Messages send between reporting node and base station: 1 Number of adjacent matches to reporting node: 3 ------------------------------------------------------ ------------------------------------------------------ Iteration : 16 Logged Time : Wed 2020-09-16 20:25:12 Alert Reported Time : Wed 2020-09-16 20:25:14 Alert Type: False Reporting Node Coord Temp MAC IP 5 (1,0) 88 54:bf:64:91:f8:8c 118.139.135.58 Adjacent Nodes Coord Temp MAC IP 0 (0,0) 86 54:bf:64:91:f8:8c 118.139.135.59 6 (1,1) 85 54:bf:64:91:f8:8d 118.139.135.60 10 (2,0) 87 54:bf:64:91:f8:8d 118.139.135.60 Infrared Satellite Reporting Time (Celsius) : Wed 2020-09-16 20:25:13 Infrared Satellite Reporting (Celsius) : 55 Infrared Satellite Reporting Coord : (1,0) Communication Time (seconds) : 0.065 Total Messages send between reporting node and base station: 1 Number of adjacent matches to reporting node: 3 ------------------------------------------------------ 5of 12 At the end of the program, the base station writes a summary into the log file. Examples include: ● Number of messages passed throughout the network when an alert is detected. ● Number of alerts (true and false) occurred throughout the network. ● Total communication time. Note: Writing these metrics to a log file would help us evaluate the efficiency and correctness of your program. Hence, try to log as much useful information as possible. In addition, you are not required to exactly follow the example log file entry as aforementioned. You can determine your own format of entry, so long as the log file contains useful information. 7. What about the fault detection requirements for this assignment? A: This requirement applies to teams of three members. You should design and implement a fault detection algorithm whereby a sudden failure of a node is detected by the base station and/or adjacent nodes. You may choose to select and implement a fault detection algorithm of your choice. More importantly, should a fault be detected, your model should demonstrate a response to it. This response includes proper logging of the node(s) failure and graceful shutdown of the entire network. You need to report this in the report and demonstrate it during the code interview in Week 12. Note: If you belong to a team of two members, you are not required to implement fault detection. 8. Are there any sample reports as a reference? A: Yes, we have included two sample reports (from year 2019) as a reference in the Assessment section in Moodle. Please note that the requirements in last year’s reports are substantially different from this year’s report. As such, please consider the sample reports as a reference to give you an indication of what to write in your actual report. 9. Could I expand the scope of the assignment? For instance, I would like to expand the scope of the assignment whereby each node is also able to indirectly communicate with non-immediate adjacent nodes via the base station. Is this allowed? 6of 12 A: The requirements in the assignment specifications serve as a baseline on the outcomes of the simulation model. If you have the motivation to expand the scope of the assignment further (e.g, including visualisation of the reported fires on an artificial map), we certainly do encourage you to pursue this. However, please bear in mind that the baseline requirements of the assignment needs to be fulfilled. 10. In terms of performance, what do I need to measure for this assignment? A: To clarify, this assignment does not focus on data parallelism. Hence, there is no need to compute theoretical speed up and actual speed up. Instead, this assignment focuses on inter process communication (IPC) using Message Passing Interface (MPI) and asynchronous computing using thread(s). As such, you could consider measuring the following: a) Communication time between adjacent nodes. b) Communication time between the reporting node and the base station. Based on the logged communication, you can then carry out an analysis of your implemented design based on its efficiency. You are also encouraged to run your program on MonARCH to obtain a more representative communication time when running the program across multiple processors. 11.My personal computer (or virtual machine) has a limited number of processors. How am I supposed to obtain a representative performance analysis? A: As highlighted in the preceding question, this assignment focuses on IPC and asynchronous computing using thread(s). Although you are required to demonstrate a dynamic range of m and n values for the grid, you can start by using small values for m and n (e.g. m = 3, n = 3), and then gradually increase the values of m and n. You can then repeat this step using MonARCH and compare the communication performance between the local computer and the MonARCH cluster platform. Bear in mind that each MPI process (simulating the sensor node or base station) will execute an iterative loop with an interval between each iteration (e.g, 50 ms). Adding this interval actually reduces the computing load on your computer and allows you to run a higher number of MPI processes for this assignment. 12.Can each sensor node keep an individual log file? A: In the assignment specifications, the base station is required to log alerts (either true or false alerts). Nevertheless, for the purpose of debugging, each node can also keep a node specific log file. 7of 12 13.With reference to the answer for Question 5(c) above, the suggested method makes it difficult for the thread simulating the infrared imaging satellite to generate random temperature values that match the reported values from a sensor node. Could I modify the implementation? A: Yes you can. You may opt to have the thread periodically generate random temperature values for the entire grid, and then push this data into a shared array, which can be accessed by the MPI process simulating the base station. This approach could increase the probability of reporting true alerts into the log file. 14.Can I use OpenMP thread instead of POSIX thread to simulate the infrared imaging satellite? A: Yes you can Open Multi-Processing (OpenMP) to simulate the infrared imaging satellite. 15. I am new to technical writing. How do I start writing the assignment report? A: The following table provides a sample guidance on information to include into your report. A video providing guidance on writing the assignment report was published on 21st October 2020. If you are new to technical writing, you are encouraged to view this video. 1 Cover sheet a) Please include the Faculty’s group assignment cover sheet as the first page of your report. b) Inside the cover sheet and next to your student ID(s), please specify the percentage of your contribution to the assignment. For instance: c) Try to include the cover sheet as an image into your report. 2 Title a) Create a simple title which best fits your assignment. For instance: Design and implementation of a distributed wireless sensor network simulator for alert detection. 8of 12 b) Ensure that your name(s), affiliation (i.e., Faculty of Information Technology or School of Information Technology, Monash University) and e-mail addresses are written under the title. c) Please include an estimated word count of your report (before the abstract section). The word count excludes the reference section and appendix section (if any). 3 Abstract a) In about 150 words, provide a summary of the report. Briefly specify the scope of the report in simulating a wireless sensor network and results of the simulation. 4 Introductio n a) You may start by discussing the preamble as mentioned in the assignment specifications (please paraphrase the preamble). b) Introduce the concept of inter process communication and how the simulator applies this concept to investigate the behaviour of the sensor network. You could cite several research papers or academic publications which mentions related work to inter process communication or wireless sensor networks. c) Present a brief overview of the assignment (i.e., MPI grid setup to simulate the sensor nodes, separate MPI process to simulate the base station and a thread to simulate the infrared imaging satellite. d) Introduce a hypothesis (i.e., theory or assumption) for the assignment work. Possible hypothesis: i) For a given grid size, the communication time measured by the base station increases linearly (or non-linearly) for an increasing number of simultaneous reported alerts by sensor nodes, or ii) For an increasing number of simultaneous reported alerts by the sensor nodes, the event time from the sensor node queued at the base station may no longer match the temperature values produced by the infrared imaging satellite, or iii) The infrared imaging satellite producing random temperature values for the entire sensor grid coordinates at each iteration produces better true alerts when compared with producing one temperature to a single grid coordinate per iteration. You may also opt to include hypotheses by referring to related research papers with proper citation (to reiterate, this is optional, just for you to consider). e) Specify the objectives of the report. Note that the objectives in the report are not exactly the same to the objectives mentioned in the assignment specifications. The objectives in the assignment specifications are related to the learning outcomes of the unit. The objectives in your report focuses more on the technical aims of your work. For instance: i) To design and implement a dynamic two-dimensional grid 9of 12 based wireless sensor network and base station simulator using Message Passing Interface (MPI), to simulate a fire alert system. ii) To improve the accuracy of reported fire alerts by sensor node(s) through secondary data comparison from temperature readings from a simulated infrared imaging satellite using asynchronous programming. iii) To analyse communication delays between sensor nodes and base station for an increasing number of reported alerts (this is linked to your hypothesis) f) Briefly describe the layout of the report. Example: Section II describes the design of the architecture; Section III analyses the performance of the architecture and Section IV concludes the report. Note that you can have more than four sections in your report (this is optional). Once you have the introduction written, the remaining sections will become clearer to you. 5 Design scheme for sensor network a) Specify in detail the design and implementation of the simulated wireless sensor network node based on the objectives you have described in Section I. b) Include an illustration of grid network to provide a clear idea of the architecture. You can refer to the sample illustrations in the assignment specifications and in the FAQ. However, please draw your own version of it. c) You can divide the design section into several subsections to describe each simulated component. For instance: i) Subsection A: Sensor node. ii) Subsection B: Base station. iii) Subsection C: Infrared imaging satellite. d) For each sub-section above, include flowcharts and/or pseudo code or mathematical equations (if any) to describe the algorithm or design of your entire simulator. You could also include a diagram illustrating what type of information is packed into a single data for transmission to the base station. There are no restrictions on the type and number of diagrams and/or pseudocode to be included in the report, provided this additional information adds value to your report. Ensure the information mentioned in this section covers the requirements mentioned in the assignment specifications for the sensor node, base station and infrared imaging satellite. You may refer to the sample reports in Moodle for some reference. e) Provide an explanation of the diagrams, flowcharts and/or pseudocode in the subsection. For instance: Figure 2 illustrates the method of requesting and exchanging temperature values between a sensor node and its adjacent nodes. In this figure, the sensor node first sends a request message to the adjacent nodes... Avoid just including the aforesaid diagrams/pseudocode without proper 10of 12 explanation. The explanation is important to justify the selection of the design approach in simulating the sensor network. You could cite research papers (or academic publications) to help justify your explanation. You could also link your explanation to the hypothesis mentioned in the Introduction section as a possible rationale to your design choice and algorithms. 6 Results & Discussion a) Include a brief subsection to provide details on the simulation experiment setup. Here, you can specify the following: i) Platform tested on (local/virtual machine or MonARCH, both of any other platform) ii) Specifications of the platform (i.e., number of available logical processors, system memory, CPU frequency, network bandwidth (this applies if you are testing on a cluster), MAC and/or IP address. iii) Specification of each test run (i.e., size of the grid, temperature threshold, number of iterations at the base station). You should test with different grid sizes. iv) Number of runs per test specification. b) In the next subsection, tabulate results of the test run. You may also include graph(s) depicting the performance of the sensor node for an increasing grid size or the performance of the base station for an increasing number of reported alerts. You should also include screenshots of the log files and a table summarizing the outcome of each simulation and proper termination of all nodes at the end of the simulation. c) Add a sub-section discussing the tabulated results. Provide an observation on the behaviour of the sensor network for different grid sizes or when tested on different platforms (e.g., on MonARCH). Analyse the results and compare these results with the hypothesis presented in the Introduction section. Discuss possible limitations based on the tabulated results. 7 Conclusion a) Summarize the outcomes of the report. Re-iterate the objectives and provide an affirmation that the objectives of the simulation were achieved. Re-affirm if the hypothesis were accurate or otherwise. Suggest some future work based on the outcomes of the simulation results. 8 Reference section a) Please include a list of references which are cited in the report. There is no limit to the number of references. Nevertheless, try to keep the list of references short (e.g., 10 references). As a whole, your report resembles an experiment on simulating the wireless sensor node as per the assignment specifications. Please do not be alarmed by the information above. This information is here to help you write the report. If you refer to the steps above, you should be able to complete the report in a timely manner. Note that a lengthy report does not necessarily mean that you will get higher marks. Therefore, keep your report concise. 11of 12 16. I am finding it difficult to implement the assignment specifications, whereby: “If the generated random value exceeds a pre-defined threshold (e.g., > 80 degrees Celsius), this constitutes a possible event. The node will then send a request to its immediate adjacent neighbourhood nodes to acquire their readings for comparison purposes...” Could I implement a simpler approach like the one I did in Task 2 of Lab Week-09? A: Yes you may use the approach you implemented in Task 2 of Lab Week-09 when exchanging values with the adjacent nodes. However, there could be a slight marks deduction in the Event detection criterion for each sensor node section (in the assignment rubric for Demo + Q&A). The mark deduction here will not exceed 1 mark out of the total 25 marks for the assignment. 12of 12
欢迎咨询51作业君