diff --git a/CMakeLists.txt b/CMakeLists.txt index 66dbe5bac1..37e5d57acb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -388,10 +388,10 @@ if(CP2K_USE_MPI) if(NOT MPI_Fortran_HAVE_F90_MODULE) message( FATAL_ERROR - "\ -The listed MPI implementation does not provide the required mpi.mod interface. \ -When using the GNU compiler in combination with Intel MPI, please use the \ -Intel MPI compiler wrappers. Check the INSTALL.md for more information.") + "The listed MPI implementation does not provide the required mpi.mod interface." + " When using the GNU compiler in combination with Intel MPI, please use the" + " Intel MPI compiler wrappers. Check the INSTALL.md for more information." + ) endif() if("${MPI_Fortran_LIBRARY_VERSION_STRING}" MATCHES "Open MPI v2.1" OR "${MPI_Fortran_LIBRARY_VERSION_STRING}" MATCHES "Open MPI v3.1") diff --git a/cmake/CompilerConfiguration.cmake b/cmake/CompilerConfiguration.cmake index f00dcad34c..21480fc158 100644 --- a/cmake/CompilerConfiguration.cmake +++ b/cmake/CompilerConfiguration.cmake @@ -5,8 +5,8 @@ #! SPDX-License-Identifier: GPL-2.0-or-later ! #!-------------------------------------------------------------------------------------------------! -set(CP2K_C_COMPILER_LIST "GNU;Intel;NAG;Cray;PGI;Clang;AppleClang") -set(CP2K_Fortran_COMPILER_LIST "GNU;Intel;NAG;Cray;PGI") +set(CP2K_C_COMPILER_LIST "GNU;Intel;IntelLLVM;NAG;Cray;PGI;Clang;AppleClang") +set(CP2K_Fortran_COMPILER_LIST "GNU;Intel;IntelLLVM;NAG;Cray;PGI") if(NOT CMAKE_C_COMPILER_ID IN_LIST CP2K_C_COMPILER_LIST) message( @@ -36,9 +36,10 @@ endif() # (similar to -h system_alloc) add_compile_options( "$<$:-march=native;-mtune=native>" - "$<$:-march=native;-mtune=native;-fbacktrace;-ffree-line-length-none;-ffree-form;-std=f2008;-fimplicit-none;-Werror=aliasing;-Werror=ampersand;-Werror=c-binding-type;-Werror=conversion;-Werror=intrinsic-shadow;-Werror=intrinsics-std;-Werror=line-truncation;-Werror=tabs;-Werror=target-lifetime;-Werror=underflow;-Werror=unused-but-set-variable;-Werror=unused-variable>" + "$<$:-march=native;-mtune=native;-fbacktrace;-ffree-line-length-none;-ffree-form;-std=f2008;-fimplicit-none;-Werror=aliasing;-Werror=ampersand;-Werror=c-binding-type;-Werror=conversion;-Werror=intrinsic-shadow;-Werror=intrinsics-std;-Werror=line-truncation;-Werror=tabs;-Werror=target-lifetime;-Werror=underflow;-Werror=unused-but-set-variable;-Werror=unused-variable;-D__MAX_CONTR=4>" "$<$,$>:-fallow-argument-mismatch>" - "$<$:-free;-stand=f18;-fpp;-heap-arrays>" + "$<$:-free;-stand f18;-fpp;-heap-arrays;-D__MAX_CONTR=4>" + "$<$:-free;-fpp;-D__MAX_CONTR=4>" "$<$:-Mfreeform;-Mextend;-Mallocatable=03>" "$<$:-f2008;-free;-Warn=reallocation;-Warn=subnormal>" "$<$:-hnoacc;-h;nomessage=1234>" @@ -46,14 +47,16 @@ add_compile_options( ) add_compile_options( - "$<$,$>:-g;-funroll-loops>" + "$<$,$>:-g;-funroll-loops;-D__HAS_IEEE_EXCEPTIONS>" "$<$,$>:-fast>" - "$<$,$>:-O3;-g>" + "$<$,$>:-O3;-g;-D__HAS_IEEE_EXCEPTIONS>" + "$<$,$>:-O3;-g;-D__HAS_IEEE_EXCEPTIONS>" "$<$,$>:-O2;-G2>" "$<$,$>:-gline>" "$<$,$>:-g;-funroll-loops;-Wall>" "$<$,$>:-fast>" "$<$,$>:-O3;-g>" + "$<$,$>:-O3;-g>" "$<$,$>:-O3>" "$<$,$>:-gline>" "$<$,$>:-O3;-funroll-loops>" @@ -65,10 +68,12 @@ add_compile_options( "$<$,$>:-fbacktrace;-ffree-form;-fimplicit-none;-std=f2008;-fsanitize=leak;-fcheck=all,no-array-temps;-ffpe-trap=invalid,zero,overflow;-finit-derived;-finit-real=snan;-finit-integer=-42;-Werror=realloc-lhs;-finline-matmul-limit=0>" "$<$,$>:-g>" "$<$,$>:-O2;-debug>" + "$<$,$>:-O2;-debug>" "$<$,$>:-G2>" "$<$,$>:-O2;-ggdb;-Wall;-fsanitize=undefined;-fsanitize=address;-fsanitize-recover=all;-Wall;-Wextra;-Werror;-Wno-vla-parameter;-Wno-deprecated-declarations>" "$<$,$>:-fast>" "$<$,$>:-O3;-g>" + "$<$,$>:-O3;-g>" "$<$,$>:-G2>" "$<$,$>:-g;-C>" "$<$,$>:-O1;-g;-fno-omit-frame-pointer>"