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

Secure, that best guess for max_blocks is always >= 1 #431

Merged
merged 1 commit into from
Apr 10, 2020

Conversation

mhrib
Copy link
Contributor

@mhrib mhrib commented Apr 8, 2020

For detailed information about submitting Pull Requests (PRs) to the CICE-Consortium,
please refer to: https://github.com/CICE-Consortium/About-Us/wiki/Resource-Index#information-for-developers
Pull request version of issue #426

PR checklist

  • [x ] Short (1 sentence) summary of your PR:
    Secure, that best guess for max_blocks is always >= 1. Replace issue ice_domain.f90: Secure max_blocks >= 1 for "best max_block estimate" #426
  • [x ] Developer(s):
    Mads Hvid Ribergaard @mhrib
  • [ x] Suggest PR reviewers from list in the column to the right.
    @apcraig
  • Please copy the PR test results link or provide a summary of testing completed below.
    ENTER INFORMATION HERE
  • How much do the PR code changes differ from the unmodified code?
    • [x ] bit for bit
    • different at roundoff level
    • more substantial
  • Does this PR create or have dependencies on Icepack or any other models?
    • Yes
    • [x ] No
  • Does this PR add any new test cases?
    • Yes
    • [ x] No
  • Is the documentation being updated? ("Documentation" includes information on the wiki or in the .rst files from doc/source/, which are used to create the online technical docs at https://readthedocs.org/projects/cice-consortium-cice/. A test build of the technical docs will be performed as part of the PR testing.)
    • Yes
    • [x ] No, does the documentation need to be updated at a later time?
      • Yes
      • [x ] No
  • [ x] Please provide any additional information or relevant details below:
    Replace issue ice_domain.f90: Secure max_blocks >= 1 for "best max_block estimate" #426

Copy link
Contributor

@eclare108213 eclare108213 left a comment

Choose a reason for hiding this comment

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

Looks okay to me. What is the case that fails without this line?

@mhrib
Copy link
Contributor Author

mhrib commented Apr 8, 2020

Eg. one single block:
block_size_x=nx_global
block_size_y=ny_global

I do not recall why -/+1 arrise in the following line just prioir to the suggested added line. Maybe something with halos...:
max_blocks=int( &
( (dble(nx_global-1)/dble(block_size_x + 1)) * &
(dble(ny_global-1)/dble(block_size_y + 1)) ) &
/ dble(nprocs))

Could also change this line and exclude the 4 times +/-1 's.

Copy link
Contributor

@apcraig apcraig left a comment

Choose a reason for hiding this comment

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

I ran a full test suite on conrad, 4 compilers, with no problems (as expected).

@apcraig apcraig merged commit a7c2893 into CICE-Consortium:master Apr 10, 2020
@mhrib mhrib deleted the max_blocks branch April 16, 2020 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants