Skip to content

Fix mksurfdata CMakeLists.txt: use SHARED for .so PIO libraries#3700

Merged
ekluzek merged 19 commits into
ESCOMP:b4b-devfrom
cdevaneprugh:fix/mksurfdata-cmake-shared-pio
Feb 18, 2026
Merged

Fix mksurfdata CMakeLists.txt: use SHARED for .so PIO libraries#3700
ekluzek merged 19 commits into
ESCOMP:b4b-devfrom
cdevaneprugh:fix/mksurfdata-cmake-shared-pio

Conversation

@cdevaneprugh
Copy link
Copy Markdown

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.

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 ekluzek added enhancement new capability or improved behavior of existing capability bug something is working incorrectly next this should get some attention in the next week or two. Normally each Thursday SE meeting. b4b bit-for-bit labels Jan 21, 2026
Copy link
Copy Markdown
Contributor

@ekluzek ekluzek left a comment

Choose a reason for hiding this comment

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

This looks good! Thanks so much for noticing this and adding a PR for it!

@ekluzek
Copy link
Copy Markdown
Contributor

ekluzek commented Jan 21, 2026

This might as well go onto b4b-dev, so rebasing to it.

@ekluzek ekluzek changed the base branch from master to b4b-dev January 21, 2026 18:02
@ekluzek
Copy link
Copy Markdown
Contributor

ekluzek commented Jan 21, 2026

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.

olyson and others added 16 commits January 21, 2026 11:16
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
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
Copy link
Copy Markdown
Contributor

ekluzek commented Jan 21, 2026

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.

@cdevaneprugh
Copy link
Copy Markdown
Author

Collaborator access granted. Feel free to handle the rebase as needed.

@wwieder wwieder removed the next this should get some attention in the next week or two. Normally each Thursday SE meeting. label Feb 5, 2026
@wwieder
Copy link
Copy Markdown
Contributor

wwieder commented Feb 5, 2026

@ekluzek will try this after b4b dev comes in and then try merging

@ekluzek
Copy link
Copy Markdown
Contributor

ekluzek commented Feb 18, 2026

I made sure the build worked, so merging.

@ekluzek ekluzek merged commit c9a41e0 into ESCOMP:b4b-dev Feb 18, 2026
4 checks passed
@slevis-lmwg slevis-lmwg mentioned this pull request Feb 20, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

b4b bit-for-bit bug something is working incorrectly enhancement new capability or improved behavior of existing capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants