Skip to content
Snippets Groups Projects

Performance optimization for NEC SX AURORA

Merged Daniel Reinert requested to merge libfortran-support_opt_nec into master

What is the bug

The subroutines init_zero_4d_[dp,sp,i4] do not vectorize properly on NEC SX AURORA.

How do you fix it

Loop collapsing is enforced by a compiler directive for the subroutines init_zero_4d_[dp,sp,i4], in order to ensure proper vectorization on NEC SX AURORA.

How urgent is the bugfix

  • I need it as soon as possible
  • I can wait for a couple of days
  • None of my current codes is directly affected

Mandatory steps before review

  • Gitlab CI passes (Hint: use make format for linting)
  • Bugfix is covered by additional unit tests
  • Mark the merge request as ready by removing Draft:

Mandatory steps before merge

  • Test coverage does not decrease
  • Reviewed by a maintainer
  • Incorporate review suggestions
  • Prior to merging, please remove any boilerplate from the MR description, retaining only the What is the bug and How do you fix it section to maintain
  • Remember to edit the commit message and select the proper changelog category (feature/bugfix/other)

You are not supposed to merge this request by yourself, the maintainers of fortan-support take care of this action!

Edited by Yen-Chen Chen

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Daniel Reinert requested review from @k202170

    requested review from @k202170

  • Daniel Reinert changed title from Draft: Performance optimizatiojn for NEC SX AURORA to Draft: Performance optimization for NEC SX AURORA

    changed title from Draft: Performance optimizatiojn for NEC SX AURORA to Draft: Performance optimization for NEC SX AURORA

  • Daniel Reinert marked the checklist item Gitlab CI passes (Hint: use make format for linting) as completed

    marked the checklist item Gitlab CI passes (Hint: use make format for linting) as completed

  • Daniel Reinert marked this merge request as ready

    marked this merge request as ready

  • Daniel Reinert marked the checklist item Mark the merge request as ready by removing Draft: as completed

    marked the checklist item Mark the merge request as ready by removing Draft: as completed

  • Daniel Reinert changed the description

    changed the description

  • Yen-Chen Chen marked the checklist item Test coverage does not decrease as completed

    marked the checklist item Test coverage does not decrease as completed

  • Yen-Chen Chen marked the checklist item Reviewed by a maintainer as completed

    marked the checklist item Reviewed by a maintainer as completed

  • Yen-Chen Chen approved this merge request

    approved this merge request

  • Yen-Chen Chen enabled an automatic merge when all merge checks for 3e5adc64 pass

    enabled an automatic merge when all merge checks for 3e5adc64 pass

  • Yen-Chen Chen resolved all threads

    resolved all threads

  • Daniel Reinert mentioned in commit 35723fc9

    mentioned in commit 35723fc9

    • Author Developer

      Hi Yen-Chen, Hi Pradipta,

      just a short update regarding my attempt to upgrade to the latest commit of libfortran-support. It seems that this is currently not straightforward for icon-nwp (and probably icon-main as well).

      I encountered problems in the external icon-dace and in shared/mo_var_list.f90. There might be a few more problems, as I have aborted my attempt at this point.

      It seems that icon-dace needs to be upgraded such that the variable nnml is no longer used from mo_namelist. With newer version of libfortran-support it must be used from mo_io_units instead. This is totally fine, but it requires icon-dace to be updated before we can move to newer versions of libfortran-support.

      In shared/mo_var_list.f90 I encountered the error message

        380 |       CALL init_contiguous_sp(new_elem%s_ptr, PRODUCT(d(1:5)), ivals%sval)
            |                                                                          1
      Error: Missing actual argument for argument 'lacc' at (1)

      It is not super urgent for me to switch to the latest version of libfortran-support. I just wanted to share my experience.

      Are you planning to move to the latest version of libfortran-support in icon-main in the near future? Please let me know, if I should talk to our DACE colleagues regarding the required changes in icon-dace.

    • Dear Daniel, thanks for finding this error.
      This was an error related to an update where we got rid of the misused i_am_accel_node argument. We missed this function during the update. See issue in libfortran-support and version update in <code data-sourcepos="2:273-2:281">icon-mpim</code>
      To fix this specific piece of code, please add lacc=lopenacc in the argument list, same for the other similar init_contiguous functions.

      Yes, we plan to do a new version update very soon. I will talk to people from DACE and figure out the process. Thank you for posting the questions.

    • Author Developer

      Hi Yen-Chen,

      thanks you very much for this background information.

    • Hi Daniel @m300173,
      For your information, we are doing library version updates here: https://gitlab.dkrz.de/icon/icon-mpim/-/merge_requests/563.
      We do it in icon-mpim because it is currently the only repo with libiconmath.
      I have fixed all the compile issues regarding the new update in the MR.

      Because we update the code in icon-mpim, there might be files that we are missing in icon-nwp where the compile issue regarding the lacc arguments in the init and copy functions come up again.
      I am happy to help if you encounter similar trouble in the future.

    • Author Developer

      Hi Yen-Chen,

      thank you for your update on this. I will try to pull your changes to icon-nwp as soon as they are available in icon.git and let you know if I run into trouble. I guess that the lacc issue should be rather straightforward to solve for me, but I am a bit concerned regarding the icon-dace issue. We'll see ;-)

    • Please register or sign in to reply
  • Daniel Reinert resolved all threads

    resolved all threads

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading