spectre.tools.Status.ExecutableStatus.EvolveGhBinaryBlackHole

class spectre.tools.Status.ExecutableStatus.EvolveGhBinaryBlackHole
__init__()

Methods

__init__()

format(field, value)

Transform status values to human-readable strings.

render_dashboard(job, input_file)

Render a dashboard for the job (experimental).

render_time_steps(input_file, reduction_files)

status(input_file, work_dir)

Provide status information of an executable run.

time_status(input_file, open_reductions_file)

Report the simulation time and speed.

Attributes

executable_name_patterns

fields

executable_name_patterns: List[str] = ['^EvolveGhBinaryBlackHole']
fields: Dict[str, str | None] = {'3-Index Constraint': None, 'Orbits': None, 'Separation': 'M', 'Speed': 'M/h', 'Time': 'M'}
format(field, value)

Transform status values to human-readable strings.

Parameters:
  • field – The name of the field, as listed in ‘fields’ (e.g. “Time”).

  • value – The status value of the field, as returned by ‘status()’.

Returns: Human-readable representation of the value.

render_dashboard(job: dict, input_file: dict)

Render a dashboard for the job (experimental).

Parameters:
  • job – A dictionary of job information, including the input file and working directory. See the ‘spectre.tools.Status.fetch_status’ function for details.

  • input_file – The input file read in as a dictionary.

This method can be overridden by subclasses to provide a custom dashboard for the job. The default implementation does nothing.

render_time_steps(input_file: dict, reduction_files: list)
status(input_file, work_dir)

Provide status information of an executable run.

Parameters:
  • input_file – The input file read in as a dictionary.

  • work_dir – The working directory of the executable run. Paths in the input file are relative to this directory.

Returns: Dictionary of ‘fields’ and their values. For example:

{“Time”: 10.5, “Orbits”: 3}. Not all fields must be provided if they can’t be determined.

Note: Avoid raising exceptions in this function. It is better to provide

only a subset of fields than to raise an exception. For example, if there’s an error reading the number of orbits, intercept and log the exception and just skip providing the number of orbits.

time_status(input_file: dict, open_reductions_file, avg_num_slabs: int = 50) dict

Report the simulation time and speed.

Uses the ‘ObserveTimeStep’ event, so the status information is only as current as the output frequency of the event. The reported time is the most recent output of the ‘ObserveTimeStep’ event, and the reported speed is determined from the two most recent outputs. Since the walltime at which different elements in the computational domain reach the timestep varies because of the lack of a global synchronization point in the task-based parallel evolution, this function returns the average between the minimum and maximum walltime.

Parameters:
  • input_file – The input file read in as a dictionary.

  • open_reductions_file – The open h5py reductions data file.

  • avg_num_slabs – Number of slabs to average over for estimating the simulation speed (at least 2).

Returns: Status fields “Time” in code units and “Speed” in simulation

time per hour.