[petsc-users] petsc-dev and Fortran include files

Tabrez Ali stali at geology.wisc.edu
Sun Mar 1 14:05:57 CST 2015


Hello again

This is probably not directly related to petsc but what is the simplest 
way to handle the change in the path of the include files (in petsc-dev) 
while using Fortran?

I guess I can do the following:

#include <petscversion.h>
#if (PETSC_VERSION_RELEASE==0)
#include <petsc-finclude/petsc.h90>
#else
#include <finclude/petsc.h90>
#endif

but then I have to repeat it a number of times in each 
module/subroutine. Is there a simpler way? I am not sure if I can use a 
preprocessor variable in the include directive.

T


More information about the petsc-users mailing list