-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to disable wrapper field synchronization on object destruction #21
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @pmarguinaud for adding this very convenient feature! I've made just a small request to extend INIT_MAP_DEVPTR
to OWNER_INIT as well so we have a configurable mechanism for setting the default value of SELF%MAP_DEVPTR
.
@@ -158,6 +162,7 @@ CONTAINS | |||
SELF%THREAD_BUFFER = .NOT. LLPERSISTENT | |||
CALL SELF%SET_STATUS (NHSTFRESH) | |||
|
|||
SELF%MAP_DEVPTR = INIT_MAP_DEVPTR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overrides the default (.FALSE.) value we set in field_basic_module.F90. I think we should only have one mechanism to set the default value of SELF%MAP_DEVPTR
. I like the configurable INIT_MAP_DEVPTR
, so this should also be applied to OWNER_INIT, and we should remove the default value in field_basic_module.F90.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for pointing this out. I have made the change requested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the fix @pmarguinaud, good to go from me now 👍 you might have to sign the CLA again, the fussy duck has got its wires crossed I think; it made me resign it too.
Hi @pmarguinaud. I would really like to close this PR. Could you please sign the CLA? |
Wrapper fields synchronize their device data back to the host.
This branch adds an option to disable this: wrapper field constructors have been added an optional SYNC_ON_FINAL argument (defaults to TRUE).