diff --git a/GNU.cmake b/GNU.cmake index 148780d9..98504fd3 100644 --- a/GNU.cmake +++ b/GNU.cmake @@ -125,7 +125,12 @@ set (GEOS_Fortran_Debug_FPE_Flags "${common_Fortran_fpe_flags}") # GEOS Release # ------------ -set (GEOS_Fortran_Release_Flags "${FOPT3} -march=westmere -mtune=generic -funroll-loops ${DEBINFO}") +if ( ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL aarch64 ) + set(GNU_TARGET_ARCH "armv8.2-a+crypto+crc+fp16+rcpc+dotprod") +else () + set(GNU_TARGET_ARCH "westmere") +endif () +set (GEOS_Fortran_Release_Flags "${FOPT3} -march=${GNU_TARGET_ARCH} -mtune=generic -funroll-loops ${DEBINFO}") set (GEOS_Fortran_Release_FPE_Flags "${common_Fortran_fpe_flags}") # GEOS Vectorize @@ -135,11 +140,11 @@ set (GEOS_Fortran_Release_FPE_Flags "${common_Fortran_fpe_flags}") # Options per Jerry DeLisle on GCC Fortran List #set (GEOS_Fortran_Vect_Flags "${FOPT2} -march=native -ffast-math -ftree-vectorize -funroll-loops --param max-unroll-times=4 -mprefer-avx128 -mno-fma") -#set (GEOS_Fortran_Vect_FPE_Flags "${DEBINFO} ${TRACEBACK}") +#set (GEOS_Fortran_Vect_FPE_Flags "${DEBINFO} ${TRACEBACK} ${MISMATCH} ${ALLOW_BOZ}") # Options per Jerry DeLisle on GCC Fortran List with SVML (does not seem to help) #set (GEOS_Fortran_Vect_Flags "-O2 -march=native -ffast-math -ftree-vectorize -funroll-loops --param max-unroll-times=4 -mprefer-avx128 -mno-fma -mveclibabi=svml") -#set (GEOS_Fortran_Vect_FPE_Flags "${DEBINFO} ${TRACEBACK}") +#set (GEOS_Fortran_Vect_FPE_Flags "${DEBINFO} ${TRACEBACK} ${MISMATCH} ${ALLOW_BOZ}") # Until good options can be found, make vectorize equal common flags set (GEOS_Fortran_Vect_Flags ${GEOS_Fortran_Release_Flags}) diff --git a/esma.cmake b/esma.cmake index c8845517..44024203 100644 --- a/esma.cmake +++ b/esma.cmake @@ -92,18 +92,37 @@ set(MPI_DETERMINE_LIBRARY_VERSION TRUE) find_package (MPI REQUIRED) if (APPLE) - if (DEFINED ENV{MKLROOT}) set (MKL_Fortran True) - find_package (MKL REQUIRED) - else () - if ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU") - #USE FRAMEWORK - message(STATUS "Found macOS and gfortran, using framework Accelerate") - link_libraries("-framework Accelerate") - endif () - endif () -else () - find_package (MKL REQUIRED) +endif () +find_package(MKL) +if (MKL_FOUND) + ecbuild_info("Found MKL:") + ecbuild_info(" MKL_INCLUDE_DIRS: ${MKL_INCLUDE_DIRS}") + ecbuild_info(" MKL_LIBRARIES: ${MKL_LIBRARIES}") + + set(BLA_VENDOR Intel10_64lp_seq) +endif () + +find_package(LAPACK) +if (LAPACK_FOUND) + ecbuild_info("Found LAPACK:") + ecbuild_info(" LAPACK_LINKER_FLAGS: ${LAPACK_LINKER_FLAGS}") + ecbuild_info(" LAPACK_LIBRARIES: ${LAPACK_LIBRARIES}") + if (LAPACK95_FOUND) + ecbuild_info("Found LAPACK95:") + ecbuild_info(" LAPACK95_LIBRARIES: ${LAPACK95_LIBRARIES}") + endif () +endif () + +find_package(BLAS) +if (BLAS_FOUND) + ecbuild_info("Found BLAS:") + ecbuild_info(" BLAS_LINKER_FLAGS: ${BLAS_LINKER_FLAGS}") + ecbuild_info(" BLAS_LIBRARIES: ${BLAS_LIBRARIES}") + if (BLAS95_FOUND) + ecbuild_info("Found BLAS95:") + ecbuild_info(" BLAS95_LIBRARIES: ${BLAS95_LIBRARIES}") + endif () endif () option (ESMA_ALLOW_DEPRECATED "suppress warnings about deprecated features" ON)