|
4 | 4 |
|
5 | 5 | # This is the configuration for a generic macOS installation using clang and
|
6 | 6 | # gfortran
|
7 |
| -# - this was tested on clean installation of version 12.5 of macOS on an |
| 7 | +# - this was tested on a clean installation of version 12.5 of macOS on an |
8 | 8 | # Intel-based MacBook Pro on July 24, 2022
|
9 | 9 | # - historically there were challenges associated with installing Charm++ and
|
10 | 10 | # Cello/Enzo-E on Macs, but these issues seem to have been implicitly
|
@@ -36,15 +36,18 @@ if(NOT __processedUserDefaults)
|
36 | 36 | set(CMAKE_Fortran_COMPILER gfortran CACHE STRING "")
|
37 | 37 | set(CMAKE_Fortran_FLAGS "-ffixed-line-length-132" CACHE STRING "Default Fortran flags")
|
38 | 38 |
|
39 |
| - # Set some architecture-specific optimization flags |
40 |
| - set(__ARCH_C_OPT_FLAGS "-O3 -DNDEBUG -funroll-loops") |
| 39 | + # these flag(s) are currently only used when using openmp-simd optimizations |
| 40 | + # (to specify available/prefered instruction sets). |
| 41 | + # This particular value tells the compiler to optimize the code for the |
| 42 | + # instruction set of the machine used to compile the code. |
| 43 | + set(CONFIG_ARCH_FLAGS "-march=native") |
41 | 44 |
|
42 |
| - set(CMAKE_C_FLAGS_RELEASE "${__ARCH_C_OPT_FLAGS}") |
43 |
| - set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g ${__ARCH_C_OPT_FLAGS}") |
44 |
| - set(CMAKE_CXX_FLAGS_RELEASE "${__ARCH_C_OPT_FLAGS}") |
45 |
| - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g ${__ARCH_C_OPT_FLAGS}") |
| 45 | + # add flag to unroll loops (this flag would also be enabled anyways when |
| 46 | + # OPTIMIZE_FP=TRUE) |
| 47 | + set(CMAKE_C_FLAGS "-funroll-loops" CACHE STRING "Default C flags") |
| 48 | + set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "Default C++ flags") |
46 | 49 |
|
47 |
| - # Setting package paths (e.g., Grackle) |
| 50 | + # Setting package paths (e.g., Grackle) - (meant for personal machine files) |
48 | 51 |
|
49 | 52 | # Mark done
|
50 | 53 | set(__processedUserDefaults ON)
|
|
0 commit comments