1*f8402805SBarry Smith! 2*f8402805SBarry Smith! Simple PETSc Program written in Fortran 3*f8402805SBarry Smith! 4*f8402805SBarry Smith program main 5*f8402805SBarry Smith#include <petsc/finclude/petscsys.h> 6*f8402805SBarry Smith use petscsys 7*f8402805SBarry Smith implicit none 8*f8402805SBarry Smith 9*f8402805SBarry Smith PetscErrorCode ierr 10*f8402805SBarry Smith PetscMPIInt rank 11*f8402805SBarry Smith character*(80) arch 12*f8402805SBarry Smith 13*f8402805SBarry Smith PetscCallA(PetscInitialize(ierr)) 14*f8402805SBarry Smith PetscCallMPIA(MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)) 15*f8402805SBarry Smith print*, 'Greetings from rank', rank 16*f8402805SBarry Smith 17*f8402805SBarry Smith PetscCallA(PetscGetArchType(arch,ierr)) 18*f8402805SBarry Smith write(6,100) arch 19*f8402805SBarry Smith 100 format (' PETSC_ARCH ',A) 20*f8402805SBarry Smith 21*f8402805SBarry Smith PetscCallA(PetscFinalize(ierr)) 22*f8402805SBarry Smith end 23*f8402805SBarry Smith 24*f8402805SBarry Smith! 25*f8402805SBarry Smith!/*TEST 26*f8402805SBarry Smith! 27*f8402805SBarry Smith! test: 28*f8402805SBarry Smith! filter: grep -v PETSC_ARCH 29*f8402805SBarry Smith! 30*f8402805SBarry Smith!TEST*/ 31