You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1) Do not deallocate allocatable private variables if they are
lastprivate at the end of the openmp region because their address
will have been transferred to the host variable when the variable
is copied.
2) Don't use copyHostAssociateVar for allocatable variables. It isn't
clear to me whether or not this should be addressed in
copyHostAssociateVar instead of inside OpenMP. I opted for OpenMP
to minimise how many things I effected. copyHostAssociateVar will
not update the destination variable if the destination variable
was unallocated. This is incorrect because assignment inside of the
openmp block can cause the allocation status of the variable to
change. Furthermore, copyHostAssociateVar seems to only copy the
variable address not other metadata like the size of the allocation.
Reallocation by assignment could cause this to change.
0 commit comments