Skip to content

Commit fd5df3f

Browse files
George BisbasJDBetteridge
andcommitted
examples: Apply suggestions from code review
Co-authored-by: Jack Betteridge <43041811+JDBetteridge@users.noreply.github.com>
1 parent 666403b commit fd5df3f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

benchmarks/user/advisor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ advixe-cl --snapshot --project-dir=<advisor-project-name> pack -- /<new-snapshot
5757
* Running the `tripcounts` analysis is time-consuming, despite starting in paused
5858
mode. This analysis, together with the `survey` analysis, is necessary to
5959
generate a roofline. Both are run by `run_advisor.py`.
60-
* Requires Python3, untested in conda environments
60+
* Requires Python 3.9 or later, untested in conda environments
6161
* Currently requires download of repository and running `pip install .`, the scripts
6262
are currently not included as a package with the user installation of Devito
6363

benchmarks/user/advisor/roofline.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,15 @@ def roofline(name, project, scale, precision, mode, th):
202202
prop={'size': 7}, title='Rooflines')
203203

204204
# saving the chart in PDF format
205-
plt.savefig('%s.pdf' % name, bbox_extra_artists=(legend,), bbox_inches='tight')
205+
plt.savefig(f'{name}.pdf', bbox_extra_artists=(legend,), bbox_inches='tight')
206206
figpath = os.path.realpath(__file__).split(os.path.basename(__file__))[0]
207-
log('\nFigure saved in %s%s.pdf.' % (figpath, name))
207+
log(f'\nFigure saved in {figpath}{name}.pdf.')
208208

209209
# Save the JSON file
210210
with open('%s.json' % name, 'w') as f:
211211
f.write(json.dumps(roofline_data))
212212

213-
log('\nJSON file saved as %s.json.' % name)
213+
log(f'\nJSON file saved as {name}.json.')
214214
log('Done!')
215215

216216

0 commit comments

Comments
 (0)