MFC
Exascale flow solver
Loading...
Searching...
No Matches
m_amr_restart_io Module Reference

The AMR fine-level restart file layout shared by m_amr_restart (writer/reader) and post_process's overlay reader (m_data_input): path, fine cell-boundary subdivision, global-header check and the parallel_io per-block catalog. Callers read the data themselves. More...

Data Types

type  t_amr_restart_catalog
 Every block's header, ownership record and data-chunk byte offset, read collectively by all ranks. More...

Functions/Subroutines

character(len=path_len+3 *name_len) function, public f_amr_restart_path (t_step)
 The fine-level restart file for time step t_step: one file per rank without parallel_io, one shared file with it.
pure subroutine, public s_amr_subdivide_cb (pcb, pcb_lb, lo, nfine, rr, fcb)
 Fine cell boundaries fcb(-1:nfine) by rr-way subdivision of the coarse cells of pcb starting at coarse index lo; pcb_lb is lbound(pcb) in the caller (an assumed-shape dummy resets it to 1). Coarse right edges are copied exactly, so a subdivision of a subdivision reproduces the deeper level bit-for-bit.
impure subroutine, public s_amr_restart_check_header (ghdr, nvar, who, nblk, ref_ratio, max_level)
 Validate the global header: the rank count (serial files need a match), nvar, the stored word size and, when given, the run's amr_ref_ratio (equal) and amr_max_level (at least the file's). Returns the block count.
impure subroutine, public s_amr_restart_read_catalog (ifile, nblk, nvar, cat)
 Read every block's header and ownership record from an open parallel_io file (rank 0 reads, all ranks receive) and lay out the data offsets.

Variables

integer, parameter, public amr_restart_ghdr_ints = 6
 global header length (ints)

Detailed Description

The AMR fine-level restart file layout shared by m_amr_restart (writer/reader) and post_process's overlay reader (m_data_input): path, fine cell-boundary subdivision, global-header check and the parallel_io per-block catalog. Callers read the data themselves.

Layout (parallel_io): amr_restart_ghdr_ints-int header [-num_procs, nblk, nvar, amr_ref_ratio, amr_max_level, bytes per stored word] (the rank count is positive in the serial files), then per block amr_restart_blk_hdr_ints ints [region lo(3), hi(3), level], amr_restart_blk_own_ints ints [owner + 1, m, n, p] and the owner's data chunk nvar*(m+1)*(n+1)*(p+1) stp words (absent without an owner). The serial per-rank file (p_all/p<rank>/<step>/amr_fine.dat) holds the same records as unformatted sequential records, data only for owned blocks.

Function/Subroutine Documentation

◆ f_amr_restart_path()

character(len=path_len + 3*name_len) function, public m_amr_restart_io::f_amr_restart_path ( integer, intent(in) t_step)

The fine-level restart file for time step t_step: one file per rank without parallel_io, one shared file with it.

Definition at line 411 of file m_amr_restart_io.fpp.f90.

Here is the caller graph for this function:

◆ s_amr_restart_check_header()

impure subroutine, public m_amr_restart_io::s_amr_restart_check_header ( integer, dimension(amr_restart_ghdr_ints), intent(in) ghdr,
integer, intent(in) nvar,
character(len=*), intent(in) who,
integer, intent(out) nblk,
integer, intent(in), optional ref_ratio,
integer, intent(in), optional max_level )

Validate the global header: the rank count (serial files need a match), nvar, the stored word size and, when given, the run's amr_ref_ratio (equal) and amr_max_level (at least the file's). Returns the block count.

Parameters
[in]whomessage prefix ('amr restart' / 'amr post')

Definition at line 453 of file m_amr_restart_io.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_amr_restart_read_catalog()

impure subroutine, public m_amr_restart_io::s_amr_restart_read_catalog ( integer, intent(in) ifile,
integer, intent(in) nblk,
integer, intent(in) nvar,
type(t_amr_restart_catalog), intent(out) cat )

Read every block's header and ownership record from an open parallel_io file (rank 0 reads, all ranks receive) and lay out the data offsets.

Definition at line 487 of file m_amr_restart_io.fpp.f90.

Here is the caller graph for this function:

◆ s_amr_subdivide_cb()

pure subroutine, public m_amr_restart_io::s_amr_subdivide_cb ( real(wp), dimension(:), intent(in) pcb,
integer, intent(in) pcb_lb,
integer, intent(in) lo,
integer, intent(in) nfine,
integer, intent(in) rr,
real(wp), dimension(-1:), intent(inout) fcb )

Fine cell boundaries fcb(-1:nfine) by rr-way subdivision of the coarse cells of pcb starting at coarse index lo; pcb_lb is lbound(pcb) in the caller (an assumed-shape dummy resets it to 1). Coarse right edges are copied exactly, so a subdivision of a subdivision reproduces the deeper level bit-for-bit.

Definition at line 428 of file m_amr_restart_io.fpp.f90.

Here is the caller graph for this function:

Variable Documentation

◆ amr_restart_ghdr_ints

integer, parameter, public m_amr_restart_io::amr_restart_ghdr_ints = 6

global header length (ints)

Definition at line 392 of file m_amr_restart_io.fpp.f90.