Can any of you replace the PetscValidPointer(newmat,3) check for the proper one PetscValidHeaderSpecific(mat,MAT_CLASSID,2); ? -- Lisandro Dalcin --------------- CIMEC (INTEC/CONICET-UNL) Predio CONICET-Santa Fe Colectora RN 168 Km 472, Paraje El Pozo Tel: +54-342-4511594 (ext 1011) Tel/Fax: +54-342-4511169