Skip to content

Commit

Permalink
Work on OpenMP compile issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Juha Tonttila committed Sep 27, 2024
1 parent b35a5db commit 20c867e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,9 @@ add_executable(${PROJECT_NAME}.x ${src_home}/fesom_main.F90)
if(${ENABLE_ROCTX})
target_link_libraries(${PROJECT_NAME}.x PUBLIC roctx64 roctracer64)
endif()
if(${ENABLE_OPENMP}) # Needed to add to compile on LUMI
if(${CMAKE_Fortran_COMPILER_ID} STREQUAL Cray)
target_link_libraries(${PROJECT_NAME}.x PUBLIC ${PROJECT_NAME} -homp)
endif()
if(${ENABLE_OPENMP} AND ${CMAKE_Fortran_COMPILER_ID} STREQUAL Cray)
## Apparently explicit -homp is required for OpenMP also at this stage with Cray compilers for some reason...
target_link_libraries(${PROJECT_NAME}.x PUBLIC ${PROJECT_NAME} -homp)
else()
target_link_libraries(${PROJECT_NAME}.x PUBLIC ${PROJECT_NAME})
endif()
Expand Down

0 comments on commit 20c867e

Please sign in to comment.