[petsc-dev] Using multiple mallocs with PETSc
Jed Brown
jed at jedbrown.org
Fri Mar 10 14:42:04 CST 2017
Jeff Hammond <jeff.science at gmail.com> writes:
> My intuition is that any HPC code that benefits from mapping the zero page
> vs memset is doing something wrong.
The relevant issue is the interface, from
a = malloc(size);
// need to fault the memory using first-touch
#pragma omp parallel
{
// memset my part
}
// ...
#pragma omp parallel
{
// Use a[] knowing it starts zeroed
}
versus
a = calloc(size,1);
// ...
#pragma omp parallel
{
// Use a[] knowing it starts zeroed
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170310/32c17acd/attachment.sig>
More information about the petsc-dev
mailing list