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

Changes to test configurations options and externals for parsing #53

Merged
merged 11 commits into from
Jun 20, 2024

Conversation

fmalatino
Copy link
Contributor

@fmalatino fmalatino commented Jun 7, 2024

Description
Conditional statement in stencils/testing/test_translate.py changed to check for compute passed via the --grid pytest option.

Switched conditional statement in ndsl/stencils/testing/conftest.py to check for option of cubed-sphere selection

Made mysign parameter of fill_corners_dgrid_defn an external variable

Resolves Issue 52

How Has This Been Tested?
Tested in pyFV3 and pySHiELD translate tests github workflow.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included

bensonr
bensonr previously approved these changes Jun 11, 2024
@@ -370,7 +370,7 @@ def generate_parallel_stencil_tests(metafunc, *, backend: str):


def get_communicator(comm, layout, topology_mode):
if (MPI.COMM_WORLD.Get_size() > 1) and (topology_mode == "doubly-periodic"):
if (MPI.COMM_WORLD.Get_size() > 1) and (topology_mode == "cubed-sphere"):
Copy link

Choose a reason for hiding this comment

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

This change will definitely make a big difference!!

Copy link
Collaborator

Choose a reason for hiding this comment

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

This was a bug I introduce in the PR right before

@fmalatino fmalatino linked an issue Jun 11, 2024 that may be closed by this pull request
@fmalatino fmalatino changed the title Changes conditional statement to select compute_grid option Changes conditional statement to select compute_grid option and cubed-sphere options Jun 11, 2024
@fmalatino fmalatino changed the title Changes conditional statement to select compute_grid option and cubed-sphere options Changes to test configurations options and externals for parsing Jun 12, 2024
Copy link
Collaborator

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

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

Revert the mysign
Revert the gt4py and dace changes it's out of PR

@@ -763,6 +763,7 @@ def axis_offsets(
"local_js": gtscript.J[0] + self.jsc - origin[1],
"j_end": j_end,
"local_je": gtscript.J[-1] + self.jec - origin[1] - domain[1] + 1,
"mysign": -1.0,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is too aggressive as a fix. The axis_offsets function shouldn't carry the mysign issue.

@@ -998,7 +997,7 @@ def fill_corners_dgrid_defn(
y_in (in):
y_out (inout):
"""
from __externals__ import i_end, i_start, j_end, j_start
from __externals__ import i_end, i_start, j_end, j_start, mysign
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pass it as a default externals or directly a scalar, since never changes in our code

@@ -370,7 +370,7 @@ def generate_parallel_stencil_tests(metafunc, *, backend: str):


def get_communicator(comm, layout, topology_mode):
if (MPI.COMM_WORLD.Get_size() > 1) and (topology_mode == "doubly-periodic"):
if (MPI.COMM_WORLD.Get_size() > 1) and (topology_mode == "cubed-sphere"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

This was a bug I introduce in the PR right before

Copy link
Collaborator

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

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

LGTM.

This will have downstream effect on pyFV3 due to the external change. The mysign change has been approved by me. It's only used like this and therefore should be explicit .

Copy link
Collaborator

@oelbert oelbert left a comment

Choose a reason for hiding this comment

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

LGTM. Can you put an issue in PyFV3 to propagate the change to fill_corners_dgrid_defn there once this is merged?

@fmalatino
Copy link
Contributor Author

LGTM. Can you put an issue in PyFV3 to propagate the change to fill_corners_dgrid_defn there once this is merged?

@oelbert those changes should be currently in PR 23, which is still in draft as it is dependent on this PR.

@fmalatino fmalatino merged commit 921de90 into NOAA-GFDL:develop Jun 20, 2024
1 of 3 checks passed
@fmalatino fmalatino deleted the fix/computegridoption branch June 20, 2024 15:20
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.

Communication between ranks failing when using DaCe orchestration.
4 participants