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

Fesom2.5 intel fixes #442

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
34 changes: 20 additions & 14 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ if(ALBEDO_INTELMPI_WORKAROUNDS)
add_compile_options(-DDISABLE_PARALLEL_RESTART_READ)
endif()


#TODO: this machine specific block can easyly go in cmake toolchain.
if(${FESOM_PLATFORM_STRATEGY} STREQUAL levante.dkrz.de )
message(STATUS "multithreading disabled for Levante") # multithreading suddenly produces an error, disable it until a fix is found. issue #413
Expand Down Expand Up @@ -286,28 +287,33 @@ target_include_directories(${PROJECT_NAME} PRIVATE ${NETCDF_Fortran_INCLUDE_DIRE
target_include_directories(${PROJECT_NAME} PRIVATE ${MCT_Fortran_INCLUDE_DIRECTORIES} ${MPEU_Fortran_INCLUDE_DIRECTORIES})
target_include_directories(${PROJECT_NAME} PRIVATE ${SCRIP_Fortran_INCLUDE_DIRECTORIES})
target_include_directories(${PROJECT_NAME} PRIVATE ${YAC_Fortran_INCLUDE_DIRECTORIES} ${YAXT_Fortran_INCLUDE_DIRECTORIES})

target_link_libraries(${PROJECT_NAME} PRIVATE ${PROJECT_NAME}_C)
target_link_libraries(${PROJECT_NAME} PRIVATE ${NETCDF_Fortran_LIBRARIES} ${NETCDF_C_LIBRARIES} ${OASIS_Fortran_LIBRARIES})
target_link_libraries(${PROJECT_NAME} PRIVATE ${MCT_Fortran_LIBRARIES} ${MPEU_Fortran_LIBRARIES} ${SCRIP_Fortran_LIBRARIES})


# OASIS-YAK
target_link_libraries(${PROJECT_NAME} PRIVATE ${YACUTILS_Fortran_LIBRARIES} ${YACCORE_Fortran_LIBRARIES})
target_link_libraries(${PROJECT_NAME} PRIVATE ${YAXT_Fortran_LIBRARIES} ${YAXTC_Fortran_LIBRARIES})

#set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE Fortran)

#target_include_directories(${PROJECT_NAME} PRIVATE ${NETCDF_Fortran_INCLUDE_DIRECTORIES} ${OASIS_Fortran_INCLUDE_DIRECTORIES})
#target_include_directories(${PROJECT_NAME} PRIVATE ${MCT_Fortran_INCLUDE_DIRECTORIES} ${MPEU_Fortran_INCLUDE_DIRECTORIES})
#target_include_directories(${PROJECT_NAME} PRIVATE ${SCRIP_Fortran_INCLUDE_DIRECTORIES})
#target_include_directories(${PROJECT_NAME} PRIVATE ${YAC_Fortran_INCLUDE_DIRECTORIES} ${YAXT_Fortran_INCLUDE_DIRECTORIES})
##target_link_libraries(${PROJECT_NAME} ${PROJECT_NAME}_C ${NETCDF_Fortran_LIBRARIES} ${NETCDF_C_LIBRARIES} ${OASIS_Fortran_LIBRARIES})
#target_link_libraries(${PROJECT_NAME} PRIVATE ${PROJECT_NAME}_C ${MCT_Fortran_LIBRARIES} ${MPEU_Fortran_LIBRARIES} ${SCRIP_Fortran_LIBRARIES} ${OASIS_Fortran_LIBRARIES})

## OASIS-YAK
#target_link_libraries(${PROJECT_NAME} PRIVATE ${PROJECT_NAME}_C ${YACUTILS_Fortran_LIBRARIES} ${YACCORE_Fortran_LIBRARIES})
#target_link_libraries(${PROJECT_NAME} PRIVATE ${PROJECT_NAME}_C ${YAXT_Fortran_LIBRARIES} ${YAXTC_Fortran_LIBRARIES})
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE Fortran)
if(${ENABLE_OPENMP} AND NOT ${CMAKE_Fortran_COMPILER_ID} STREQUAL Cray)
target_compile_options(${PROJECT_NAME} PRIVATE ${OpenMP_Fortran_FLAGS}) # currently we only have OpenMP in the Fortran part
target_link_libraries(${PROJECT_NAME} OpenMP::OpenMP_Fortran)

# there is a problem (at least on levante with ifort) with openmp and I/O multithreading being active at the same time
# in this case the simulation stops and never finishes
# this has been observed with IFS-Fesom and Fesom standalone
# until the problem is identified, we exclude the I/O and multithreading files from openmp compilation, i.e. "-qno-openmp" for ifort
if(NOT ${DISABLE_MULTITHREADING})
if(${CMAKE_Fortran_COMPILER_ID} STREQUAL Intel )
set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/io_restart.F90 PROPERTIES COMPILE_OPTIONS "-qno-openmp")
set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/async_threads_module.F90 PROPERTIES COMPILE_OPTIONS "-qno-openmp")
set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/io_meandata.F90 PROPERTIES COMPILE_OPTIONS "-qno-openmp")
endif()
endif()
endif()

#set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE Fortran)

# fesom.x executable
add_executable(${PROJECT_NAME}.x ${src_home}/fesom_main.F90)
Expand Down
1 change: 1 addition & 0 deletions src/ifs_interface/ifs_notused.F90
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ SUBROUTINE nemogcmcoup_update_add( mype, npes, icomm, &

if(fesom%mype==0) then
WRITE(0,*)'In nemogcmcoup_update_add FESOM dummy routine. Proceeding...'

!CALL abort
endif

Expand Down
1 change: 1 addition & 0 deletions src/oce_ale_pressure_bv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2925,6 +2925,7 @@ subroutine compute_sigma_xy(TF1,SF1, partit, mesh)
END DO
!$OMP END DO
!$OMP END PARALLEL
CALL MPI_BARRIER(MPI_COMM_FESOM,MPIerr)
call exchange_nod(sigma_xy, partit)
!$OMP BARRIER
end subroutine compute_sigma_xy
Expand Down
Loading