Skip to content
Snippets Groups Projects
Commit 0802cee5 authored by Debolskiy Andrey's avatar Debolskiy Andrey :bicyclist_tone5:
Browse files

updated and tested on osx

parent fae950c1
Branches
No related tags found
No related merge requests found
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
......@@ -16,7 +16,7 @@ endif()
endif()
if()
if ( ${compiler_lc} STREQUAL "intel")
if ( compiler_lc 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
......@@ -29,7 +29,7 @@ endif()
set(comp_flags " -O3 -restrict -alias-const -parallel -funroll-loops -no-ansi-alias -march=core-avx2 -xcore-avx2 ")
endif()
if ( ${compiler_lc} STREQUAL "intel_oneapi")
if ( compiler_lc 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
......@@ -42,7 +42,7 @@ endif()
set(comp_flags " -O3 -no-ansi-alias -funroll-loops -Wno-tautological-constant-compare ")
endif()
if ( ${compiler_lc} STREQUAL "gnu")
if ( compiler_lc 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
......
......@@ -5,23 +5,44 @@ set(CUSTOM_NETCDF false)
endif()
# adding compiler options for Intel
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
target_compile_options(nse-bomex-les
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-O3 -restrict -alias-const -no-ansi-alias -parallel -funroll-loops>
)
if ( compiler_lc 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 mpiicpc 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 -march=core-avx2 -xcore-avx2 ")
endif()
# adding compiler options for Intel oneAPI
# --- req.: export I_MPI_CXX=icpx
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM")
target_compile_options(nse-bomex-les
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-O3 -no-ansi-alias -funroll-loops -Wno-tautological-constant-compare>
)
if ( compiler_lc 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 -cc=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 ")
endif()
# adding compiler options for GNU
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(nse-bomex-les
PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-O3 -fno-strict-aliasing -funroll-loops -no-pie >
)
if ( compiler_lc 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 -mavx2 -no-pie")
endif()
#specify stuff for run-script
set(cluster_queue "normal")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment