GridTools
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    ## Running the granule I managed to run the granule again with the following PRs which contain a few hacks and custom branches - https://github.com/C2SM/icon-exclaim/pull/338 - https://github.com/C2SM/icon4py/pull/731 for - [x] exp.mch_ch_r04b09_dsl on 1 gpu - [x] exp.mch_ch_r04b09_dsl on 4 gpu - mch_icon_ch2 broken, see below didn't try any other experiments. Current problems ### Skip values GT4Py's unstructured extent analysis will insert the full horizontal domain instead of doing proper extent analysis. Therefore, the resulting field operations (`as_fieldop`) will indicate computation on the full horizontal domain, including halo/boundary regions where the neighbor tables contain `-1` (because there is no neighbor on the current rank/in the domain). In ICON these values are never used, because the domain is always smaller. In GT4Py there is a problem: - for DaCe, because the domain will be used in the map - for GTFN, if temporaries are extracted, the domain will be used to fill the temporary. Agreed workaround: #### Replace `-1`s Replace **all** `-1` by an existing index, e.g. one that is already used in for the neighborhood (for better locality) or just `0`. This is ok for local experiments, since the resulting computations (close to the halo/boundary) are not used for output (because the original problem is that we overcompute too much) and there are no pentagon points. For global experiments, we can apply this to all connectivities that don't fix pentagons. Note: I tried this approach (replacing all points) and managed to run multi-gpu setup for all experiments that I tried (mch dsl experiment, mch_icon_ch2, exclaim ape). See https://github.com/C2SM/icon4py/pull/728 ### vn_incr optional In a recent PR vn_incr was added to the granule interface. Here is a PR to make it optional in icon4py https://github.com/C2SM/icon4py/pull/729. Note, that the Fortran code needs to be fixed, too! If you have old bindings you will get a weird error. icon-exclaim changes https://github.com/C2SM/icon-exclaim/pull/338 ### ddt_w_adv_ntl1/2 not verifying Show as wrong in `build_xpu2py_verify` because they don't match (intentionally) in the halo. Daniel implemented a feature that allows to decide were to verify. For these fields the range needs to be fixed. ### bug in divdamp_type == 32 See https://github.com/C2SM/icon4py/blob/242f29f285bfd5374b8aa257ee680172398feb0a/model/atmosphere/dycore/src/icon4py/model/atmosphere/dycore/solve_nonhydro.py#L546 and the following line. This bug can be triggered by `exp.mch_icon-ch2`. - It should be `_backend` - the `where` is missing 2 arguments? -> `np.asarray(condition).nonzero()` -> return tuple of arrays with the components of the indices where the condition is non-zero - The problem is probably that it returns a tuple of arrays, not just an array ## Environment on balfrin and santis Once, the new icon uenv (v2 or whatever number they will use) is officially released, we should switch icon-exclaim to use it. I have https://github.com/C2SM/icon-exclaim/pull/333 to switch balfrin to this uenv. Building should also work on santis, however running needs the run scripts from upstream. I lost track of the status: Will and Daniel are probably involved. I would try to merge my PR first, as it moves the only supported system for granule runs (balfin) to the new setup. Then, in a separate PR, make also santis work. ## Running **the** benchmark I used to compare jablonowski williamson r2b5, r2b6, r2b7 between greenline, blueline + granule, openacc. Chia Rui gave me the openacc setup and the greenline setup. For the granule you need to build `build_gpu2py` copy the runscript and grid files (see all absolute paths in the runscripts) to `build_gpu2py`. Last time I tried R2B7 with greenline jw driver the python overhead was relatively small. I concluded this, because I used the `detailed_timers` from https://github.com/C2SM/icon4py/pull/731/files#diff-c5c9f29cbbd1ece39cd3a41411f035761a31618fcdde23233ad97b2d11873905R74, which syncs after dycore substep and after diffusion (same syncs as in granule), and got the sum of 5 * dycore substep + diffusion to be about the same as measuring without `detailed_timers`. As a first step to benchmark, I would try to reproduce these numbers https://docs.google.com/spreadsheets/d/1YkehDnIZP-BtRFMuYaphYiON08Dkf2U9ESJeSYnfU7Y/edit?gid=8172009#gid=8172009. I.e. achieve something like `0.389463` (the better number is with static args for diffusion and velocity advection) to `0.407985` for R2B7 greenline JW with `detailed_timers=False`. It is important to set `PYTHONOPTIMIZE=2` (or `1`) and `GT4PY_UNSTRUCTURED_HORIZONTAL_HAS_UNIT_STRIDE=1`. Also probably `GT4PY_BUILD_CACHE_LIFETIME=persistent` to make sure programs are cached. Note, that icon4py main has now more combined programs, which has static args in https://github.com/C2SM/icon4py/pull/731, but I didn't have time to run the greenline. ### Overhead investigation Once https://github.com/GridTools/gt4py/pull/1978 is merged, gt4py can report detailed timers. Would be interesting to see from these timers the overhead in gt4py. Additionally, `py2fgen` bindings have timers which can be enabled with `PY2FGEN_PROFILING=1`. The timings will be reported in the ICON slurm log via Python logger. (There is also `PY2FGEN_LOG_LEVEL` to define the logging level for the bindings part.) Note: - with PYTHON_OPTIMIZE>0, the profiling output is disabled! - check the bindings code to understand how the timers work, see e.g. here https://github.com/C2SM/icon4py/blob/242f29f285bfd5374b8aa257ee680172398feb0a/tools/src/icon4py/tools/py2fgen/_export.py#L127 ### Granule performance With the fixes described in [running the granule](#Running-the-granule) it should be able to do a comparison between openacc and the granule. E.g. compare multi-node icon-mch2 or single node jw r2b6. Last time I tried, the r2b6 was slower than openAcc and slower than greenline (greenline faster than openacc), see google sheet mentioned above. ### Blueline vs greenline performance for JW Investigate if greenline has the cupy cub compilation problem ``` /scratch/mch/vogtha/icon_granule_integrate4/icon-exclaim/externals/icon4py/.venv/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/detail/libcxx/include/limits(465): error: floating constant is out of range return __FLT_DENORM_MIN__; ^ ``` which can be worked-around with `export CUPY_ACCELERATORS=""`. If greenline doesn't need this fix, this could be the reason for the performance difference. We noticed that there is an expensive debug print in the blueline with loglevel > 7? So for performance run with Fortran ICON log level 1 ## concat_where frontend handover to Enrique: - move the unchain comparison from python ast preprocessing to foast_to_gtir, because then we can run type inference on foast and reject the cases for domain, while still allowing scalar comparisons. - disallow `0 < K < n`, while allowing `0. < scalar_float < someval`.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully