pulsesuite.PSTD3D.benchmark

Benchmarking and run-summary for PulseSuite simulations.

Writes a run_summary.txt file inside the current working directory (expected to be the timestamped run directory) containing:

  • Wall-clock timing (total, init, time-loop)

  • Hardware info (CPU, cores, RAM, GPU if present)

  • Compute backend availability and dispatch chain

  • Python / NumPy / Numba / CuPy version info

  • Performance metrics (time per step, steps/s)

Functions

timer_start([label])

Record the start time for label.

timer_stop([label])

Record the end time for label.

profile_start()

Return a timestamp for use with profile_record().

profile_record(label, start_time)

Accumulate elapsed time since start_time under label.

get_profile_data()

Return a copy of the accumulated profile data.

write_summary([filename, sim_params])

Write a human-readable run summary to filename.

Module Contents

pulsesuite.PSTD3D.benchmark.timer_start(label='total')

Record the start time for label.

pulsesuite.PSTD3D.benchmark.timer_stop(label='total')

Record the end time for label.

pulsesuite.PSTD3D.benchmark.profile_start()

Return a timestamp for use with profile_record().

pulsesuite.PSTD3D.benchmark.profile_record(label, start_time)

Accumulate elapsed time since start_time under label.

pulsesuite.PSTD3D.benchmark.get_profile_data()

Return a copy of the accumulated profile data.

pulsesuite.PSTD3D.benchmark.write_summary(filename='run_summary.txt', sim_params=None)

Write a human-readable run summary to filename.

Parameters:
  • filename (str) – Output file path (default: run_summary.txt in cwd).

  • sim_params (dict, optional) – Simulation parameters to include (Nt, dt, Nr, etc.).