Description
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.