grass-addons
grass-addons copied to clipboard
r.accumulate: Add parallelization
OpenMP parallelization added. To do: Test timing and parallelization. This along with r.horizon is where I am confused about testing.
@shreyasudaya Have you actually compiled and tested your parallelized code? Parallelization was not in my mind at all when I first wrote this module and I'm not so sure if simply adding parallel for loops will correctly parallelize all the algorithms. Just tested this PR and I wasn't able to compile it:
calculate_lfp_iterative.c: In function ‘calculate_lfp_iterative’:
calculate_lfp_iterative.c:79:52: error: ‘j’ undeclared (first use in this function)
79 | #pragma omp parallel for schedule(dynamic) private(j)
| ^
calculate_lfp_iterative.c:79:52: note: each undeclared identifier is reported only once for each function it appears in
j
is declared inside the for loop and isn't visible to OMP outside of it.
@HuidaeCho, would you have any suggestion for a different tool that could be easier to implement parallelization for? I don't think there are many low hanging fruits, but maybe v.surf.idw?
Closing this PR.