Project

General

Profile

Bug #2612

HostAllocationPolicy shares pointers and pinning setting through shared_ptr

Added by Berk Hess 10 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
core library
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

The pointer to allocated memory should not be part of the allocator, since one should be able to copy an allocator.
Also the pinning setting, CanBePinned and the actual pinning settings, should not be shared, since then changing such a setting for an object with a copied allocator will also change the setting in the source (and make objects inconsistent).

Related to #2578


Related issues

Related to GROMACS - Bug #2578: with PME on GPU, EM setup does not propagate state->x pinning settingsClosed

Associated revisions

Revision a6261218 (diff)
Added by Roland Schulz 10 months ago

Remove meta information from host allocator policy

Also prevent HostAllocator to be copied/propagated.
A HostVector shouldn't be copied without the calling code
having a choice on the pinning policy.
This commit prevents copy construction. Move construction and
copy and move assignment is still allowed.
For move/swap nothing is changed.
For copy assignment the pinning policy of the destination
container is used.

Fixes #2612

Change-Id: I15034e4db2434ea46eda84e70e3f8e6072660d20

History

#1 Updated by Berk Hess 10 months ago

  • Related to Bug #2578: with PME on GPU, EM setup does not propagate state->x pinning settings added

#2 Updated by Gerrit Code Review Bot 10 months ago

Gerrit received a related patchset '8' for Issue #2612.
Uploader: Berk Hess ()
Change-Id: gromacs~master~I15034e4db2434ea46eda84e70e3f8e6072660d20
Gerrit URL: https://gerrit.gromacs.org/8192

#3 Updated by Berk Hess 10 months ago

  • Target version set to 2019

#4 Updated by Roland Schulz 10 months ago

  • Status changed from In Progress to Resolved

#5 Updated by Mark Abraham 9 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF