The FORTRAN interface is based on the ISO_C_BINDING feature, which is available for FORTRAN 2003 or later. The usage of FORTRAN interface is very similar to the C interface as given in the Tutorial section.
In FORTRAN, the PPEXSIPlan data type is c_intptr_t
(or equivalently INTEGER*8
). The naming of the subroutines is similar to the C interface as in c_pexsi_interface.h. All FORTRAN interface routines are in f_interface.f90. For instance, the subroutine PPEXSIPlanInitialize (C/C++) corresponds to the subroutine f_ppexsi_plan_initialize (FORTRAN).
Example: Parallel selected inversion for a real symmetric matrix
The examples of the FORTRAN interface can be found under fortran/
directory, including f_driver_pselinv_real.f90, f_driver_pselinv_complex.f90, f_driver_ksdft.f90.