Skip to content

Fixes for eamxx standalone tests#699

Open
jayeshkrishna wants to merge 4 commits into
masterfrom
jayeshkrishna/turn_off_bget_by_default
Open

Fixes for eamxx standalone tests#699
jayeshkrishna wants to merge 4 commits into
masterfrom
jayeshkrishna/turn_off_bget_by_default

Conversation

@jayeshkrishna

@jayeshkrishna jayeshkrishna commented Jun 11, 2026

Copy link
Copy Markdown
Contributor
  • Turn bget off by default
    (We no longer use bget in E3SM builds and nightly tests)
  • In PIOc_initdecomp() allow compmap to be NULL when length is 0

We no longer use bget in E3SM builds and nightly tests. Turn bget
off by default
@jayeshkrishna jayeshkrishna self-assigned this Jun 11, 2026
@jayeshkrishna jayeshkrishna added the Next Release Enhancements slated for the upcoming (next) release label Jun 11, 2026
When doing validity checks for compmaps also check for the length
of the compmap (compmap can be NULL if map length is 0)
@jayeshkrishna jayeshkrishna changed the title Turn off bget by default Fixes for eamxx standalone tests Jun 16, 2026
@jayeshkrishna jayeshkrishna requested a review from Copilot June 17, 2026 16:45
@jayeshkrishna jayeshkrishna marked this pull request as ready for review June 17, 2026 16:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates SCORPIO defaults and initialization behavior to support EAMxx
standalone test configurations, specifically by defaulting away from the BGET
allocator and loosening PIOc_InitDecomp input requirements for empty
decompositions.

Changes:

  • Default PIO_USE_MALLOC to ON (disabling BGET by default in builds).
  • Allow compmap to be NULL when maplen == 0 in initdecomp() and improve the
    related error message.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/clib/core/pioc.cpp Adjusts initdecomp() pointer validation/error reporting to permit compmap == NULL when maplen == 0.
CMakeLists.txt Flips PIO_USE_MALLOC CMake option default to ON (malloc-based allocation becomes the default).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/clib/core/pioc.cpp
Comment on lines +765 to +767
if(!gdimlen || ((maplen != 0) && !compmap) || !ioidp){
return pio_err(ios, NULL, PIO_EINVAL, __FILE__, __LINE__,
"Initializing the PIO decomposition failed. Invalid pointers (NULL) to gdimlen(%s) or compmap(%s) or ioidp (%s) provided", (gdimlen) ? "not NULL" : "NULL", (compmap) ? "not NULL" : "NULL", (ioidp) ? "not NULL" : "NULL");
"Initializing the PIO decomposition failed. Invalid pointers (NULL) to gdimlen(%s) or compmap(%s, maplen=%d) or ioidp (%s) provided", (gdimlen) ? "not NULL" : "NULL", (compmap) ? "not NULL" : "NULL", maplen, (ioidp) ? "not NULL" : "NULL");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This should be fixed now

Comment thread CMakeLists.txt
option (PIO_TEST_BIG_ENDIAN "Enable test to see if machine is big endian" ON)
option (PIO_USE_MPISERIAL "Enable mpi-serial support (instead of MPI)" OFF)
option (PIO_USE_MALLOC "Use native malloc (instead of bget package)" OFF)
option (PIO_USE_MALLOC "Use native malloc (instead of bget package)" ON)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed the docs

@jayeshkrishna jayeshkrishna force-pushed the jayeshkrishna/turn_off_bget_by_default branch from db1d176 to e335869 Compare June 18, 2026 01:08
@jayeshkrishna jayeshkrishna requested a review from Copilot June 18, 2026 03:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread src/clib/core/pioc.cpp
Comment on lines +765 to +767
if(!gdimlen || ((maplen != 0) && !compmap) || !ioidp){
return pio_err(ios, NULL, PIO_EINVAL, __FILE__, __LINE__,
"Initializing the PIO decomposition failed. Invalid pointers (NULL) to gdimlen(%s) or compmap(%s) or ioidp (%s) provided", (gdimlen) ? "not NULL" : "NULL", (compmap) ? "not NULL" : "NULL", (ioidp) ? "not NULL" : "NULL");
"Initializing the PIO decomposition failed. Invalid pointers (NULL) to gdimlen(%s) or compmap(%s, maplen=%d) or ioidp (%s) provided", (gdimlen) ? "not NULL" : "NULL", (compmap) ? "not NULL" : "NULL", maplen, (ioidp) ? "not NULL" : "NULL");
Comment thread docs/source/Installing.txt Outdated
Update doc to indicate that PIO_USE_MALLOC is now ON by default
The behavior of malloc(0 bytes) and std::copy/transform(NULL, ...)
are implementation defined.

Alloc map only if maplen > 0. And Copy/Transform map only if
maplen > 0

Updating asserts in functions to allow NULL compmaps
(when maplen == 0)
@jayeshkrishna jayeshkrishna force-pushed the jayeshkrishna/turn_off_bget_by_default branch from e335869 to 71d7207 Compare June 18, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Next Release Enhancements slated for the upcoming (next) release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants