Skip to content

Commit

Permalink
Add FOMs to capture PSM3 info
Browse files Browse the repository at this point in the history
This also serves as a validation that PSM3 is actually in use.

Sample output:

```
Experiment ansys-fluent.pump_2m.test_scaling_1_nodes_h3standard figures of merit:
  Status = SUCCESS
  Tags = ['cae']
  null figures of merit:
    modifier::conditional-psm3::PSM3 version = v3.0
    modifier::conditional-psm3::PSM3 build target = IEFS OFA DELTA 7_5_1_0_1-impi
    Average time per iteration = 0.394 s
    Total Solver CPU Time = 945.98 s
    Total Solver Wall Time = 10.91 s
    modifier::tuned-adm::Tuning Profile = google-hpc-compute-throughput
```
  • Loading branch information
linsword13 committed May 9, 2024
1 parent 7df733d commit 523fa4a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions var/ramble/repos/builtin/modifiers/conditional-psm3/modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ class ConditionalPsm3(BasicModifier):
mode='standard'
)

modifier_variable(
'psm3_log_file',
default='{log_file}',
description='Log file where PSM3 info writes to, this varies based on applications',
mode='standard',
)

def apply_psm3(self, executable_name, executable, app_inst=None):
from ramble.util.executable import CommandExecutable

Expand Down Expand Up @@ -94,3 +101,21 @@ def apply_psm3(self, executable_name, executable, app_inst=None):
)

return pre_cmds, post_cmds

psm3_build_info_regex = r'.*\sPSM3_IDENTIFY PSM3\s+(?P<version>v[\d.]+)\s+built for\s+(?P<target>.*)$'

figure_of_merit(
'PSM3 version',
fom_regex=psm3_build_info_regex,
group_name='version',
units='',
log_file='{psm3_log_file}',
)

figure_of_merit(
'PSM3 build target',
fom_regex=psm3_build_info_regex,
group_name='target',
units='',
log_file='{psm3_log_file}',
)

0 comments on commit 523fa4a

Please sign in to comment.