re-added compiler directives around petsc error int