[petsc-users] valgrind errors.

(Rebecca) Xuefei YUAN xy2102 at columbia.edu
Tue Jan 19 11:52:21 CST 2010


Dear Jed,

This makes a lot of sense!

I made the following change:


	ierr = PetscMalloc((info.mx)*(info.my)*sizeof(FieldOther),  
&fieldother);CHKERRQ(ierr);

and the values of iFirst, iLast, jFirst, jLast in one single processor is from

	iFirst = info.xs;	iLast = info.xs + info.xm - 1;	jFirst =  
info.ys;	jLast = info.ys + info.ym - 1;


where
	ierr = DAGetLocalInfo((DA)dmmg->dm,&info);CHKERRQ(ierr);

.

However, I still have the same errors as before in valgrind.

I think it is better for me to do the second way of cloning DA to set  
up these temp arrays.

More later.

Thanks so much!

Rebecca
Quoting Jed Brown <jed at 59A2.org>:

> On Tue, 19 Jan 2010 18:44:38 +0100, Jed Brown <jed at 59A2.org> wrote:
>>   PetscMalloc(info.mx*info.my*sizeof(PetscReal),&fieldother);
>
> Oops, I meant
>
>   PetscMalloc(info.mx*info.my*sizeof(FieldOther),&fieldother);
>
> Jed
>
>



-- 
(Rebecca) Xuefei YUAN
Department of Applied Physics and Applied Mathematics
Columbia University
Tel:917-399-8032
www.columbia.edu/~xy2102



More information about the petsc-users mailing list