I wrote a code using deal.II. Now, I want to compare effect of the number of
cores on the simulation time. The code is developed based on step-42 from
deal.II tutorial.
The code is executed in Ubuntu 14.04, Intel core i5 and 4GB ram as,
mpirun –n <number of cores> ./code parameter_file.prm
The obtained results for 1, 2 and 4 cores is,
Number of cores | Total wall clock time
1 | 1.22s
2 | 0.90s
4 | 0.93s
Why the wall clock time for 4 cores is greater than the one obtained with 2
cores.
I also executed step-42 (Just 2 cycles) and the same pattern is observed,
Number of cores | Total wall clock time
1 | 4.73s
2 | 4.13s
4 | 5.89s
There are multiple possibilities:
* The problem is too small. If you split it into too many chunks, then each
process does not have enough time to work, and all time is spent on
communication. Because you have more communication if you have more
processors, things actually take longer. Solution: Make the problem larger.
* You don't actually have four independent processors. For example, it could
be that your i5 really only has two cores, each of which can execute two
threads concurrently. But these two threads compete for resources, and so
using 4 threads is not faster than using 2 threads (= 2 processes).
Other possibilities come to mind as well, but these I would investigate.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bange...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.