Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to allow GEOS to build without MKL #8

Merged
merged 6 commits into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion NCEP_gfsio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@ esma_set_this ()

esma_add_library (${this}
SRCS gfsio_module.f90 gfsio_solve_axb.F90
DEPENDENCIES GMAO_mpeu NCEP_bacio_r4i4 NCEP_w3_r4i4 ${MKL_LIBRARIES}
DEPENDENCIES GMAO_mpeu NCEP_bacio_r4i4 NCEP_w3_r4i4
)

if (APPLE)
set(MKL_Fortran TRUE)
endif ()
find_package(MKL)
if (MKL_FOUND)
set(BLA_VENDOR Intel10_64lp_seq)
target_link_libraries(${this} PRIVATE ${MKL_LIBRARIES})
else ()
find_package(LAPACK REQUIRED)
target_link_libraries(${this} PRIVATE ${LAPACK_LIBRARIES})
endif ()

set (CMAKE_Fortran_FLAGS_RELEASE "-O3 ${BIG_ENDIAN} ${common_Fortran_flags} ${GEOS_Fortran_Release_FPE_Flags} ${ALIGNCOM}")
12 changes: 11 additions & 1 deletion NCEP_sp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,17 @@ set (CMAKE_Fortran_FLAGS_RELEASE "-O2 ${GEOS_Fortran_Release_FPE_Flags} ${EXTEND

esma_add_library (${this} SRCS ${srcs} DEPENDENCIES NCEP_w3_${precision})

target_link_libraries(${this} PUBLIC ${MKL_LIBRARIES})
if (APPLE)
set(MKL_Fortran TRUE)
endif ()
find_package(MKL)
if (MKL_FOUND)
set(BLA_VENDOR Intel10_64lp_seq)
target_link_libraries(${this} PRIVATE ${MKL_LIBRARIES})
else ()
find_package(LAPACK REQUIRED)
target_link_libraries(${this} PRIVATE ${LAPACK_LIBRARIES})
endif ()

if (precision MATCHES "r4i4")
# use default real/int precisions
Expand Down