Skip to content

Commit

Permalink
Fixed some overlooked parts in linking the roctx module and openmp.
Browse files Browse the repository at this point in the history
  • Loading branch information
JuhaTonttila committed Sep 26, 2024
1 parent 817feb8 commit b35a5db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ endif()
if(ENABLE_MULTIO)
list(APPEND sources_Fortran ${src_home}/ifs_interface/iom.F90)
endif()
if(${ENABLE_ROCTX})
list(APPEND sources_Fortran ${src_home}/roctx_interface/mo_roctx.F90)
endif()

file(GLOB sources_C ${src_home}/*.c)

Expand Down Expand Up @@ -288,10 +291,12 @@ 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})
target_link_libraries(${PROJECT_NAME}.x PUBLIC ${PROJECT_NAME} -homp)
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()
else()
target_link_libraries(${PROJECT_NAME}.x PUBLIC ${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME}.x PUBLIC ${PROJECT_NAME})
endif()


Expand Down
File renamed without changes.

0 comments on commit b35a5db

Please sign in to comment.