[petsc-dev] IS updates breaking some fortran tests

Barry Smith bsmith at mcs.anl.gov
Wed Nov 17 16:19:23 CST 2010


On Nov 17, 2010, at 4:15 PM, Dmitry Karpeev wrote:

> I just pushed an IS update that causes problems in some fortran tests.
> I'm not sure exactly what's going on, but a failure occurs, for
> example, in src/vec/examples/tests/ex1f
> in VecValid.  Looked at with a debugger it reveals that 'flg', a
> pointer to boolean that is being passed from Fortran
> to C, is wiped out and emerges as NULL on the C side (I assume, upon a
> cast; since there is no temporary
> in vecvalid_ that holds the result of the "cast", I can't really
> examine the intermediate value passed to C).
> 
> I've been trying to figure this out for a bit, but have come up with
> nothing so far (e.g., valgrind runs on ex1f fine).
> I'm sure this will show up in the nightly builds, but I figured I'd
> push this change, hoping that someone with a
> better knowledge of Fortran bindings will help me figure this out.
> 
> Thanks.
> Dmitry.

  Huh, your changes shouldn't have anything to do with VecValid, nor affect it in any way. Any problem should exist both with or without your changes 

   BTW: VecValid() is not a legitimate function, should never be used and should be removed from PETSc-dev ASAP. Why it is too dangerous poking around with an unknown pointer.

   Barry





More information about the petsc-dev mailing list