Actual source code: ex4f.F
petsc-3.3-p6 2013-02-11
1: !
2: ! Test AO with on IS with 0 entries - Fortran version of ex4.c
3: !
4: program main
5: implicit none
6: #include <finclude/petscsys.h>
7: #include <finclude/petscao.h>
9: PetscErrorCode ierr
10: AO ao
11: PetscInt localvert(4),nlocal
12: PetscMPIInt rank
14: call PetscInitialize(PETSC_NULL_CHARACTER,ierr)
15: call MPI_Comm_rank(PETSC_COMM_WORLD,rank,ierr)
17: nlocal = 0
18: if (rank .eq. 0) then
19: nlocal = 4
20: localvert(1) = 0
21: localvert(2) = 1
22: localvert(3) = 2
23: localvert(4) = 3
24: endif
26: ! Test AOCreateBasic()
27: call AOCreateBasic(PETSC_COMM_WORLD, nlocal, localvert, &
28: & PETSC_NULL_INTEGER,ao,ierr)
29: call AODestroy(ao,ierr)
31: ! Test AOCreateMemoryScalable()
32: call AOCreateMemoryScalable(PETSC_COMM_WORLD, nlocal, localvert, &
33: & PETSC_NULL_INTEGER,ao,ierr)
34: call AODestroy(ao,ierr)
36: call PetscFinalize(ierr)
37: end