MetOffice / MetOffice/fab

Incorrect timing information

Open
#505 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
9
Forks
9
Avg merge
12d 12h
Merged PRs (30d)
2

Description

I just realised there are two problems with the timing information reported by Fab:

1. Especially in LFRic with kernel extraction many more files are analysed during the PSyclone step (PSyclone needs access to all LFRic files to do static call tree analysis when kernel extraction is used). But as far as I can see this time will be reported as PSyclone time, not as analysis time. Change the PSyclone step to add the time for analysis to the analysis step.
Sample output:
```
running psyclone on 122 x90 files took 0.409s
psyclone took 1.162s
```

The first message is separate timer info inside the psyclone step, the second line the output via `@step`. The metrics file contains:
```
grep psyclone metrics/gungho_model_extract-full-debug-mpif90-gfortran/metrics.json
"psyclone": 1.162196554003458,
```

So I think this is indeed the time including the analysis time (which would be pretty much the difference between 1.162 and 0.409.

2. The timers do not add time, they only report the last time. If an application has many (say) `grab_folder` calls, only the last will be reported, not the sum

Contributor guide

Open the contributing guide

Research direction

Start by tracing the timer handling around the PSyclone step and the @step output, then inspect the recorded values in metrics.json. Reproduce both cases from the issue: analysis time should be attributed to analysis, and repeated calls such as grab_folder should be summed rather than overwritten.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.