Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with building WW3 under UFS Coastal #1362

Open
uturuncoglu opened this issue Feb 6, 2025 · 7 comments
Open

Issue with building WW3 under UFS Coastal #1362

uturuncoglu opened this issue Feb 6, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@uturuncoglu
Copy link
Contributor

Describe the bug
The model does not build cleanly under UFS Coastal and giving error related with the PIO library.

To Reproduce

Expected behavior
Having executable with PIO support.

Screenshots

ld: ../../../lib/libww3.a(wav_history_mod.F90.o): in function `wav_history_mod_mp_write_history_':
/work2/noaa/nems/tufuk/COASTAL/ufs-coastal-app-test/sorc/ufs-weather-model/WW3/model/src/wav_history_mod.F90:136: undefined reference to `piolib_mod_mp_createfile_'
ld: /work2/noaa/nems/tufuk/COASTAL/ufs-coastal-app-test/sorc/ufs-weather-model/WW3/model/src/wav_history_mod.F90:161: undefined reference to `pio_nf_mp_def_dim_int_desc_'
ld: /work2/noaa/nems/tufuk/COASTAL/ufs-coastal-app-test/sorc/ufs-weather-model/WW3/model/src/wav_history_mod.F90:162: undefined reference to `pio_nf_mp_def_dim_int_desc_'
ld: /work2/noaa/nems/tufuk/COASTAL/ufs-coastal-app-test/sorc/ufs-weather-model/WW3/model/src/wav_history_mod.F90:163: undefined reference to `pio_nf_mp_def_dim_int_desc_'
ld: /work2/noaa/nems/tufuk/COASTAL/ufs-coastal-app-test/sorc/ufs-weather-model/WW3/model/src/wav_history_mod.F90:175: undefined reference to `pio_nf_mp_def_var_md_desc_'

Additional context
Possible fix:

--- a/model/src/CMakeLists.txt
+++ b/model/src/CMakeLists.txt
@@ -178,6 +178,7 @@ endif()
 
 if("PIO" IN_LIST switches)
   target_sources(ww3_lib PRIVATE ${pio_src})
+  target_link_libraries(ww3_lib PUBLIC PIO::PIO_Fortran)
 endif()
@JessicaMeixner-NOAA
Copy link
Collaborator

You probably need to remove the PIO when building shared utilities.

@uturuncoglu
Copy link
Contributor Author

@JessicaMeixner-NOAA but the code gives error in wav_history_mod.F90 not in shared utils.

@JessicaMeixner-NOAA
Copy link
Collaborator

Which libraries do you expect to be compiled with PIO? You should only have this for the coupled exe only. It's otherwise not supported.

@uturuncoglu
Copy link
Contributor Author

@JessicaMeixner-NOAA It is not a library. I am trying to create UFS executable too for a configuration with WW3. The build failing with the way that I mentioned in the description.

@JessicaMeixner-NOAA
Copy link
Collaborator

Does it work if you do BUILD_TOOLS=OFF?

@JessicaMeixner-NOAA
Copy link
Collaborator

Or does it work with your possible fix you mentioned?

@uturuncoglu
Copy link
Contributor Author

@JessicaMeixner-NOAA Yes, the fix is working in our end and compiles without any issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants