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