Profiles#

An interface to simulation profiles.

What is a Profile?#

Each simulation profile provides performance metrics for a simulation, including CPU time, real time (wall time), and peak memory usage. The ansys.aedt.core.modules.profile.Profiles class is derived from :py:class:collections.abc.Mapping. Information for each profile corresponds to a simulation setup and the parametric variation.

The items in the Profiles class are instances of the :class:ansys.aedt.core.modules.profile.SimulationProfile class.

SimulationProfile

Container for all profile data from a single simulation.

A Profiles instance can be retrieved from the solution setup. Each element in the Profiles instance provides access to the SimulationProfile instance for the variation:

Note

Parameter values that define a “variation” may deviate from expectations due to floating point representation error. The correct variation can be obtained using the .keys() method as shown below.

Some SimulationProfile attributes are instances of the ProfileStep class. A ProfileStep instance, in turn, may be comprised of additional steps that can be accessed as a Pandas.dataframe instance. The SimulationProfile class allows you to retrieve summary data from all steps with the real_time, max_memory and cpu_time attributes.

For example

The attribute values of a SimulationProfile instance depend on the type of simulation. The table() method can be used to retrieve a :class:pandas.DataFrame instance summarizing all simulation steps.

Some methods and attributes in the Profiles class are:

  • elapsed_time (Measured elapsed time for the entire simulation.)

  • real_time() (Sum of real time for all process steps.)

  • max_memory() (Peak memory over all processes.)

  • num_cores (Number of compute cores.)

  • product (Which solver was used to generate the profile.)

  • num_adaptive_passes (Number of adaptive passes - only if adaptive refinement is used)

  • has_frequency_sweep (True if a frequency sweep was run.)

  • is_transient (True if the profile is for a transient solution.)

  • os (Operating system)

Main profile classes#

The following classes cover simulation-level data, steps, and sweeps.

Profiles

Provide an interface to solver profiles.

SimulationProfile

Container for all profile data from a single simulation.

ProfileStep

A profile step possibly containing nested sub-steps.

ProfileStepSummary

Summary information for a single profile step.

TransientProfile

Profile data for a transient solution.

FrequencySweepProfile

Profile data for a frequency sweep.

AdaptivePass

Information for a single adaptive pass.

MemoryGB

Represent memory with conversion to gigabytes and arithmetic.

Utilities#

Helper functions for parsing and presentation.

string_to_time

Convert a string to a datetime.timedelta object.

format_timedelta

Format datetime.timedelta for tables.

step_name_map

Map verbose AEDT step labels to compact names.

merge_dict

Recursively merge two dictionaries using type-aware rules.

get_mesh_process_name

Return the name of the meshing process group if present.