From e450272bd0c8c6f75a55d9ddc07e91844b25517e Mon Sep 17 00:00:00 2001
From: Debolskiy Andrey <and.debol@gmail.com>
Date: Fri, 17 Nov 2023 12:40:53 +0300
Subject: [PATCH] added noavx config for inm

---
 cluster_configs/inm-cluster-noavx.cmake | 64 +++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 cluster_configs/inm-cluster-noavx.cmake

diff --git a/cluster_configs/inm-cluster-noavx.cmake b/cluster_configs/inm-cluster-noavx.cmake
new file mode 100644
index 0000000..2ffd0c8
--- /dev/null
+++ b/cluster_configs/inm-cluster-noavx.cmake
@@ -0,0 +1,64 @@
+#get from loaded modules versions of compilers
+
+
+#NETCDF support
+if (USE_NETCDF)
+    set(CUSTOM_NETCDF true)
+    if ( COMPILER STREQUAL "intel" OR COMPILER STREQUAL "intel_oneapi")
+        set(NETCDF_PATH "/opt/ohpc/pub/libs/intel/impi/netcdf/4.9.0/")
+        set(NETCDF_INC  "${NETCDF_PATH}include")
+        set(NETCDF_LIB  "${NETCDF_PATH}lib")
+        set(HDF5_LIB  "/opt/ohpc/pub/libs/intel/impi/hdf5/1.10.8/lib")
+        set(NetCDF_LINK_FLAGS "-L${NETCDF_LIB} -lnetcdf -L${HDF5_LIB} -lhdf5")
+    else ()
+        messege(ERROR "NetCDF is not supported with GNU on INM cluster")
+    endif()
+endif()
+
+
+if ( COMPILER STREQUAL "intel")
+    if (NO_MPI)
+        set(CMAKE_C_COMPILER       icc      CACHE STRING "C compiler"       FORCE) # C compiler for serial build
+        set(CMAKE_CXX_COMPILER     c++      CACHE STRING "CXX compiler"     FORCE) # C++ compiler for serial build
+        set(CMAKE_Fortran_COMPILER ifort    CACHE STRING "Fortran compiler" FORCE) # Fortran compiler for serial build
+    else()
+        set(CMAKE_C_COMPILER       mpiicc  CACHE STRING "C compiler"       FORCE) # C compiler for parallel build
+        set(CMAKE_CXX_COMPILER     mpiicpc CACHE STRING "CXX compiler"     FORCE) # C++ compiler for parallel build
+        set(CMAKE_Fortran_COMPILER mpiifort CACHE STRING "Fortran compiler" FORCE) # Fortran compiler for parallel build
+    endif()
+    set(comp_flags -O3 -restrict -alias-const -parallel -funroll-loops -no-ansi-alias  CACHE STRING "comp_flags to add" FORCE)
+endif()
+
+if ( COMPILER STREQUAL "intel_oneapi")
+    if (NO_MPI)
+        set(CMAKE_C_COMPILER       icx      CACHE STRING "C compiler"       FORCE) # C compiler for serial build
+        set(CMAKE_CXX_COMPILER     icpx      CACHE STRING "CXX compiler"     FORCE) # C++ compiler for serial build
+        set(CMAKE_Fortran_COMPILER ifort    CACHE STRING "Fortran compiler" FORCE) # Fortran compiler for serial build
+    else()
+        set(CMAKE_C_COMPILER       mpiicc -cc=icx  CACHE STRING "C compiler"       FORCE) # C compiler for parallel build
+        set(CMAKE_CXX_COMPILER     mpiicpc -cxx=icpx CACHE STRING "CXX compiler"     FORCE) # C++ compiler for parallel build
+        set(CMAKE_Fortran_COMPILER mpiifort -fc=ifx CACHE STRING "Fortran compiler" FORCE) # Fortran compiler for parallel build
+    endif()
+    set(comp_flags -O3 -no-ansi-alias -funroll-loops  -Wno-tautological-constant-compare CACHE STRING "comp_flags to add" FORCE)
+endif()
+
+if ( COMPILER STREQUAL "gnu")
+    if (NO_MPI)
+        set(CMAKE_C_COMPILER       gcc      CACHE STRING "C compiler"       FORCE) # C compiler for serial build
+        set(CMAKE_CXX_COMPILER     g++      CACHE STRING "CXX compiler"     FORCE) # C++ compiler for serial build
+        set(CMAKE_Fortran_COMPILER gfortran    CACHE STRING "Fortran compiler" FORCE) # Fortran compiler for serial build
+    else()
+        set(CMAKE_C_COMPILER       mpicc  CACHE STRING "C compiler"       FORCE) # C compiler for parallel build
+        set(CMAKE_CXX_COMPILER     mpicxx CACHE STRING "CXX compiler"     FORCE) # C++ compiler for parallel build
+        set(CMAKE_Fortran_COMPILER mpifort CACHE STRING "Fortran compiler" FORCE) # Fortran compiler for parallel build
+    endif()
+    set(comp_flags -O3 -fno-strict-aliasing -funroll-loops  -std=c++0x CACHE STRING "comp_flags to add" FORCE)
+endif()
+
+#specify stuff for run-script
+set(cluster_queue "normal"  CACHE STRING "queue" FORCE)
+if (NOT NO_MPI)
+    set(run_exec "mpirun" CACHE STRING "exec run" FORCE)
+else ()
+    set(run_exec "srun" CACHE STRING "exec run" FORCE)
+endif ()
\ No newline at end of file
-- 
GitLab