added compiler flags so that code compiles without petsc