1. Satish Karra
  2. karra-pflotran-dev

Commits

Gautam Bisht  committed baf3974 Merge

merge

  • Participants
  • Parent commits ae35c73, 1737714
  • Branches default

Comments (0)

Files changed (38)

File src/pflotran/checkpoint.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/condition_control.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/flash2.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/general.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/general_grid.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/global.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/hdf5.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/hydrogeophysics_factory.F90

View file
  • Ignore whitespace
 
   use Simulation_module
   use Subsurface_Factory_module
+  use Hydrogeophysics_Wrapper_module
+  use PMC_Hydrogeophysics_class
   use Option_module
-  use Init_module
   
   implicit none
   
+#include "finclude/petscvec.h"
+#include "finclude/petscvec.h90"
+  
   class(hydrogeophysics_simulation_type) :: simulation
   type(option_type), pointer :: option
   
+  class(pmc_hydrogeophysics_type), pointer :: hydrogeophysics_coupler
+  PetscErrorCode :: ierr
+  
+  ! Init() is called in SubsurfaceInitializePostPETSc
   call SubsurfaceInitializePostPETSc(simulation, option)
+  call VecDuplicate(simulation%realization%field%work,simulation%sigma,ierr)
+  
+  ! add hydrogeophysics coupler to list
+  hydrogeophysics_coupler => PMCHydrogeophysicsCreate()
+  hydrogeophysics_coupler%option => simulation%option
+  hydrogeophysics_coupler%realization => simulation%realization
+  ! Petsc vectors are integer quantities, not pointers
+  hydrogeophysics_coupler%sigma = simulation%sigma
+  simulation%hydrogeophysics_coupler => hydrogeophysics_coupler
+  simulation%process_model_coupler_list%below%below => hydrogeophysics_coupler
+  
+  call HydrogeophysicsWrapperInit(option)
   
 end subroutine HydrogeophysicsInitPostPETSc
 

File src/pflotran/hydrogeophysics_simulation.F90

View file
  • Ignore whitespace
   
   use Option_module
   use Subsurface_Simulation_class
-!  use PMC_Hydrogeophysics_class
+  use PMC_Hydrogeophysics_class
 
   implicit none
 
-#include "definitions.h"
-  
   private
 
+#include "definitions.h"
+#include "finclude/petscvec.h"
+#include "finclude/petscvec.h90"
+  
   type, public, extends(subsurface_simulation_type) :: &
     hydrogeophysics_simulation_type
+    ! pointer to hydrogeophysics coupler
+    class(pmc_hydrogeophysics_type), pointer :: hydrogeophysics_coupler
+    Vec :: sigma
   contains
     procedure, public :: Init => HydrogeophysicsInit
     procedure, public :: InitializeRun => HydrogeophysicsInitializeRun
-    procedure, public :: ExecuteRun => HydrogeophysicsExecuteRun
+!    procedure, public :: ExecuteRun => HydrogeophysicsExecuteRun
 !    procedure, public :: RunToTime
     procedure, public :: FinalizeRun => HydrogeophysicsFinalizeRun
     procedure, public :: Strip => HydrogeophysicsStrip
 
   class(hydrogeophysics_simulation_type), pointer :: HydrogeophysicsCreate
   
-  print *, 'SimulationCreate'
+  call printMsg(option,'HydrogeophysicsCreate()')
   
   allocate(HydrogeophysicsCreate)
   call HydrogeophysicsCreate%Init(option)
   type(option_type), pointer :: option
   
   call SubsurfaceSimulationInit(this,option)
+  nullify(this%hydrogeophysics_coupler)
+  this%sigma = 0
   
 end subroutine HydrogeophysicsInit
 
   PetscInt :: depth
   PetscErrorCode :: ierr
   
-  call printMsg(this%option,'Simulation%InitializeRun()')
+  call printMsg(this%option,'Hydrogeophysics%InitializeRun()')
 
-  cur_process_model_coupler => this%process_model_coupler_list
-  do
-    if (.not.associated(cur_process_model_coupler)) exit
-    depth = 0
-    call cur_process_model_coupler%InitializeRun()
-    cur_process_model_coupler => cur_process_model_coupler%next
-  enddo
+  call this%process_model_coupler_list%InitializeRun()
 
 end subroutine HydrogeophysicsInitializeRun
 
   PetscReal :: dt
   PetscReal :: current_time
   
-  call printMsg(this%option,'HydrogeophysicsExecuteRun()')
+  call printMsg(this%option,'Hydrogeophysics%ExecuteRun()')
 
   final_time = SimulationGetFinalWaypointTime(this)
   ! take hourly steps until final time
   
   PetscErrorCode :: ierr
   
-  call printMsg(this%option,'HydrogeophysicsFinalizeRun()')
+  call printMsg(this%option,'Hydrogeophysics%FinalizeRun()')
   
   call SubsurfaceFinalizeRun(this)
   
 ! ************************************************************************** !
 subroutine HydrogeophysicsStrip(this)
 
+  use Hydrogeophysics_Wrapper_module
+
   implicit none
   
   class(hydrogeophysics_simulation_type) :: this
   
-  call printMsg(this%option,'HydrogeophysicsStrip()')
+  PetscErrorCode :: ierr
+  
+  call printMsg(this%option,'Hydrogeophysics%Strip()')
   
   call SubsurfaceSimulationStrip(this)
+  call HydrogeophysicsWrapperDestroy(this%option)
+  if (this%sigma /= 0) &
+    call VecDestroy(this%sigma ,ierr)
   
 end subroutine HydrogeophysicsStrip
 
   
   class(hydrogeophysics_simulation_type), pointer :: simulation
   
-  call printMsg(simulation%option,'SimulationDestroy()')
+  call printMsg(simulation%option,'Hydrogeophysics%Destroy()')
   
   if (.not.associated(simulation)) return
   

File src/pflotran/hydrogeophysics_wrapper.F90

View file
  • Ignore whitespace
+module Hydrogeophysics_Wrapper_module
+ 
+  implicit none
+
+  private
+
+#include "definitions.h"
+
+  public :: HydrogeophysicsWrapperInit, &
+            HydrogeophysicsWrapperStart, &
+            HydrogeophysicsWrapperStep, &
+            HydrogeophysicsWrapperStop, &
+            HydrogeophysicsWrapperDestroy
+
+contains
+
+! ************************************************************************** !
+!
+! HydrogeophysicsWrapperInit: Initializes the hydrogeophysics module
+! author: Glenn Hammond
+! date: 07/02/13
+!
+! ************************************************************************** !
+subroutine HydrogeophysicsWrapperInit(option)
+  
+  use Option_module
+  
+  implicit none
+
+  type(option_type) :: option
+  
+  call printMsg(option,'HydrogeophysicsWrapperInit()')
+  
+end subroutine HydrogeophysicsWrapperInit
+
+! ************************************************************************** !
+!
+! HydrogeophysicsWrapperStart: Starts the hydrogeophysics forward simulation 
+!                              loop
+! author: Glenn Hammond
+! date: 07/02/13
+!
+! ************************************************************************** !
+subroutine HydrogeophysicsWrapperStart(option)
+  
+  use Option_module
+
+  implicit none
+
+  type(option_type) :: option
+  
+  call printMsg(option,'HydrogeophysicsWrapperStart()')
+  
+end subroutine HydrogeophysicsWrapperStart
+
+! ************************************************************************** !
+!
+! HydrogeophysicsWrapperStep: Performs a forward simulation
+! author: Glenn Hammond
+! date: 07/02/13
+!
+! ************************************************************************** !
+subroutine HydrogeophysicsWrapperStep(sigma,option)
+  
+  use Option_module
+
+  implicit none
+
+#include "finclude/petscvec.h"
+#include "finclude/petscvec.h90"
+
+  Vec :: sigma
+  type(option_type) :: option
+  
+  PetscReal, pointer :: vec_ptr(:)
+  PetscErrorCode :: ierr
+  
+  call printMsg(option,'HydrogeophysicsWrapperStep()')
+  
+  call VecGetArrayF90(sigma,vec_ptr,ierr)
+  write(option%io_buffer,'(es13.6)') vec_ptr(365)
+  call printMsg(option)
+  call VecRestoreArrayF90(sigma,vec_ptr,ierr)
+  
+end subroutine HydrogeophysicsWrapperStep
+
+! ************************************************************************** !
+!
+! HydrogeophysicsWrapperStop: Stops the hydrogeophysics forward simulation 
+!                             loop
+! author: Glenn Hammond
+! date: 07/02/13
+!
+! ************************************************************************** !
+subroutine HydrogeophysicsWrapperStop(option)
+  
+  use Option_module
+
+  implicit none
+
+  type(option_type) :: option
+  
+  call printMsg(option,'HydrogeophysicsWrapperStop()')
+  
+end subroutine HydrogeophysicsWrapperStop
+
+! ************************************************************************** !
+!
+! HydrogeophysicsWrapperDestroy: Destroys the contents of the hydrogeophysics 
+!                                module
+! author: Glenn Hammond
+! date: 07/02/13
+!
+!
+! ************************************************************************** !
+recursive subroutine HydrogeophysicsWrapperDestroy(option)
+
+  use Option_module
+
+  implicit none
+  
+  type(option_type) :: option
+  
+  call printMsg(option,'HydrogeophysicsWrapperDestroy()')
+
+end subroutine HydrogeophysicsWrapperDestroy
+
+end module Hydrogeophysics_Wrapper_module

File src/pflotran/immis.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/init.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/makefile_new

View file
  • Ignore whitespace
 	${common_src}geometry.o \
 	${common_src}hydrogeophysics_factory.o \
 	${common_src}hydrogeophysics_simulation.o \
+	${common_src}hydrogeophysics_wrapper.o \
 	${common_src}hydrostatic.o \
 	${common_src}init.o \
 	${common_src}level.o \
 hdf5_aux.o : logging.o option.o
 hydrogeophysics_factory.o : hydrogeophysics_simulation.o init.o input.o \
                             option.o simulation.o simulation_base.o \
-                            subsurface_factory.o
+                            subsurface_factory.o pmc_hydrogeophysics.o \
+                            hydrogeophysics_wrapper.o
 hydrogeophysics_simulation.o : option.o output.o pmc_base.o simulation_base.o \
-                               subsurface_simulation.o
+                               subsurface_simulation.o pmc_hydrogeophysics.o \
+                               hydrogeophysics_wrapper.o
+hydrogeophysics_wrapper.o : option.o
 hydrostatic.o : condition.o connection.o coupler.o dataset_xyz.o general_aux.o \
                 grid.o option.o region.o structured_grid.o utility.o \
                 water_eos.o
                  simulation_base.o subsurface_factory.o
 pmc_base.o : option.o output.o output_aux.o process_model_base.o \
              process_model_top.o timestepper_base.o utility.o waypoint.o
-pmc_hydrogeophysics.o : option.o output.o pmc_base.o utility.o
+pmc_hydrogeophysics.o : option.o output.o pmc_base.o utility.o \
+                        hydrogeophysics_wrapper.o
 pmc_subsurface.o : option.o pmc_base.o realization.o utility.o
 pmc_surface.o : option.o pmc_base.o surface_realization.o utility.o \
                 timestepper_surface.o

File src/pflotran/miscible.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/mphase.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/output_observation.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/pmc_base.F90

View file
  • Ignore whitespace
     class(pmc_base_type), pointer :: below
     class(pmc_base_type), pointer :: next
     type(pm_pointer_type), pointer :: pm_ptr
-    procedure(Output), nopass, pointer :: Output => Null()
+    procedure(Output), nopass, pointer :: Output
+    procedure(Synchronize), pointer :: Synchronize1
+    procedure(Synchronize), pointer :: Synchronize2
+    procedure(Synchronize), pointer :: Synchronize3
   contains
     procedure, public :: Init => PMCBaseInit
     procedure, public :: InitializeRun
     procedure, public :: Destroy => PMCBaseDestroy
   end type pmc_base_type
   
+  abstract interface
+    subroutine Synchronize(pmc)
+      import pmc_base_type
+      implicit none
+        class(pmc_base_type) :: pmc
+    end subroutine Synchronize
+  end interface
+  
   public :: PMCBaseCreate, &
             PMCBaseInit, &
             SetOutputFlags
   nullify(this%below)
   nullify(this%next)
   this%Output => Null()
+  this%Synchronize1 => Null()
+  this%Synchronize2 => Null()
+  this%Synchronize3 => Null()
   
   allocate(this%pm_ptr)
   nullify(this%pm_ptr%ptr)
 recursive subroutine PMCBaseRunToTime(this,sync_time,stop_flag)
 
   use Timestepper_Base_class
-  use Output_module, only : Output
-  use Realization_class, only : realization_type
   
   implicit none
   
-  class(pmc_base_type) :: this
+  class(pmc_base_type), target :: this
   PetscReal :: sync_time
   PetscInt :: stop_flag
   
   this%option%io_buffer = trim(this%name) // ':' // trim(this%pm_list%name)  
   call printVerboseMsg(this%option)
   
+  if (associated(this%Synchronize1)) then
+    call this%Synchronize1()
+  endif
+  
   local_stop_flag = 0
   do
     if (local_stop_flag > 0) exit ! end simulation
     
   enddo
   
+  if (associated(this%Synchronize2)) then
+    call this%Synchronize2()
+  endif
+  
   ! Run neighboring process model couplers
   if (associated(this%next)) then
     call this%next%RunToTime(sync_time,local_stop_flag)
   endif
 
+  if (associated(this%Synchronize3)) then
+    call this%Synchronize3()
+  endif
+  
   stop_flag = max(stop_flag,local_stop_flag)
   
 end subroutine PMCBaseRunToTime

File src/pflotran/pmc_hydrogeophysics.F90

View file
  • Ignore whitespace
 module PMC_Hydrogeophysics_class
 
   use PMC_Base_class
+  use Realization_class
   use Option_module
 
   implicit none
 
-#include "definitions.h"
-  
   private
 
+#include "definitions.h"
+#include "finclude/petscvec.h"
+#include "finclude/petscvec.h90"
+  
   type, public, extends(pmc_base_type) :: pmc_hydrogeophysics_type
+    class(realization_type), pointer :: realization
+    Vec :: sigma
   contains
     procedure, public :: Init => PMCHydrogeophysicsInit
+    procedure, public :: InitializeRun => PMCHydrogeophysicsInitializeRun
+    procedure, public :: RunToTime => PMCHydrogeophysicsRunToTime
+    procedure, public :: FinalizeRun => PMCHydrogeophysicsFinalizeRun
+    procedure, public :: Destroy => PMCHydrogeophysicsDestroy
   end type pmc_hydrogeophysics_type
   
   public :: PMCHydrogeophysicsCreate
 ! PMCHydrogeophysicsCreate: Allocates and initializes a new  
 !                           process_model_coupler object.
 ! author: Glenn Hammond
-! date: 03/14/13
+! date: 07/02/13
 !
 ! ************************************************************************** !
 function PMCHydrogeophysicsCreate()
 !
 ! PMCHydrogeophysicsInit: Initializes a new process model coupler object.
 ! author: Glenn Hammond
-! date: 06/10/13
+! date: 07/02/13
 !
 ! ************************************************************************** !
 subroutine PMCHydrogeophysicsInit(this)
   
   call PMCBaseInit(this)
   this%name = 'PMCHydrogeophysics'
+  nullify(this%realization) 
+  this%sigma = 0
+  this%Synchronize1 => PMCHydrogeophysicsSynchronize
 
 end subroutine PMCHydrogeophysicsInit
 
+
+! ************************************************************************** !
+!
+! PMCHydrogeophysicsInitializeRun: Initializes the time stepping
+! author: Glenn Hammond
+! date: 07/02/13
+!
+! ************************************************************************** !
+recursive subroutine PMCHydrogeophysicsInitializeRun(this)
+
+  use Hydrogeophysics_Wrapper_module
+
+  implicit none
+  
+  class(pmc_hydrogeophysics_type) :: this
+  
+  call printMsg(this%option,'PMCHydrogeophysics%InitializeRun()')
+  
+  call HydrogeophysicsWrapperStart(this%option)
+  
+  if (associated(this%below)) then
+    call this%below%InitializeRun()
+  endif
+  
+  if (associated(this%next)) then
+    call this%next%InitializeRun()
+  endif
+
+end subroutine PMCHydrogeophysicsInitializeRun
+
 ! ************************************************************************** !
 !
 ! PMCHydrogeophysicsRunToTime: Runs the actual simulation.
 ! author: Glenn Hammond
-! date: 03/18/13
+! date: 07/02/13
 !
 ! ************************************************************************** !
 recursive subroutine PMCHydrogeophysicsRunToTime(this,sync_time,stop_flag)
 
-  use Output_module, only : Output
-  
+  use Hydrogeophysics_Wrapper_module
+
   implicit none
   
-  class(pmc_hydrogeophysics_type) :: this
+  class(pmc_hydrogeophysics_type), target :: this
   PetscReal :: sync_time
   PetscInt :: stop_flag
   
+  class(pmc_base_type), pointer :: pmc_base
+  PetscInt :: local_stop_flag
+  
+  this%option%io_buffer = trim(this%name)
+  call printVerboseMsg(this%option)
+  
+  if (associated(this%Synchronize1)) then
+    !geh: PGI requires cast to base
+    !call this%Synchronize1()
+    pmc_base => this%CastToBase()
+    call pmc_base%Synchronize1()
+  endif
+  
+  local_stop_flag = 0
+  
+  call HydrogeophysicsWrapperStep(this%sigma,this%option)
+
+  ! Run neighboring process model couplers
+  if (associated(this%below)) then
+    call this%below%RunToTime(sync_time,local_stop_flag)
+  endif
+
+  ! Run neighboring process model couplers
+  if (associated(this%next)) then
+    call this%next%RunToTime(sync_time,local_stop_flag)
+  endif
+
+  stop_flag = max(stop_flag,local_stop_flag)  
   
 end subroutine PMCHydrogeophysicsRunToTime
 
 ! ************************************************************************** !
 !
+! PMCHydrogeophysicsSynchronize: Runs the actual simulation.
+! author: Glenn Hammond
+! date: 07/02/13
+!
+! ************************************************************************** !
+subroutine PMCHydrogeophysicsSynchronize(this)
+
+  use Realization_Base_class, only : RealizationGetDataset
+  use Variables_module, only : PRIMARY_MOLALITY
+
+  implicit none
+  
+#include "finclude/petscvec.h"
+#include "finclude/petscvec.h90"
+
+  class(pmc_base_type), pointer :: this
+
+  PetscErrorCode :: ierr
+
+  select type(pmc => this)
+    class is(pmc_hydrogeophysics_type)
+      call RealizationGetDataset(pmc%realization,pmc%realization%field%work, &
+                                 PRIMARY_MOLALITY,ONE_INTEGER,0)
+      call VecCopy(pmc%realization%field%work,pmc%sigma,ierr)
+  end select
+  
+end subroutine PMCHydrogeophysicsSynchronize
+
+! ************************************************************************** !
+!
 ! PMCHydrogeophysicsFinalizeRun: Finalizes the time stepping
 ! author: Glenn Hammond
-! date: 03/18/13
+! date: 07/02/13
 !
 ! ************************************************************************** !
 recursive subroutine PMCHydrogeophysicsFinalizeRun(this)
 
+  use Hydrogeophysics_Wrapper_module
+  
   implicit none
   
   class(pmc_hydrogeophysics_type) :: this
   
   call printMsg(this%option,'PMCHydrogeophysics%FinalizeRun()')
   
+  call HydrogeophysicsWrapperStop(this%option)
+  
 end subroutine PMCHydrogeophysicsFinalizeRun
 
 
 ! ************************************************************************** !
 !
-! ProcessModelCouplerDestroy: Deallocates a process_model_coupler object
+! PMCHydrogeophysicsDestroy: Deallocates a process_model_coupler object
 ! author: Glenn Hammond
-! date: 03/14/13
+! date: 07/02/13
 !
 ! ************************************************************************** !
-recursive subroutine Destroy(this)
+recursive subroutine PMCHydrogeophysicsDestroy(this)
 
   use Utility_module, only: DeallocateArray 
 
   
   call printMsg(this%option,'PMCHydrogeophysics%Destroy()')
   
+  nullify(this%realization)
+  
   if (associated(this%next)) then
     call this%next%Destroy()
   endif 
   
-end subroutine Destroy
+end subroutine PMCHydrogeophysicsDestroy
   
 end module PMC_Hydrogeophysics_class

File src/pflotran/pmc_subsurface.F90

View file
  • Ignore whitespace
   
 end subroutine PMCSubsurfaceFinalizeRun
 
-
 ! ************************************************************************** !
 !
 ! ProcessModelCouplerDestroy: Deallocates a process_model_coupler object

File src/pflotran/reaction_sandbox.F90

View file
  • Ignore whitespace
   class(reaction_sandbox_base_type), pointer, public :: sandbox_list
 
   interface RSandboxRead
-    module procedure :: RSandboxRead1
-    module procedure :: RSandboxRead2
+    module procedure RSandboxRead1
+    module procedure RSandboxRead2
   end interface
   
   interface RSandboxDestroy
-    module procedure :: RSandboxDestroy1
-    module procedure :: RSandboxDestroy2
+    module procedure RSandboxDestroy1
+    module procedure RSandboxDestroy2
   end interface
   
   public :: RSandboxInit, &

File src/pflotran/reactive_transport.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/realization.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/regression.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/richards.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/richards_lsm.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/richards_mfd.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/secondary_continuum.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/simulation.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/subsurface_factory.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/subsurface_simulation.F90

View file
  • Ignore whitespace
 
   call this%process_model_coupler_list%InitializeRun()
 
-#if 0  
-  !TODO(geh): place logic here to stop if only initial state desired (e.g.
-  !           solution composition, etc.).
-  
-  !TODO(geh): replace integer arguments with logical
-#ifndef SIMPLIFY  
-  if (this%option%restart_flag) then
-    call OutputInit(1) ! number greater than 0
-  else
-    call OutputInit(0)
-  endif
-#endif
-  
-  if (this%output_option%print_initial) then
-    cur_process_model_coupler => this%process_model_coupler_list
-    do
-      if (.not.associated(cur_process_model_coupler)) exit
-      ! arg1 = plot_flag
-      ! arg2 = transient_plot_flag
-!      call cur_process_model_coupler%Output(PETSC_TRUE,PETSC_TRUE)
-      cur_process_model_coupler => cur_process_model_coupler%next
-    enddo
-  endif
-  
-  !TODO(geh): place logic here to stop if only initial condition desired
-#endif
-
-#if 0
-  ! currently performed in SubsurfaceJumpStart()
-  ! pushed in Init()
-  call PetscLogStagePop(ierr)
-
-  ! popped in FinalizeRun()
-  call PetscLogStagePush(logging%stage(TS_STAGE),ierr)
-#endif  
-  
 end subroutine SubsurfaceInitializeRun
 
 ! ************************************************************************** !

File src/pflotran/th.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/thc.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/thmc.F90

  • Ignore whitespace
File contents unchanged.

File src/pflotran/timestepper.F90

  • Ignore whitespace
File contents unchanged.

File tools/buildbot/builder-info/bandre-mac-10.7-gnu.txt

  • Ignore whitespace
-CPP_FLAGS=

File tools/buildbot/builder-info/bandre-mac-gnu.txt

View file
  • Ignore whitespace
+ 

File tools/buildbot/builder-info/fuji-linux-gnu.txt

View file
  • Ignore whitespace
+-f makefile_new

File tools/buildbot/pflotran-build.sh

View file
  • Ignore whitespace
 function petsc-build() {
     git checkout $1
 
-    _master_config_file="${PFLOTRAN_DIR}/tools/buildbot/petsc/configure-${PETSC_ARCH}.py"
-    if [ ! -f ${_master_config_file} ]; then
-        echo "ERROR: pflotran repository does not contain a petsc configure script for this builder. Expected: ${_master_config_file}"
+    _petsc_config_file="${PFLOTRAN_DIR}/tools/buildbot/petsc/configure-${PETSC_ARCH}.py"
+    if [ ! -f ${_petsc_config_file} ]; then
+        echo "ERROR: pflotran repository does not contain a petsc configure script for this builder. Expected: '${_petsc_config_file}'"
         exit 1
     else
-        echo "Linking PETSc config file from pflotran repo: ${_master_config_file}"
+        echo "Linking PETSc config file from pflotran repo: ${_petsc_config_file}"
     fi
-    ln -s  ${_master_config_file} ${PETSC_DIR}/configure-${PETSC_ARCH}.py
+    ln -s  ${_petsc_config_file} ${PETSC_DIR}/configure-${PETSC_ARCH}.py
     echo "Configuring PETSc..."
     python configure-${PETSC_ARCH}.py
     echo "Building PETSc..."
     _info_file=${PFLOTRAN_DIR}/tools/buildbot/builder-info/${BUILDER_ID}.txt
     if [ -f ${_info_file} ]; then
         _pflotran_flags=`cat ${_info_file}`
+        echo "  pflotran build flags=${_pflotran_flags}"
     else
         echo "Could not find builder info file: ${_info_file}. Building vanilla pflotran."
     fi
     echo "  PETSC_DIR=${PETSC_DIR}"
     echo "  PETSC_ARCH=${PETSC_ARCH}"
     export PETSC_DIR PETSC_ARCH
-    cd ${PFLOTRAN_DIR}/regression_tests
+    _test_dir=${PFLOTRAN_DIR}/regression_tests
+    _pflotran_flags=
+    _info_file=${PFLOTRAN_DIR}/tools/buildbot/builder-info/${BUILDER_ID}.txt
+    if [ -f ${_info_file} ]; then
+        _pflotran_flags=`cat ${_info_file}`
+        echo "  pflotran build flags=${_pflotran_flags}"
+
+        grep -e "makefile_new" ${_info_file} &> /dev/null
+        if [ "$?" -eq "0" ]; then
+            _test_dir=${PFLOTRAN_DIR}/regression_tests_refactor
+        fi
+    else
+        echo "Could not find builder info file: ${_info_file}. Testing vanilla pflotran."
+    fi
+
+    echo "  test directory : ${_test_dir}"
+    cd ${_test_dir}
     make clean-tests &> /dev/null
     make test
     BUILD_STATUS=$?