[Question] Parallel for missing iterations? - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: open.mp (https://forum.open.mp/forumdisplay.php?fid=40) --- Forum: Questions and Suggestions (https://forum.open.mp/forumdisplay.php?fid=42) --- Thread: [Question] Parallel for missing iterations? (/showthread.php?tid=2553) |
Parallel for missing iterations? - visibleonbush1 - 2024-01-18 Hi, I'm working on optimizing a piece of code, the code performs well for smaller values of 'n' (e.g., 10,000), but when 'n' is significantly larger (e.g., 100,000), it seems to skip a considerable number of iterations. Specifically, I've tested it with 'n' set to 100,000, and it only executes 1,410,065,408 iterations out of the expected 10,000,000,000., im asking here because if n is not so big (10k) he is perfectly fine, am i missing anything (thank you in advance). Code: int compute_forces( void ) RE: Parallel for missing iterations? - Threshold - 2024-01-19 Would this line be causing any grief? Code: if (j <= i) { RE: Parallel for missing iterations? - visibleonbush1 - 2024-01-20 (2024-01-19, 03:52 AM)Threshold Wrote: Would this line be causing any grief? No, because i put the the counter before the if clause (its the variable "asdf", yeah i know, not a good name). RE: Parallel for missing iterations? - johndavidd8888 - 2024-05-02 (2024-01-18, 07:00 PM)visibleonbush1 Wrote: Hi, I'm working on optimizing a piece of code, the code performs well for smaller values of 'n' (e.g., 10,000), but when 'n' is significantly larger (e.g., 100,000), it seems to skip a considerable number of iterations. Specifically, I've tested it with 'n' set to 100,000, and it only executes 1,410,065,408 iterations out of the expected 10,000,000,000., im asking here because if n is not so big (10k) he is perfectly fine, am i missing anything (thank you in advance). fnafEvaluating the performance impact of atomic directives. If they cause bottlenecks, consider alternative methods such as using locks or key shares to protect shared data while minimizing operational costs. |