#include #if defined(PETSC_HAVE_FORTRAN_CAPS) #define petscfprintf_ PETSCFPRINTF #define petscprintf_ PETSCPRINTF #define petscsynchronizedfprintf_ PETSCSYNCHRONIZEDFPRINTF #define petscsynchronizedprintf_ PETSCSYNCHRONIZEDPRINTF #define petscsynchronizedflush_ PETSCSYNCHRONIZEDFLUSH #elif !defined(PETSC_HAVE_FORTRAN_UNDERSCORE) #define petscfprintf_ petscfprintf #define petscprintf_ petscprintf #define petscsynchronizedfprintf_ petscsynchronizedfprintf #define petscsynchronizedprintf_ petscsynchronizedprintf #define petscsynchronizedflush_ petscsynchronizedflush #endif #if defined(__cplusplus) extern "C" { #endif PETSC_EXTERN void petscsynchronizedflush_(MPI_Fint * comm, FILE **file,int *ierr) { FILE *f = *file; if (!f) f = PETSC_STDOUT; /* support for PETSC_STDOUT in Fortran */ *ierr = PetscSynchronizedFlush(MPI_Comm_f2c( *(comm)),f); } static PetscErrorCode PetscFixSlashN(const char *in, char **out) { size_t i,len; PetscFunctionBegin; PetscCall(PetscStrallocpy(in,out)); PetscCall(PetscStrlen(*out,&len)); for (i=0; i