updated petsc formula to work in rhel6