Merge branch 'new-intel' into 'development'
support for LLVM-based Intel compilers See merge request damask/DAMASK!489
This commit is contained in:
commit
01cd92755d
|
@ -36,14 +36,17 @@ variables:
|
|||
# Names of module files to load
|
||||
# ===============================================================================================
|
||||
# ++++++++++++ Compiler +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
COMPILER_INTEL: "Compiler/Intel/19.1.2 Libraries/IMKL/2020"
|
||||
COMPILER_GNU: "Compiler/GNU/10"
|
||||
COMPILER_INTELLLVM: "Compiler/oneAPI/2022.0.1 Libraries/IMKL/2022.0.1"
|
||||
COMPILER_INTEL: "Compiler/Intel/2022.0.1 Libraries/IMKL/2022.0.1"
|
||||
# ++++++++++++ MPI ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
MPI_INTEL: "MPI/Intel/19.1.2/IntelMPI/2019"
|
||||
MPI_GNU: "MPI/GNU/10/OpenMPI/4.1.1"
|
||||
MPI_INTELLLVM: "MPI/oneAPI/2022.0.1/IntelMPI/2021.5.0"
|
||||
MPI_INTEL: "MPI/Intel/2022.0.1/IntelMPI/2021.5.0"
|
||||
# ++++++++++++ PETSc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
PETSC_INTEL: "Libraries/PETSc/3.16.1/Intel-19.1.2-IntelMPI-2019"
|
||||
PETSC_GNU: "Libraries/PETSc/3.16.1/GNU-10-OpenMPI-4.1.1"
|
||||
PETSC_INTELLLVM: "Libraries/PETSc/3.16.2/oneAPI-2022.0.1-IntelMPI-2021.5.0"
|
||||
PETSC_INTEL: "Libraries/PETSc/3.16.2/Intel-2022.0.1-IntelMPI-2021.5.0"
|
||||
# ++++++++++++ MSC Marc +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
MSC: "FEM/MSC/2021.3.1"
|
||||
IntelMarc: "Compiler/Intel/19.1.2 Libraries/IMKL/2020"
|
||||
|
@ -76,20 +79,6 @@ mypy:
|
|||
|
||||
|
||||
###################################################################################################
|
||||
test_grid_Intel:
|
||||
stage: compile
|
||||
script:
|
||||
- module load ${COMPILER_INTEL} ${MPI_INTEL} ${PETSC_INTEL}
|
||||
- cd PRIVATE/testing/pytest
|
||||
- pytest -k 'compile and grid' --basetemp ${TESTROOT}/compile_grid_Intel
|
||||
|
||||
test_mesh_Intel:
|
||||
stage: compile
|
||||
script:
|
||||
- module load ${COMPILER_INTEL} ${MPI_INTEL} ${PETSC_INTEL}
|
||||
- cd PRIVATE/testing/pytest
|
||||
- pytest -k 'compile and mesh' --basetemp ${TESTROOT}/compile_mesh_Intel
|
||||
|
||||
test_grid_GNU:
|
||||
stage: compile
|
||||
script:
|
||||
|
@ -104,6 +93,27 @@ test_mesh_GNU:
|
|||
- cd PRIVATE/testing/pytest
|
||||
- pytest -k 'compile and mesh' --basetemp ${TESTROOT}/compile_mesh_GNU
|
||||
|
||||
test_mesh_IntelLLVM:
|
||||
stage: compile
|
||||
script:
|
||||
- module load ${COMPILER_INTELLLVM} ${MPI_INTELLLVM} ${PETSC_INTELLLVM}
|
||||
- cd PRIVATE/testing/pytest
|
||||
- pytest -k 'compile and mesh' --basetemp ${TESTROOT}/compile_mesh_IntelLLVM
|
||||
|
||||
test_grid_Intel:
|
||||
stage: compile
|
||||
script:
|
||||
- module load ${COMPILER_INTEL} ${MPI_INTEL} ${PETSC_INTEL}
|
||||
- cd PRIVATE/testing/pytest
|
||||
- pytest -k 'compile and grid' --basetemp ${TESTROOT}/compile_grid_Intel
|
||||
|
||||
test_mesh_Intel:
|
||||
stage: compile
|
||||
script:
|
||||
- module load ${COMPILER_INTEL} ${MPI_INTEL} ${PETSC_INTEL}
|
||||
- cd PRIVATE/testing/pytest
|
||||
- pytest -k 'compile and mesh' --basetemp ${TESTROOT}/compile_mesh_Intel
|
||||
|
||||
test_Marc:
|
||||
stage: compile
|
||||
script:
|
||||
|
|
|
@ -82,6 +82,8 @@ if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
|
|||
include(Compiler-Intel)
|
||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
|
||||
include(Compiler-GNU)
|
||||
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "IntelLLVM")
|
||||
include(Compiler-IntelLLVM)
|
||||
else()
|
||||
message(FATAL_ERROR "Compiler type(CMAKE_Fortran_COMPILER_ID) not recognized")
|
||||
endif()
|
||||
|
|
|
@ -106,8 +106,9 @@ set (DEBUG_FLAGS "${DEBUG_FLAGS} -fpe-all=0")
|
|||
#set (DEBUG_FLAGS "${DEBUG_FLAGS},stderrors")
|
||||
# ... warnings about Fortran standard violations are changed to errors
|
||||
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -debug-parameters all")
|
||||
#set (DEBUG_FLAGS "${DEBUG_FLAGS} -debug-parameters all")
|
||||
# generate debug information for parameters
|
||||
# Disabled due to ICE when compiling phase_damage.f90 (not understandable, there is no parameter in there)
|
||||
|
||||
# Additional options
|
||||
# -heap-arrays: Should not be done for OpenMP, but set "ulimit -s unlimited" on shell. Probably it helps also to unlimit other limits
|
||||
|
|
|
@ -0,0 +1,121 @@
|
|||
###################################################################################################
|
||||
# Intel Compiler
|
||||
###################################################################################################
|
||||
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 18.0)
|
||||
message (FATAL_ERROR "Intel Compiler version: ${CMAKE_Fortran_COMPILER_VERSION} not supported")
|
||||
endif ()
|
||||
|
||||
if (OPENMP)
|
||||
set (OPENMP_FLAGS "-qopenmp")
|
||||
endif ()
|
||||
|
||||
if (OPTIMIZATION STREQUAL "OFF")
|
||||
set (OPTIMIZATION_FLAGS "-O0")
|
||||
elseif (OPTIMIZATION STREQUAL "DEFENSIVE")
|
||||
set (OPTIMIZATION_FLAGS "-O2")
|
||||
elseif (OPTIMIZATION STREQUAL "AGGRESSIVE")
|
||||
set (OPTIMIZATION_FLAGS "-ipo -O3 -fp-model fast=2 -xHost")
|
||||
# -fast = -ipo, -O3, -no-prec-div, -static, -fp-model fast=2, and -xHost"
|
||||
endif ()
|
||||
|
||||
# -assume std_mod_proc_name (included in -standard-semantics) causes problems if other modules
|
||||
# (PETSc, HDF5) are not compiled with this option (https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/62172)
|
||||
set (STANDARD_CHECK "-stand f18 -assume nostd_mod_proc_name")
|
||||
set (LINKER_FLAGS "${LINKER_FLAGS} -shared-intel")
|
||||
# Link against shared Intel libraries instead of static ones
|
||||
|
||||
#------------------------------------------------------------------------------------------------
|
||||
# Fine tuning compilation options
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -fpp")
|
||||
# preprocessor
|
||||
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -ftz")
|
||||
# flush underflow to zero, automatically set if -O[1,2,3]
|
||||
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -diag-disable")
|
||||
# disables warnings ...
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} 5268")
|
||||
# ... the text exceeds right hand column allowed on the line (we have only comments there)
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},7624")
|
||||
# ... about deprecated forall (has nice syntax and most likely a performance advantage)
|
||||
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} -warn")
|
||||
# enables warnings ...
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS} declarations")
|
||||
# ... any undeclared names (alternative name: -implicitnone)
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},general")
|
||||
# ... warning messages and informational messages are issued by the compiler
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},usage")
|
||||
# ... questionable programming practices
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},interfaces")
|
||||
# ... checks the interfaces of all SUBROUTINEs called and FUNCTIONs invoked in your compilation against an external set of interface blocks
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},ignore_loc")
|
||||
# ... %LOC is stripped from an actual argument
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},alignments")
|
||||
# ... data that is not naturally aligned
|
||||
set (COMPILE_FLAGS "${COMPILE_FLAGS},unused")
|
||||
# ... declared variables that are never used
|
||||
|
||||
# Additional options
|
||||
# -warn: enables warnings, where
|
||||
# truncated_source: Determines whether warnings occur when source exceeds the maximum column width in fixed-format files.
|
||||
# (too many warnings because we have comments beyond character 132)
|
||||
# uncalled: Determines whether warnings occur when a statement function is never called
|
||||
# all:
|
||||
# -name as_is: case sensitive Fortran!
|
||||
|
||||
#------------------------------------------------------------------------------------------------
|
||||
# Runtime debugging
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -g")
|
||||
# Generate symbolic debugging information in the object file
|
||||
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -traceback")
|
||||
# Generate extra information in the object file to provide source file traceback information when a severe error occurs at run time
|
||||
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -gen-interfaces")
|
||||
# Generate an interface block for each routine. http://software.intel.com/en-us/blogs/2012/01/05/doctor-fortran-gets-explicit-again/
|
||||
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fp-stack-check")
|
||||
# Generate extra code after every function call to ensure that the floating-point (FP) stack is in the expected state
|
||||
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fp-model strict")
|
||||
# Trap uninitalized variables
|
||||
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -check" )
|
||||
# Checks at runtime ...
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} bounds")
|
||||
# ... if an array index is too small (<1) or too large!
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS},format")
|
||||
# ... for the data type of an item being formatted for output.
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS},output_conversion")
|
||||
# ... for the fit of data items within a designated format descriptor field.
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS},pointers")
|
||||
# ... for certain disassociated or uninitialized pointers or unallocated allocatable objects.
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS},uninit")
|
||||
# ... for uninitialized variables.
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -ftrapuv")
|
||||
# ... initializes stack local variables to an unusual value to aid error detection
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -fpe-all=0")
|
||||
# ... capture all floating-point exceptions, sets -ftz automatically
|
||||
|
||||
# disable due to compiler bug https://community.intel.com/t5/Intel-Fortran-Compiler/false-positive-stand-f18-and-IEEE-SELECTED-REAL-KIND/m-p/1227336
|
||||
#set (DEBUG_FLAGS "${DEBUG_FLAGS} -warn")
|
||||
# enables warnings ...
|
||||
#set (DEBUG_FLAGS "${DEBUG_FLAGS} errors")
|
||||
# ... warnings are changed to errors
|
||||
#set (DEBUG_FLAGS "${DEBUG_FLAGS},stderrors")
|
||||
# ... warnings about Fortran standard violations are changed to errors
|
||||
|
||||
set (DEBUG_FLAGS "${DEBUG_FLAGS} -debug-parameters all")
|
||||
# generate debug information for parameters
|
||||
|
||||
# Additional options
|
||||
# -heap-arrays: Should not be done for OpenMP, but set "ulimit -s unlimited" on shell. Probably it helps also to unlimit other limits
|
||||
# -check: Checks at runtime, where
|
||||
# arg_temp_created: will cause a lot of warnings because we create a bunch of temporary arrays (performance?)
|
||||
# stack:
|
||||
|
||||
#------------------------------------------------------------------------------------------------
|
||||
# precision settings
|
||||
set (PRECISION_FLAGS "${PRECISION_FLAGS} -real-size 64")
|
||||
# set precision for standard real to 32 | 64 | 128 (= 4 | 8 | 16 bytes, type pReal is always 8 bytes)
|
Loading…
Reference in New Issue