[Summary]
This seems to be an issue related to CMake 3.22 or higher:
not reproducible with 3.21.6, reproducible with 3.22.0, reproducible with latest 3.26.4.
For Cray wrappers (cc, CC, ftn) and "-DCMAKE_SYSTEM_NAME=Catamount", there is a CMake error (Could NOT find MPI). Not reproducible if CMAKE_SYSTEM_NAME is not set.
For non-Cray MPI wrappers (mpicc, mpicxx, mpifort), there is a hanging issue during configuration, no matter CMAKE_SYSTEM_NAME is set to Catamount or not.
Reproducible on some E3SM machines with available Cray MPICH, including Perlmutter, Crusher/Frontier, and Sunspot (Note: The script below sets the CMake system name to Catamount).
[Steps to reproduce the CMake error]
On Perlmutter/Crusher/Frontier, run the same commands below:
...
-- Looking for gettimeofday - found
-- ===== Configuring SCORPIO C library... =====
// Hanging here
Note: same hanging issue with "-DCMAKE_SYSTEM_NAME=Catamount"
[About configuration of SCORPIO in E3SM builds]
Cray wrappers (cc, CC, ftn) are always used for Perlmutter/Crusher/Frontier so there are no hanging issues associated with regular MPI wrappers.
Perlmutter uses "<OS>Linux</OS>" such that "-DCMAKE_SYSTEM_NAME=Catamount" is not set, and it can use newer cmake/3.24.3
Crusher and Frontier use "<OS>CNL</OS>" such that "-DCMAKE_SYSTEM_NAME=Catamount" is set in CNL.cmake, and they both have to use older cmake/3.21.3
[Summary] This seems to be an issue related to CMake 3.22 or higher: not reproducible with 3.21.6, reproducible with 3.22.0, reproducible with latest 3.26.4.
Reproducible on some E3SM machines with available Cray MPICH, including Perlmutter, Crusher/Frontier, and Sunspot (Note: The script below sets the CMake system name to Catamount).
[Steps to reproduce the CMake error] On Perlmutter/Crusher/Frontier, run the same commands below:
Error on Perlmutter with default cmake/3.24.3
Error on Frontier with default cmake/3.23.2
[Steps to reproduce the hanging issue during CMake configuration] On Perlmutter/Crusher/Frontier, run the same commands below:
CMake output:
Note: same hanging issue with "-DCMAKE_SYSTEM_NAME=Catamount"
[About configuration of SCORPIO in E3SM builds] Cray wrappers (cc, CC, ftn) are always used for Perlmutter/Crusher/Frontier so there are no hanging issues associated with regular MPI wrappers.
Perlmutter uses "
<OS>Linux</OS>
" such that "-DCMAKE_SYSTEM_NAME=Catamount" is not set, and it can use newer cmake/3.24.3Crusher and Frontier use "
<OS>CNL</OS>
" such that "-DCMAKE_SYSTEM_NAME=Catamount" is set in CNL.cmake, and they both have to use older cmake/3.21.3