[petsc-dev] Using multiple mallocs with PETSc
Lisandro Dalcin
dalcinl at gmail.com
Sat Mar 11 04:41:47 CST 2017
On 10 March 2017 at 22:51, Jeff Hammond <jeff.science at gmail.com> wrote:
>
>
> 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,Pets
>> cFreeDebug,&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.
>
>
I have the same feeling, but people will continue to use OpenMP no matter
how much you advocate against it.
--
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/
4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 0109
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa
Office Phone: +966 12 808-0459
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170311/2f03dd77/attachment.html>
More information about the petsc-dev
mailing list