How to parallelize this fortran code by openmp
I have a fortran code to calculate particle motion. there are alway many big loops. Some guy suggest me to use openmp to speed it up. the following is the pseudo code. Do I do it correctly?
c$OMP PARALLEL DO DEFAULT(SHARED), PRIVATE(i,ni,c2,ks,ke)
It can be seen that the loop i in the code is independent, but loop k is dependent. All calculations mainly happen in loop k which is small, up to 8. The loop i is always big, up to 200,000. I only want to use openmp for loop i. Your hints would be greatly appreciated. Cheers,ronac
|All times are GMT -4. The time now is 03:11.|