Skip to content

Feature/general indices gatscat#1832

Merged
vithikashah001 merged 10 commits intoNOAA-GFDL:mainfrom
abrooks1085:feature/general-indices-gatscat
Apr 22, 2026
Merged

Feature/general indices gatscat#1832
vithikashah001 merged 10 commits intoNOAA-GFDL:mainfrom
abrooks1085:feature/general-indices-gatscat

Conversation

@abrooks1085
Copy link
Copy Markdown
Contributor

@abrooks1085 abrooks1085 commented Feb 3, 2026

Description
Add support for mpp_pelist_scatter and mpp_pelist_gather with generalized indices (dim_order), including correct handling of non-canonical storage layouts, along with a corresponding unit test.

This change ensures that scatter and gather operations work correctly when array data is stored in a layout that does not follow the canonical (i, j, k) ordering. Data movement remains consistent across MPI ranks regardless of how dimensions are permuted in memory.

A new test (test_mpp_pelist_gatscat_gen_ind) is introduced to validate pelist scatter/gather behavior across multiple permutations of storage layout.

How Has This Been Tested?
amdbox + intel + Autotools

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
  • make distcheck passes

@uramirez8707 uramirez8707 requested a review from J-Lentz March 31, 2026 17:13
@abrooks1085 abrooks1085 marked this pull request as ready for review April 21, 2026 17:36
@vithikashah001 vithikashah001 merged commit 30effab into NOAA-GFDL:main Apr 22, 2026
17 of 18 checks passed
@J-Lentz
Copy link
Copy Markdown
Contributor

J-Lentz commented Apr 23, 2026

The new test seems to fail on C5 with ifx 2025.2.1. I have the following flags enabled: -traceback -debug -check all

Image              PC                Routine            Line        Source             
libFMS.so.27.0.0   00007FF7FF6E63C0  mpp_gather_int4_1          48  mpp_gather.fh
libFMS.so.27.0.0   00007FF7FF702022  mpp_gather_pelist         216  mpp_gather.fh
lt-test_mpp_pelis  00000000004114B1  test_gather               283  test_mpp_pelist_gatscat_gen_ind.F90
lt-test_mpp_pelis  000000000040D74F  test_mpp_pelist_g          62  test_mpp_pelist_gatscat_gen_ind.F90
lt-test_mpp_pelis  000000000040D12D  Unknown               Unknown  Unknown
libc.so.6          00007FF7FE62BE6C  Unknown               Unknown  Unknown
libc.so.6          00007FF7FE62BF35  __libc_start_main     Unknown  Unknown
lt-test_mpp_pelis  000000000040D031  Unknown               Unknown  Unknown
forrtl: severe (408): fort: (7): Attempt to use pointer RBUF when it is not associated with a target

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.

4 participants