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

Add shared library option to FindSCOTCH.cmake #1021

Open
ulmononian opened this issue Jun 16, 2023 · 2 comments · May be fixed by #1024
Open

Add shared library option to FindSCOTCH.cmake #1021

ulmononian opened this issue Jun 16, 2023 · 2 comments · May be fixed by #1024
Labels
enhancement New feature or request

Comments

@ulmononian
Copy link

ulmononian commented Jun 16, 2023

Is your feature request related to a problem? Please describe.
It would be preferable to build scotch w/ shared libraries for future spack-stack releases. However, the current WW3 FindSCOTCH.cmake file looks for static scotch library files and fails if only shared libraries are present. In the UFS-WM cpld_control_pdlib* regression tests, for example, this failure to locate/utilize shared scotch libraries manifests in the following error during the compile stage of the S2SW configuration of the weather model:

Found Python: /scratch1/NCEPDEV/jcsda/jedipara/spack-stack/miniconda-3.9.12/bin/python3.9
Calling CCPP code generator (ccpp_prebuild.py) for suites --suites=FV3_GFS_v17_coupled_p8 ...
CMake Error at /scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.4.0/envs/unified-env-v2/install/gcc/9.2.0/cmake-3.23.1-k5xbsb3/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find SCOTCH (missing: scotch_lib)
Call Stack (most recent call first):
  /scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.4.0/envs/unified-env-v2/install/gcc/9.2.0/cmake-3.23.1-k5xbsb3/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  WW3/cmake/FindSCOTCH.cmake:55 (find_package_handle_standard_args)
  WW3/model/src/CMakeLists.txt:166 (find_package)

Describe the solution you'd like
Would it be possible to either switch exclusively to the use of scotch built w/ shared libraries or alter FindSCOTCH.cmake to allow the location/use of shared libraries? I am not sure if there is/is not a particular need in WW3 for the static build, so I apologize in advance for my ignorance on the matter.

@ulmononian ulmononian added the enhancement New feature or request label Jun 16, 2023
@JessicaMeixner-NOAA
Copy link
Collaborator

I think we should allow for a static build as well as WW3 is used by a wide variety of users, some might prefer a static over a shared build of SCOTCH and I don't think we should limit a use case for that. (I also thought that wcoss2 libraries were all static not shared, but either way I think flexibility is desired).

Will you be providing the update to the FindSCOTCH.cmake for the shared library path @ulmononian?

@ulmononian
Copy link
Author

@JessicaMeixner-NOAA thanks for your quick reply. i agree that maintaining flexibility is the best option here.

i will submit a PR here to add the shared library capability in addition to retaining the static option soon (hopefully mid next week).

@ulmononian ulmononian linked a pull request Jun 20, 2023 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants