lbaf.IO.lbsVTDataReader.LoadReader class

A class to read VT Object Map files. These json files could be compressed with Brotli.

Each file is named as <base-name>.<node>.json, where <node> spans the number of MPI ranks that VT is utilizing. The schema of the compatible files is defined in <project-path>/src/IO/schemaValidator.py

Methods

def _get_n_ranks(self)
Determine the number of ranks automatically.
def _populate_rank(self, phase_id: int, rank_id: int) -> typing.Tuple[Model.lbsRank.Rank, dict]
Populate rank and its communicator in phase using the JSON content.
def populate_phase(self, phase_id: int) -> typing.List[Model.lbsRank.Rank]
Populate phase using the JSON content.

Special methods

def __init__(self, file_prefix: str, logger: logging.Logger, file_suffix: str = 'json', check_schema = True, expected_ranks = None)

Data

CommCategory = ...
SCHEMA_VALIDATOR_CLASS = None

Method documentation

def lbaf.IO.lbsVTDataReader.LoadReader._get_n_ranks(self)

Determine the number of ranks automatically.

This use the first applicable method in the following methods: List all data file names matching {file_prefix}.{rank_id}.{file_suffix} pattern and return max(rank_id) + 1.