Popis: |
Many numerical simulation problems involve processing of large arrays of numbers or data structures, usually representing a discretization mesh. Each iteration over the large array is equivalent to a time step, which is then repeated until the entire simulation is finished. A single threaded program is easy to design but it will use only one processor, and multiprocessor (or multicore) systems are today very common. To reduce simulation time by using multiple processors a multithreaded program must be used. This paper presents considerations about how many threads to use and how to distribute the workload to them. |