diff --git a/Dockerfile b/Dockerfile index ff24e3659..f1532b7c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -122,7 +122,7 @@ RUN apt-get -y update && apt-get upgrade -y RUN apt-get install -y intel-oneapi-runtime-openmp intel-oneapi-runtime-mkl intel-oneapi-runtime-mpi intel-oneapi-runtime-fortran ENV NETCDF_HOME="/usr/local" ENV LANG=C.UTF-8 -ENV LD_LIBRARY_PATH=/opt/intel/oneapi/lib +ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/intel/oneapi/lib" RUN apt-get -y update && apt-get upgrade -y RUN apt-get install -y libhdf5-dev libxml2-dev diff --git a/cmake/Modules/SetFortranFlags.cmake b/cmake/Modules/SetFortranFlags.cmake index ecf9c34e1..5f0c94bf5 100644 --- a/cmake/Modules/SetFortranFlags.cmake +++ b/cmake/Modules/SetFortranFlags.cmake @@ -112,9 +112,9 @@ SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}" # There is some bug where -march=native doesn't work on Mac IF(APPLE) - SET(GNUNATIVE "-mtune=native") + SET(GNUNATIVE "-mtune=CORE-AVX2 -xCORE-AVX2") ELSE() - SET(GNUNATIVE "-march=native") + SET(GNUNATIVE "-march=CORE-AVX2 -axCORE-AVX2") ENDIF() ################### @@ -350,13 +350,6 @@ IF (USE_SIMD) ) ENDIF (NOT USE_OPENMP) - # Optimize for the host's architecture - SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}" - Fortran "-xhost" # Intel - "/QxHost" # Intel Windows - ${GNUNATIVE} # GNU - ) - # Generate an extended set of vector functions SET_COMPILE_FLAG(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}" Fortran "-vecabi=cmdtarget" # Intel