Fix mksurfdata CMakeLists.txt: use SHARED for .so PIO libraries#3700
Merged
ekluzek merged 19 commits intoFeb 18, 2026
Conversation
The CMakeLists.txt declares PIO libraries as STATIC IMPORTED but then points to shared library files (.so). This is an internal inconsistency that can cause build failures when using externally-built shared PIO libraries. Fix: Change STATIC IMPORTED to SHARED IMPORTED for pioc and piof targets since they reference .so files. Tested on: HiPerGator (UF HPC) with GCC 14.2.0, OpenMPI 5.0.7, shared PIO 2.6.6 at /blue/gerber/earth_models/shared/parallelio/bld/
ekluzek
approved these changes
Jan 21, 2026
Contributor
ekluzek
left a comment
There was a problem hiding this comment.
This looks good! Thanks so much for noticing this and adding a PR for it!
Contributor
|
This might as well go onto b4b-dev, so rebasing to it. |
Contributor
|
Re-basing in github caused more files to be different. So I'll rebase in the branch. @cdevaneprugh I might need you to add me as a collaborator. |
This brings the parameter file in line with what I used for my AGU 2025 simulations.
grnfill:
Values differ:
[pft 61 (rice)] 0.4000000059604645 → 0.6
[pft 62 (irrigated_rice)] 0.4000000059604645 → 0.6
lfemerg:
Values differ:
[pft 61 (rice)] 0.009999999776482582 → 0.05
[pft 62 (irrigated_rice)] 0.009999999776482582 → 0.05
…remove dwat_temp as it's unused
The CMakeLists.txt declares PIO libraries as STATIC IMPORTED but then points to shared library files (.so). This is an internal inconsistency that can cause build failures when using externally-built shared PIO libraries. Fix: Change STATIC IMPORTED to SHARED IMPORTED for pioc and piof targets since they reference .so files. Tested on: HiPerGator (UF HPC) with GCC 14.2.0, OpenMPI 5.0.7, shared PIO 2.6.6 at /blue/gerber/earth_models/shared/parallelio/bld/
Contributor
|
I'm still seeing differences in other files after having done: git rebase b4b-dev fix/mksurfdata-cmake-shared-pio So we might need to cherry-pick just c1f13a6 to b4b-dev and/or wait until tomorrow when b4b-dev is merged up to master. |
Author
|
Collaborator access granted. Feel free to handle the rebase as needed. |
Contributor
|
@ekluzek will try this after b4b dev comes in and then try merging |
…rugh/CTSM into fix/mksurfdata-cmake-shared-pio
Contributor
|
I made sure the build worked, so merging. |
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.
The CMakeLists.txt declares PIO libraries as STATIC IMPORTED but then points to shared library files (.so). This is an internal inconsistency that can cause build failures when using externally-built shared PIO libraries.
Fix: Change STATIC IMPORTED to SHARED IMPORTED for pioc and piof targets since they reference .so files.
Tested on: HiPerGator (University of Florida HPC) with GCC 14.2.0, OpenMPI 5.0.7, shared PIO 2.6.6
Description of changes
See above.
Specific notes
Affects users building mksurfdata_esmf with externally-built shared PIO libraries.
Contributors other than yourself, if any:
CTSM Issues Fixed (include github issue #):
Are answers expected to change (and if so in what way)?
No - this is a build configuration fix only.
Any User Interface Changes (namelist or namelist defaults changes)?
No
Does this create a need to change or add documentation? Did you do so?
No
Testing performed, if any:
Built mksurfdata_esmf successfully with external shared PIO on HiPerGator.