Skip to content

Commit

Permalink
Merge branch 'bugfix.cmake.fqdn' into 'master.dev'
Browse files Browse the repository at this point in the history
Distinguish machines based on their FQDN in CMake

See merge request piclas/piclas!712
  • Loading branch information
scopplestone committed Oct 14, 2022
2 parents 4cfc64e + 39af687 commit 815d90e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions CMakeListsMachine.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,11 @@ INCLUDE(GNUInstallDirs)
IF ("${CMAKE_HOSTNAME}" MATCHES "login")
MARK_AS_ADVANCED(FORCE C_PATH CXX_PATH Fortran_PATH)

# HAWK and SuperMUC name their login nodes identically, so use OS distribution to identify
FIND_PROGRAM(LSB_RELEASE_EXEC lsb_release)
EXECUTE_PROCESS(COMMAND ${LSB_RELEASE_EXEC} -is OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT OUTPUT_STRIP_TRAILING_WHITESPACE)
MARK_AS_ADVANCED(FORCE LSB_RELEASE_EXEC)
# HAWK and SuperMUC name their login nodes identically, so use the Fully Qualified Domain Name (FQDN) to identify
CMAKE_HOST_SYSTEM_INFORMATION(RESULT FQDN QUERY FQDN)
MARK_AS_ADVANCED(FORCE FQDN)
# HLRS HAWK
IF (LSB_RELEASE_ID_SHORT MATCHES "Rocky")
IF (FQDN MATCHES "hawk.hww.hlrs.de")
MESSAGE(STATUS "Compiling on Hawk")
# Overwrite compiler target architecture
IF (CMAKE_Fortran_COMPILER_ID MATCHES "GNU" OR CMAKE_Fortran_COMPILER_ID MATCHES "Flang")
Expand All @@ -106,7 +105,7 @@ IF ("${CMAKE_HOSTNAME}" MATCHES "login")
# Use AMD Optimized Lapack/BLAS
# SET(BLA_VENDOR "FLAME")
# SuperMUC
ELSEIF (LSB_RELEASE_ID_SHORT MATCHES "SUSE")
ELSEIF (FQDN MATCHES "sng.lrz.de")
MESSAGE(STATUS "Compiling on SuperMUC")
# Overwrite compiler target architecture
IF (CMAKE_Fortran_COMPILER_ID MATCHES "GNU" OR CMAKE_Fortran_COMPILER_ID MATCHES "Flang")
Expand Down

0 comments on commit 815d90e

Please sign in to comment.