Fixes for eamxx standalone tests#699
Open
jayeshkrishna wants to merge 4 commits into
Open
Conversation
We no longer use bget in E3SM builds and nightly tests. Turn bget off by default
When doing validity checks for compmaps also check for the length of the compmap (compmap can be NULL if map length is 0)
There was a problem hiding this comment.
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_MALLOCto ON (disabling BGET by default in builds). - Allow
compmapto be NULL whenmaplen == 0ininitdecomp()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 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"); |
Contributor
Author
There was a problem hiding this comment.
This should be fixed now
| 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) |
Contributor
Author
There was a problem hiding this comment.
Fixed the docs
db1d176 to
e335869
Compare
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"); |
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)
e335869 to
71d7207
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(We no longer use bget in E3SM builds and nightly tests)