1: ! 2: ! Simple PETSc Program written in Fortran 3: ! 4: #include <petsc/finclude/petscsys.h> 5: program main 6: use petscsys 7: implicit none 8: PetscErrorCode ierr 9: PetscInt f(1) 11: PetscCallA(PetscInitialize(ierr)) 12: f(1) = 1 13: PetscCallMPIA(MPI_Allreduce(MPI_IN_PLACE, f, 1, MPIU_INTEGER, MPI_MIN, PETSC_COMM_WORLD, ierr)) 14: PetscCallA(PetscFinalize(ierr)) 15: end 17: !/*TEST 18: ! 19: ! test: 20: ! output_file: output/empty.out 21: ! 22: !TEST*/