Closed harshula closed 1 year ago
We need a policy regarding what level of compiler optimisation is acceptable. -O3 might be too aggressive.
libaccessom2/CMakeLists.txt:
# compiler flags for gfortran if(CMAKE_Fortran_COMPILER_ID MATCHES GNU) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -std=f2008 -Wall -fdefault-real-8 -ffpe-trap=invalid,zero,overflow") set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -pg -fbounds-check -fbacktrace") set(CMAKE_Fortran_FLAGS_RELEASE "-O3") endif() # compiler flags for ifort if(CMAKE_Fortran_COMPILER_ID MATCHES Intel) set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -fpe0 -fp-model precise -fp-model source -align all -traceback") set(CMAKE_Fortran_FLAGS_DEBUG "-g3 -O0 -check all") set(CMAKE_Fortran_FLAGS_RELEASE "-g3 -O2 -axCORE-AVX2 -debug all -check none -qopt-report=5 -qopt-report-annotate") endif()
Duplicate of https://github.com/ACCESS-NRI/ACCESS-OM/issues/12
We need a policy regarding what level of compiler optimisation is acceptable. -O3 might be too aggressive.
libaccessom2/CMakeLists.txt: