I am trying to update some code that works in version 3.7.6 to version 3.8.3.

What is the recommended way to check if a petsc type, such as Vec, has already been created?

Current code looks like:

Vec xvec

if(xvec.eq.0) then          ! Check if xvec needs to be created
  call VecCreate(PETSC_COMM_WORLD, xvec, ierr)
endif

In PETSc 3.8.3 I am now getting a compiler error

parkv.F(60): error #6355: This binary operation is invalid for this data type.   [XVEC]
      if(xvec.eq.0) then
---------^

Reply via email to