Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(io): add modflow extended description to IO guide #2097

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions doc/mf6io/body.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
\SECTION{Running a Simulation}
\input{running_simulation.tex}

%Instructions for running a simulation
\SECTION{Extended MODFLOW}
\input{extended_modflow.tex}

%General form of input instructions
\SECTION{Form of Input Instructions}
\input{framework/form_of_input.tex}
Expand All @@ -35,6 +39,11 @@
\SECTION{Adaptive Time Step (ATS) Utility}
\input{utl_ats.tex}

%HPC configuration file
\newpage
\SECTION{High Performance Computing (HPC) Utility -- \textcolor{red}{Extended MODFLOW only}}
\input{utl_hpc.tex}

%GWF Model Input Instructions
\newpage
\SECTION{Groundwater Flow (GWF) Model Input}
Expand Down
3 changes: 3 additions & 0 deletions doc/mf6io/extended_modflow.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Next to the standard \mf executable, a second, extended version of the program is made available. This version comes with more advanced functionality for which it partially relies on third-party libraries. Currently this concerns the parallel computing capability and the use of NetCDF4 for I/O data. Because the external dependencies increase the complexity of the installation procedure, \mf will remain available in its core set of functionality.

Extended \mf contains all features available in the standard edition, runs on the same input configuration, and produces the same results. Reversely, when running with the standard executable, some features described in this document (HPC Utility, NetCDF4 I/O) will not be available and their configuration will be ignored or an error is reported. These features will be labeled accordingly below.
8 changes: 8 additions & 0 deletions doc/mf6io/mf6ivar/dfn/utl-hpc.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
# flopy subpackage hpc_filerecord hpc hpc_data hpc
# flopy parent_name_type parent_package MFSimulation

block options
name print_input
type keyword
reader urword
optional true
longname model print input to listing file
description keyword to indicate that the input will be printed.

block options
name dev_log_mpi
type keyword
Expand Down
12 changes: 12 additions & 0 deletions doc/mf6io/mf6ivar/examples/utl-hpc-example1.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
BEGIN options
END options

BEGIN partitions
# mname MPI-rank
model_0 0
model_1 0
model_2 1
model_3 2
model_4 3
model_5 3
END partitions
12 changes: 12 additions & 0 deletions doc/mf6io/mf6ivar/examples/utl-hpc-example2.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
BEGIN options
END options

BEGIN partitions
# mname MPI-rank
left_gwf 0
inset_gwf 1
right_gwf 0
left_gwt 0
inset_gwt 1
right_gwt 0
END partitions
21 changes: 21 additions & 0 deletions doc/mf6io/utl_hpc.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The High Performance Computing (HPC) utility file for the simulation can be activated by specifying the HPC6 option in the simulation name file. It's main purpose is to assign the models in a parallel simulation to the available CPU cores for cases where the internal distribution algorithm is not satisfactory. If activated, \mf will read HPC input according to the following description.

\vspace{5mm}
\subsection{Structure of Blocks}
\lstinputlisting[style=blockdefinition]{./mf6ivar/tex/utl-hpc-options.dat}
\lstinputlisting[style=blockdefinition]{./mf6ivar/tex/utl-hpc-partitions.dat}

\vspace{5mm}
\subsection{Explanation of Variables}
\begin{description}
\input{./mf6ivar/tex/utl-hpc-desc.tex}
\end{description}

\vspace{5mm}
\subsection{Example Input File}
Example 1: HPC input file distributing 6 models over 4 available CPU cores.
\lstinputlisting[style=inputfile]{./mf6ivar/examples/utl-hpc-example1.dat}

\vspace{5mm}
Example 2: HPC input file distributing 3 GWF models coupled individually to 3 GWT models over 2 available CPU cores. Note that the GWT models have to be assigned the same partition numbers as their GWF counterparts.
\lstinputlisting[style=inputfile]{./mf6ivar/examples/utl-hpc-example2.dat}
20 changes: 20 additions & 0 deletions src/Idm/utl-hpcidm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module UtlHpcInputModule
public utl_hpc_subpackages

type UtlHpcParamFoundType
logical :: print_input = .false.
logical :: dev_log_mpi = .false.
logical :: mname = .false.
logical :: mrank = .false.
Expand All @@ -25,6 +26,24 @@ module UtlHpcInputModule
' ' &
]

type(InputParamDefinitionType), parameter :: &
utlhpc_print_input = InputParamDefinitionType &
( &
'UTL', & ! component
'HPC', & ! subcomponent
'OPTIONS', & ! block
'PRINT_INPUT', & ! tag name
'PRINT_INPUT', & ! fortran variable
'KEYWORD', & ! type
'', & ! shape
'model print input to listing file', & ! longname
.false., & ! required
.false., & ! multi-record
.false., & ! preserve case
.false., & ! layered
.false. & ! timeseries
)

type(InputParamDefinitionType), parameter :: &
utlhpc_dev_log_mpi = InputParamDefinitionType &
( &
Expand Down Expand Up @@ -82,6 +101,7 @@ module UtlHpcInputModule
type(InputParamDefinitionType), parameter :: &
utl_hpc_param_definitions(*) = &
[ &
utlhpc_print_input, &
utlhpc_dev_log_mpi, &
utlhpc_mname, &
utlhpc_mrank &
Expand Down
Loading