From 69dc7ad9de20f99caeee1b634d13a5a7d2f5cd2b Mon Sep 17 00:00:00 2001 From: mjr-deltares <45555666+mjr-deltares@users.noreply.github.com> Date: Mon, 9 Dec 2024 18:50:25 +0100 Subject: [PATCH] docs(io): add modflow extended description to IO guide (#2097) * - add modflow extended description * - add HPC print_input option - mark section (red) for extended --- doc/mf6io/body.tex | 9 ++++++++ doc/mf6io/extended_modflow.tex | 3 +++ doc/mf6io/mf6ivar/dfn/utl-hpc.dfn | 8 +++++++ .../mf6ivar/examples/utl-hpc-example1.dat | 12 +++++++++++ .../mf6ivar/examples/utl-hpc-example2.dat | 12 +++++++++++ doc/mf6io/utl_hpc.tex | 21 +++++++++++++++++++ src/Idm/utl-hpcidm.f90 | 20 ++++++++++++++++++ 7 files changed, 85 insertions(+) create mode 100644 doc/mf6io/extended_modflow.tex create mode 100644 doc/mf6io/mf6ivar/examples/utl-hpc-example1.dat create mode 100644 doc/mf6io/mf6ivar/examples/utl-hpc-example2.dat create mode 100644 doc/mf6io/utl_hpc.tex diff --git a/doc/mf6io/body.tex b/doc/mf6io/body.tex index 110dbbd49a0..c25497f7205 100644 --- a/doc/mf6io/body.tex +++ b/doc/mf6io/body.tex @@ -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} @@ -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} diff --git a/doc/mf6io/extended_modflow.tex b/doc/mf6io/extended_modflow.tex new file mode 100644 index 00000000000..65a6c4aaa83 --- /dev/null +++ b/doc/mf6io/extended_modflow.tex @@ -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. \ No newline at end of file diff --git a/doc/mf6io/mf6ivar/dfn/utl-hpc.dfn b/doc/mf6io/mf6ivar/dfn/utl-hpc.dfn index 4003a0a8e20..aef5124c98f 100644 --- a/doc/mf6io/mf6ivar/dfn/utl-hpc.dfn +++ b/doc/mf6io/mf6ivar/dfn/utl-hpc.dfn @@ -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 diff --git a/doc/mf6io/mf6ivar/examples/utl-hpc-example1.dat b/doc/mf6io/mf6ivar/examples/utl-hpc-example1.dat new file mode 100644 index 00000000000..56a40a69165 --- /dev/null +++ b/doc/mf6io/mf6ivar/examples/utl-hpc-example1.dat @@ -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 diff --git a/doc/mf6io/mf6ivar/examples/utl-hpc-example2.dat b/doc/mf6io/mf6ivar/examples/utl-hpc-example2.dat new file mode 100644 index 00000000000..d711d9f6cfb --- /dev/null +++ b/doc/mf6io/mf6ivar/examples/utl-hpc-example2.dat @@ -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 diff --git a/doc/mf6io/utl_hpc.tex b/doc/mf6io/utl_hpc.tex new file mode 100644 index 00000000000..55ff6bb7c94 --- /dev/null +++ b/doc/mf6io/utl_hpc.tex @@ -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} \ No newline at end of file diff --git a/src/Idm/utl-hpcidm.f90 b/src/Idm/utl-hpcidm.f90 index fa935056962..7f10d53b020 100644 --- a/src/Idm/utl-hpcidm.f90 +++ b/src/Idm/utl-hpcidm.f90 @@ -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. @@ -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 & ( & @@ -82,6 +101,7 @@ module UtlHpcInputModule type(InputParamDefinitionType), parameter :: & utl_hpc_param_definitions(*) = & [ & + utlhpc_print_input, & utlhpc_dev_log_mpi, & utlhpc_mname, & utlhpc_mrank &