bspline-fortran icon indicating copy to clipboard operation
bspline-fortran copied to clipboard

OpenMP with bspline routines

Open volcompt opened this issue 2 years ago • 1 comments

Hi,

Just want to ask how should the variables inbvx,inbvy,inbvz,iloy,iloz,w1_3d,w2_3d,w3_3d on a 3D splines be set for an open mp code? Should they be shared or private?

Thank you. volcompt

volcompt avatar Feb 12 '22 23:02 volcompt

Have you tried anything? I'm curious to know as well.

the inbvx,inbvy,inbvz,iloy,iloz ones are used to keep track of the last interval in the dataset where interpolation was called, to make searching for the interval on the next call faster. So it's basically assuming serial calls...don't think these can be used in parallel. So each thread probably needs their own, but then you aren't getting the advantage of this feature. I wonder if there is a way to do it in parallel?

w1_3d,w2_3d,w3_3d are just workspace arrays, probably each thread needs separate ones.

jacobwilliams avatar May 01 '22 15:05 jacobwilliams