Skip to content

Commit

Permalink
Minor fixes for F90 demos to compile on Cori
Browse files Browse the repository at this point in the history
  • Loading branch information
bishtgautam committed Aug 11, 2021
1 parent e7cbeff commit 58f6957
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions demo/steadyf90/steadyf90.F90
Original file line number Diff line number Diff line change
Expand Up @@ -213,18 +213,18 @@ program main

!Solve system
call KSPCreate(PETSC_COMM_WORLD,ksp,ierr)
CHKERRQ(ierr)
CHKERRA(ierr)

call KSPSetOperators(ksp,K,K,ierr)
CHKERRQ(ierr)
CHKERRA(ierr)
call KSPSetFromOptions(ksp,ierr)
CHKERRQ(ierr)
CHKERRA(ierr)

call KSPSetUp(ksp,ierr)
CHKERRQ(ierr)
CHKERRA(ierr)

call KSPSolve(ksp,F,U,ierr)
CHKERRQ(ierr)
CHKERRA(ierr)

call TDyComputeErrorNorms(tdy,U,normp,normv,ierr)
CHKERRA(ierr)
Expand All @@ -234,19 +234,19 @@ program main
CHKERRA(ierr)

call KSPDestroy(ksp,ierr)
CHKERRQ(ierr)
CHKERRA(ierr)

call VecDestroy(U,ierr)
CHKERRQ(ierr)
CHKERRA(ierr)

call VecDestroy(F,ierr)
CHKERRQ(ierr)
CHKERRA(ierr)

call MatDestroy(K,ierr)
CHKERRQ(ierr)
CHKERRA(ierr)

call TDyDestroy(tdy,ierr)
CHKERRQ(ierr)
CHKERRA(ierr)

call TDyFinalize(ierr)
CHKERRA(ierr)
Expand Down
6 changes: 3 additions & 3 deletions demo/transient/transient_snes_mpfaof90.F90
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ program main
CHKERRA(ierr);
if (dm_plex_extrude_layers > 0) then
call DMPlexExtrude(dm, PETSC_DETERMINE, -1.d0, PETSC_TRUE, PETSC_NULL_REAL, PETSC_TRUE, edm, ierr);
CHKERRQ(ierr);
CHKERRA(ierr);
call DMDestroy(dm ,ierr);
dm = edm
end if
Expand Down Expand Up @@ -351,7 +351,7 @@ program main
if (bc_type == MPFAO_DIRICHLET_BC .OR. bc_type == MPFAO_SEEPAGE_BC ) then
! call TDySetBoundaryPressureFn(tdy,PressureFunction,0,ierr);
call TDySelectBoundaryPressureFn(tdy,"p0",ierr);
CHKERRQ(ierr)
CHKERRA(ierr)
endif

if (use_tdydriver) then
Expand Down Expand Up @@ -427,7 +427,7 @@ program main
call SNESGetConvergedReason(snes,reason,ierr)
CHKERRA(ierr)
if (reason<0) then
SETERRQ(PETSC_COMM_WORLD,PETSC_ERR_USER,"SNES did not converge");
call PetscError(PETSC_COMM_WORLD, 0, PETSC_ERR_USER, "SNES did not converge");
endif
endif

Expand Down

0 comments on commit 58f6957

Please sign in to comment.