Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netcdf monitor compatible with gpu backend #367

Merged
merged 21 commits into from
Oct 27, 2022
Merged

Conversation

elynnwu
Copy link
Collaborator

@elynnwu elynnwu commented Oct 26, 2022

Purpose

The first pass of netcdf monitor did not work for gpu backend, this PR fixes the issue.

Code changes:

  • netcdf_monitor: use to_numpy whenever .view is referenced. When quantity.data_array is called, make DataArray from quantity directly.
  • zarr_monitor: factor try except statement to to_numpy to be used for both zarr and netcdf
  • convert: new function to_numpy added

Checklist

Before submitting this PR, please make sure:

  • You have followed the coding standards guidelines established at Code Review Checklist.
  • Docstrings and type hints are added to new and updated routines, as appropriate
  • All relevant documentation has been updated or added (e.g. README, CONTRIBUTING docs)
  • For each public change and fix in pace-util, HISTORY has been updated
  • Unit tests are added or updated for non-stencil code changes

util/pace/util/monitor/convert.py Outdated Show resolved Hide resolved
util/pace/util/monitor/convert.py Outdated Show resolved Hide resolved
util/pace/util/monitor/netcdf_monitor.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@mcgibbon mcgibbon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@elynnwu elynnwu enabled auto-merge (squash) October 27, 2022 17:07
@elynnwu elynnwu merged commit bcb3ba9 into main Oct 27, 2022
@elynnwu elynnwu deleted the fix/netcdf-gpu-backend branch October 27, 2022 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants