Commit f9c2ee05 authored by aarograh's avatar aarograh Committed by Henderson, Shane
Browse files

Petsc no mpi

Squash branch 'petsc_no_mpi' into 'master'

* Revert a test rebaseline

* Fix what I think is a bug in distributed banded matrix test

* Use PE_COMM_NULL

* fix kind type parameters in parameter lists

* Fix an INTENT issue

* Get petsc working without MPI

* Cache some fixes for PETSc w/o MPI

<!-- Replace this a detailed description of changes -->

<!-- Include a link to VERA development issues if appropriate, or delete this line -->

**Developer Checklist:**
- [x] Have you done a self-review after creating the merge request?
- [x] Have you filled in the Merge Request information (title, description) thoroughly?
- [x] Have you updated the relevant tickets (if this MR is linked to any VERA-dev tickets)?
- [ ] Have you addressed all suggested feedback and commented on it to let the reviewer know? (Do not resolve discussions that the reviewer started)

**Reviewer Checklist:**
- [x] Have you confirmed all discussions were adequately addressed and resolved them all?
- [x] Does it conform to formatting guidelines?
- [x] Are there adequate and clear comments?
- [x] Is the design clean and sensible?
- [x] Are the changes optimal/efficient?
- [x] Were sufficient DBC checks added?
- [x] Are there unit tests? (if necessary)
- [x] Is the MR description clear, including a link to the VERA-Dev issue if appropriate?

**PSM Checklist**
- [x] Have you confirmed that all discussions were addressed, or that follow-on issues have been created for them?
- [x] Have you confirmed sufficient testing was conducted?
- [x] Does this impact other repositories?
- [x] Does the MR have an adequate description?
- [x] If the MR has multiple commits, did you set the MR to squash merge?

See merge request https://code.ornl.gov/futility/Futility/-/merge_requests/420
parent 07de6516
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -577,7 +577,11 @@ SUBROUTINE init_LinearSolverType_Base(solver,Params,A)
        IF(TPLType==PETSC) THEN
#ifdef FUTILITY_HAVE_PETSC
          !create and initialize KSP
#ifdef HAVE_MPI
          CALL KSPCreate(solver%MPIparallelEnv%comm,solver%ksp,iperr)
#else
          CALL KSPCreate(PETSC_COMM_SELF,solver%ksp,iperr)
#endif

          !set iterative solver type
          SELECTCASE(solverMethod)
+3 −2
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
MODULE LinearSolverTypes_Multigrid
USE IntrType
USE ParameterLists
USE ParallelEnv
USE VectorTypes
USE MatrixTypes
USE LinearSolverTypes
@@ -177,7 +178,7 @@ SUBROUTINE init_LinearSolverType_Multigrid(solver,Params,A)

  !Pull LS data from the parameter list
  TPLType=-1
  MPI_Comm_ID=-1
  MPI_Comm_ID=PE_COMM_NULL
  matType=-1
  matEngine=-1
  numberOMP=-1
@@ -202,7 +203,7 @@ SUBROUTINE init_LinearSolverType_Multigrid(solver,Params,A)
  CALL validParams%clear()

  !Initialize parallel environments based on input
  IF(MPI_Comm_ID /= -1) CALL solver%MPIparallelEnv%init(MPI_Comm_ID)
  IF(MPI_Comm_ID /= PE_COMM_NULL) CALL solver%MPIparallelEnv%init(MPI_Comm_ID)
  IF(numberOMP > 0) CALL solver%OMPparallelEnv%init(numberOMP)

  IF(TPLType /= PETSC) THEN
+1 −1
Original line number Diff line number Diff line
@@ -882,7 +882,7 @@ SUBROUTINE pop_recv(acc,valBuf,thisMat,ctBuf,idx,req,f)
  !> Array of buffer sizes
  INTEGER(SIK), INTENT(INOUT) :: ctBuf(MATVEC_SLOTS)
  !> The buffer slot popped
  INTEGER(SIK), INTENT(OUT) :: idx
  INTEGER(SIK), INTENT(INOUT) :: idx
  !> List of MPI Requests
  INTEGER(SIK), INTENT(INOUT) :: req(MATVEC_SLOTS)
  !> Optional argument to flush all buffers
+4 −0
Original line number Diff line number Diff line
@@ -121,7 +121,11 @@ SUBROUTINE init_PETScMatrixParam(matrix,Params)
  IF(validParams%has('MatrixType->isSym')) &
      CALL validParams%get('MatrixType->isSym',isSym)
  CALL validParams%get('MatrixType->matType',matType)
#ifdef HAVE_MPI
  CALL validParams%get('MatrixType->MPI_COMM_ID',MPI_COMM_ID)
#else
  MPI_COMM_ID = PETSC_COMM_SELF
#endif
  CALL validParams%get('MatrixType->nlocal',nlocal)

  m=n
+2 −2
Original line number Diff line number Diff line
@@ -172,8 +172,8 @@ INTEGER(SIK),PARAMETER :: VALIDTYPE_VERIFYTEST=1
INTEGER(SIK),PARAMETER :: VALIDTYPE_VERIFYLIST=2

!> Hashing parameters
INTEGER(SLK),PARAMETER,PRIVATE :: PL_HASH_POLYNOMIAL_BASE=97_SIK
INTEGER(SLK),PARAMETER,PRIVATE :: PL_HASH_MODULUS=1000000009_SIK
INTEGER(SLK),PARAMETER,PRIVATE :: PL_HASH_POLYNOMIAL_BASE=97_SLK
INTEGER(SLK),PARAMETER,PRIVATE :: PL_HASH_MODULUS=1000000009_SLK

!> Exception handler for the module
TYPE(ExceptionHandlerType),SAVE :: eParams
Loading