From 58f695784c2e95d1f5a66eb1184cf91895fdf0c3 Mon Sep 17 00:00:00 2001 From: Gautam Bisht Date: Wed, 11 Aug 2021 09:28:19 -0700 Subject: [PATCH] Minor fixes for F90 demos to compile on Cori --- demo/steadyf90/steadyf90.F90 | 20 ++++++++++---------- demo/transient/transient_snes_mpfaof90.F90 | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/demo/steadyf90/steadyf90.F90 b/demo/steadyf90/steadyf90.F90 index 62c1c699..824e4368 100644 --- a/demo/steadyf90/steadyf90.F90 +++ b/demo/steadyf90/steadyf90.F90 @@ -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) @@ -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) diff --git a/demo/transient/transient_snes_mpfaof90.F90 b/demo/transient/transient_snes_mpfaof90.F90 index e8e2cc76..86029245 100644 --- a/demo/transient/transient_snes_mpfaof90.F90 +++ b/demo/transient/transient_snes_mpfaof90.F90 @@ -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 @@ -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 @@ -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