Is there a way of making PRIVATE only a given element of a derived type while keeping the others SHARED inside an openMP region? Thanks.
No, there isn’t that I am aware of. You would need to separate these out into distinct variables.
Thanks Steve. I don’t see that as an option since that would mean re-factoring huge amounts of code… Would this be something to add into Fortran 202X?.
Not in 202X, and I don’t see how Fortran could do anything for you here. Locality applies to named variables, not subobjects of variables.
I understand. I guess then that this is something for OMP. There should be something like ompthreadprivate declarations for these type of things. It is really important for oop code to have it. Think in a mesh object where the position is fixed, hence can be SHARED, but properties can be calculated independently for different parameters.