firemodels / fds

Fire Dynamics Simulator
https://pages.nist.gov/fds-smv/
Other
648 stars 618 forks source link

Write a parallel code in C++ 11 and OpenMP that solves efficiently the main operation in a (CNN) #13022

Closed tommasoandina1 closed 3 months ago

tommasoandina1 commented 3 months ago

To maximize parallel operations on a computer with an M3 processor that contains 11 CPUs and 11 threads, it is essential to optimize the workload distribution and ensure efficient resource utilization. Implementation details: Inputs: file with input matrix (you choose the size) and kernel (fixed size 4x4) The goal is to first have a working sequential code for the four operations. Then, parallelize the operations that can be efficiently parallelized. Pay special attention to data races (more threads requesting the same input) and to concurrency/conflicts (multiple threads updating the same output). As a general suggestion, to achieve the best performance you should group in one thread (or in multiple threads executed in the same CPU) all the operations that work on the same input data. This avoids costly data copy to multiple locations. There are multiple ways to parallelize the code. You can parallelize the single convolution or you can parallelize the convolutions (each thread executes a 4x4 convolution). Please discuss the benefit of each solution and evaluate the performance of both. Suggestion: when you parallelize convolutions pay attention that if multiple threads take subsequent sliding convolutions they all will need the same part of the input data, thus.... You need to create an OpenMP file with the implementation of the convolution and a main file for testing the function. The main will:

mcgratta commented 3 months ago

This appears to be a misplaced message.