Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Removed compiler flag that was causing test particle orbits to go hay…
Browse files Browse the repository at this point in the history
…wire (-assume contiguous_assumed_shape) and moved more subroutines to the strict math category.
  • Loading branch information
daminton committed May 17, 2023
1 parent 45c298e commit 4ed6bf4
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 25 deletions.
25 changes: 10 additions & 15 deletions cmake/Modules/SetFortranFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG}"

# Strict model for floating-point calculations (precise and except)
SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG}"
Fortran "-fp-model strict" # Intel
Fortran "-fp-model=strict" # Intel
)

# Enables floating-point invalid, divide-by-zero, and overflow exceptions
Expand Down Expand Up @@ -273,11 +273,6 @@ SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE}"
Fortran "-align all" # Intel
)

# Assume all objects are contiguous in memory
SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE}"
Fortran "-assume contiguous_assumed_shape" # Intel
)

# Generate an extended set of vector functions
SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE}"
Fortran "-vecabi=cmdtarget" # Intel
Expand All @@ -289,17 +284,17 @@ SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE}"
)

# Generate fused multiply-add instructions
SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE}"
Fortran "-fma" # Intel
)
SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE}"
Fortran "-fma" # Intel
)

# Generate fused multiply-add instructions
SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE}"
Fortran "-qmkl=cluster" # Intel
Fortran "-qmkl" # Intel
Fortran "-mkl" # Old Intel
)

SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE}"
Fortran "-qmkl=cluster" # Intel
Fortran "-qmkl" # Intel
Fortran "-mkl" # Old Intel
)
#####################
### MATH FLAGS ###
#####################
Expand Down
Loading

0 comments on commit 4ed6bf4

Please sign in to comment.