[petsc-dev] Using multiple mallocs with PETSc

Jeff Hammond jeff.science at gmail.com
Fri Mar 10 13:51:55 CST 2017


On Fri, Mar 10, 2017 at 9:09 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
> > On Mar 10, 2017, at 9:58 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> >
> > On 10 March 2017 at 03:19, Barry Smith <bsmith at mcs.anl.gov> wrote:
> >     PetscMallocRegister(malloc,realloc,free,&basicmalloc);
> >     PetscMallocRegister(PetscMallocDebug,PetscReallocDebug,
> PetscFreeDebug,&debugmalloc);
> >     PetscMallocRegister(PetscMallocHBW,PetscReallocHBW,PetscFreeHBW,&
> hbwmalloc);
> >
> > I'm wondering whether we should also handle calloc() here, and implement
> PetscCalloc properly. As I understand it, calloc != malloc+memset, and the
> differences might be important in multicore+multithreading scenarios and
> the first-touch policy.
>
>
My intuition is that any HPC code that benefits from mapping the zero page
vs memset is doing something wrong.

Jeff


-- 
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170310/58cec87d/attachment.html>


More information about the petsc-dev mailing list