MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
RunControlFactory.F90
Go to the documentation of this file.
3#if defined(__WITH_MPI__)
5#endif
7 implicit none
8 private
9
10 public :: create_run_control
11
12contains
13
14 function create_run_control() result(controller)
15 use simmodule, only: store_error
17 class(runcontroltype), pointer :: controller
18 ! local
19 character(len=LINELENGTH) :: errmsg
20
21 errmsg = ''
22#if defined(__WITH_MPI__)
23 if (simulation_mode == 'PARALLEL') then
24 controller => create_mpi_run_control()
25 else
26 controller => create_seq_run_control()
27 end if
28#else
29 if (simulation_mode == 'PARALLEL') then
30 write (errmsg, '(a)') &
31 'Can not run parallel mode with this executable: no MPI'
32 call store_error(errmsg, terminate=.true.)
33 end if
34 controller => create_seq_run_control()
35#endif
36
37 end function create_run_control
38
This module contains simulation constants.
Definition Constants.f90:9
integer(i4b), parameter linelength
maximum length of a standard line
Definition Constants.f90:45
class(runcontroltype) function, pointer, public create_mpi_run_control()
class(runcontroltype) function, pointer, public create_run_control()
class(runcontroltype) function, pointer, public create_seq_run_control()
This module contains simulation methods.
Definition Sim.f90:10
subroutine, public store_error(msg, terminate)
Store an error message.
Definition Sim.f90:94
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
character(len=linelength) simulation_mode