[petsc-dev] Adding support memkind allocators in PETSc

Richard Mills rtm at utk.edu
Wed Apr 29 00:29:16 CDT 2015

I think this is maybe getting away from the heart of the discussion, but
anyway: Barry, you are talking about being able to mark certain allocated
regions as "optional" and then have those allocations disappear, right?  I
could see, say, having such an "optional" allocation that is backed by a
file on some sort of "fast" storage (some super-fancy SSD or NVRAM) and
whose pages can be evicted if the memory is needed.  I don't know that I
like a pointer to that just being nullified if the eviction occurs,
though.  For a case like this, I'd like to do something like have a Vec and
only have this happen to the array of values if no "get" is outstanding.
This puts us back with an array to the numerical values that could get
swapped around.

On Tue, Apr 28, 2015 at 8:44 PM, Jed Brown <jed at jedbrown.org> wrote:

> Barry Smith <bsmith at mcs.anl.gov> writes:
> >   The special malloc would need to save the locations at which it set
> >   the addresses and then switch the address to NULL. Then the code
> >   that used those locations would have to know that they that they may
> >   be set to NULL and hence check them before use.
> And then PetscMalloc(...,&tmp); foo->data = tmp; creates SEGV at some
> unpredictable time.  Awesome!
> >   I am not saying this particular thing would be practical or not,
> >   just that if we had a concept of a malloc context for each malloc
> >   there are many games we could try that we couldn't try otherwise and
> >   this is just one of them.
> I'm not convinced, except in the case of mixing in madvise hints.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150428/5aa8862a/attachment.html>

More information about the petsc-dev mailing list