Skip to content
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

Merged
merged 4 commits into from
Feb 2, 2024

Conversation

pmarguinaud
Copy link
Collaborator

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).

Copy link
Collaborator

@awnawab awnawab left a 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
Copy link
Collaborator

@awnawab awnawab Jan 24, 2024

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.

Copy link
Collaborator Author

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.

@FussyDuck
Copy link

FussyDuck commented Jan 24, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@awnawab awnawab left a 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.

@awnawab
Copy link
Collaborator

awnawab commented Feb 2, 2024

Hi @pmarguinaud. I would really like to close this PR. Could you please sign the CLA?

@pmarguinaud pmarguinaud merged commit dba65c7 into main Feb 2, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants