On 9 November 2011 16:50, Jed Brown <jedbrown at mcs.anl.gov> wrote: > On Wed, Nov 9, 2011 at 13:42, Lisandro Dalcin <dalcinl at gmail.com> wrote: >> >> But then, what's the point of memzeroing in VecCreate_Sec? Wouldn't it >> be better to fill the array (in debug mode) with signaling NaNs ? > > I'm not opposed to this. > There is a question of how much we want to be tolerant of sloppy users > versus being strict within the library. I think the tactic above (and/or > simply leave it uninitialized and count on valgrind to let us know) would be > good to use in PETSc tests.
OK. I was not taking valgrind into account. > > I'm not sure it's worth pushing on users as the > default. What tactic? Leave entries uninitialized? I'm just asking for PETSc to behave consistently. If CPU memory is zeroed when Vecs are created, the same should happen for GPU memory. -- Lisandro Dalcin --------------- CIMEC (INTEC/CONICET-UNL) Predio CONICET-Santa Fe Colectora RN 168 Km 472, Paraje El Pozo 3000 Santa Fe, Argentina Tel: +54-342-4511594 (ext 1011) Tel/Fax: +54-342-4511169
