Unverified Commit aae3ce8f authored by Graham, Aaron's avatar Graham, Aaron Committed by GitHub
Browse files

Exception handler surrogates (#331)

* Create addExceptionHandlerSurrogates in FutilityComputingEnvironment

This allows a client code to easily add its own exception handler as
a surrogate to all Futility exception handlers in a single call

* Fix a couple mistakes

* Fix reference to eXDMF when HDF5 is not enabled

* If at first you don't succeed...
parent e52b46e0
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ TRIBITS_ADD_LIBRARY(Utils
      VTUFiles.f90
      IOutil.f90
      ParameterLists.f90
      XDMFMesh.f90
      CommandLineProcessor.f90
      MatrixTypes_Base.f90
      MatrixTypes_Native.f90
@@ -94,18 +95,17 @@ TRIBITS_ADD_LIBRARY(Utils
      MultigridMesh.f90
      EigenvalueSolverTypes.f90
      ODESolverTypes.f90
      NonLinearSolver.f90
      SolutionAcceleration.f90
      AndersonAcceleration.f90
      StochasticSampling.f90
      Sorting.f90
      MeshTransfer.f90
      ArrayUtils.f90
      PartitionGraph.f90
      FutilityComputingEnvironment.f90
      SchemaParser.f90
      SpeciesElements.f90
      XDMFMesh.f90
      FutilityComputingEnvironment.f90
      NonLinearSolver.f90
      SolutionAcceleration.f90
      AndersonAcceleration.f90
    DEPLIBS
      CUtils
      TrilinosUtils
+0 −1
Original line number Diff line number Diff line
@@ -63,7 +63,6 @@
MODULE FileType_DA32
USE ISO_FORTRAN_ENV
USE IntrType
USE ExceptionHandler
USE IO_Strings
USE FileType_Fortran

+48 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ IMPLICIT NONE
PRIVATE

PUBLIC :: FutilityComputingEnvironment
PUBLIC :: addExceptionHandlerSurrogates

!> This type bundles together objects that are commonly needed throughout
!> all parts of the calling code.  It is intended that each package would
@@ -381,4 +382,51 @@ RECURSIVE SUBROUTINE clearSubCompEnvs(this)

ENDSUBROUTINE clearSubCompEnvs
!
!-------------------------------------------------------------------------------
!> @brief Adds exception handler as surrogate to all lower level Futility handlers
!> @param ce the exception handler to use as a surrogate
!>
SUBROUTINE addExceptionHandlerSurrogates(ce)
  USE Allocs, ONLY : eAllocs
  USE EigenvalueSolverTypes, ONLY : eEigenvalueSolverType
  USE ElementsIsotopes, ONLY : eElementsIsotopes
  USE ExpTables, ONLY : eExpTable
  USE FMU_Wrapper, ONLY : eFMU_Wrapper
  USE IAPWSWaterPropertiesModule, ONLY : eWaterProp
  USE LinearSolverTypes, ONLY : eLinearSolverType
  USE MatrixTypes, ONLY : eMatrixType
  USE ODESolverTypes, ONLY : eODESolverType
  USE ParameterLists, ONLY : eParams
  USE PartitionGraph, ONLY : ePartitionGraph
  USE PreconditionerTypes, ONLY : ePreCondType
  USE SchemaParserModule, ONLY : eSchemaParser
  USE StochasticSampling, ONLY : eStochasticSampler
  USE VectorTypes, ONLY : eVectorType
  USE VTKFiles, ONLY : eVTK
  USE XDMFMesh, ONLY : eXDMF
  USE MeshTransfer, ONLY : eMeshTransfer
  TYPE(ExceptionHandlerType),TARGET,INTENT(IN) :: ce

  CALL eAllocs%addSurrogate(ce)
  CALL eEigenvalueSolverType%addSurrogate(ce)
  CALL eElementsIsotopes%addSurrogate(ce)
  CALL eMeshTransfer%addSurrogate(ce)
  CALL eExpTable%addSurrogate(ce)
  CALL eFMU_Wrapper%addSurrogate(ce)
  CALL eWaterProp%addSurrogate(ce)
  CALL eLinearSolverType%addSurrogate(ce)
  CALL eMatrixType%addSurrogate(ce)
  CALL eODESolverType%addSurrogate(ce)
  CALL eParEnv%addSurrogate(ce)
  CALL eParams%addSurrogate(ce)
  CALL ePartitionGraph%addSurrogate(ce)
  CALL ePreCondType%addSurrogate(ce)
  CALL eSchemaParser%addSurrogate(ce)
  CALL eStochasticSampler%addSurrogate(ce)
  CALL eVectorType%addSurrogate(ce)
  CALL eVTK%addSurrogate(ce)
  CALL eXDMF%addSurrogate(ce)

ENDSUBROUTINE addExceptionHandlerSurrogates
!
ENDMODULE FutilityComputingEnvironmentModule
 No newline at end of file
+0 −1
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
MODULE LinearSolverTypes_Multigrid
USE IntrType
USE ExceptionHandler
USE ParameterLists
USE VectorTypes
USE MatrixTypes
+0 −1
Original line number Diff line number Diff line
@@ -68,7 +68,6 @@
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
MODULE MatrixTypes
USE IntrType
USE ExceptionHandler
USE Allocs
USE BLAS2,           ONLY: BLAS2_matvec => BLAS_matvec
USE BLAS3,           ONLY: BLAS3_matmult => BLAS_matmat
Loading