Skip to content

Commit

Permalink
Merge branch 'feature/mtg2'
Browse files Browse the repository at this point in the history
  • Loading branch information
dsarmany committed Nov 21, 2024
2 parents 3254f06 + 1927065 commit 099d8f8
Show file tree
Hide file tree
Showing 94 changed files with 18,951 additions and 1,859 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ ecbuild_add_option( FEATURE OUTPUT_MANAGER

ecbuild_add_option( FEATURE OUTPUT_MANAGER_ENCODER_REPORT
CONDITION HAVE_OUTPUT_MANAGER
DEFAULT OFF
DEFAULT OFF
DESCRIPTION "Enable generation of the encoding report" )

ecbuild_add_option( FEATURE OUTPUT_MANAGER_TOOL
Expand All @@ -116,7 +116,6 @@ ecbuild_add_option( FEATURE OUTPUT_MANAGER_TOOL
DESCRIPTION "Enable generation of standalone tool" )

### export package info

set( MULTIO_CONFIG_DIR share/multio/config )
set( MULTIO_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src )
set( MULTIO_LIBRARIES multio )
Expand Down
4 changes: 3 additions & 1 deletion cmake/fortran_compile_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")

elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(autopromote_flags "-fdefault-real-8 -fdefault-double-8")
#set(checkbounds_flags "")
set(checkbounds_flags "-fcheck=bounds")
set(fpe_flags "-ffpe-trap=invalid,zero,overflow")
set(initsnan_flags "-finit-real=snan")
Expand All @@ -29,7 +30,8 @@ elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")

elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
set(autopromote_flags "-real-size 64")
set(checkbounds_flags "-check bounds")
#set(checkbounds_flags "-check bounds")
set(checkbounds_flags "")
set(initsnan_flags "-init=snan")
set(fpe_flags "-fpe0")

Expand Down
105 changes: 97 additions & 8 deletions src/ecom/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ list( APPEND output_manager_src
list( APPEND output_manager_src
common/om_general_utils_c.c
common/om_general_utils_mod.F90
common/om_multio_utils_v2_mod.F90
common/om_multio_utils_v3_mod.F90
common/om_profile_mod.F90
common/datetime_utils_mod.F90
)
Expand Down Expand Up @@ -122,6 +122,7 @@ list( APPEND output_manager_src
list( APPEND output_manager_src
grib_info/encoding_info_mod.F90
grib_info/yaml_rules_mod.F90
grib_info/yaml_time_assumptions_mod.F90
grib_info/grib_codes_mod.F90
)

Expand Down Expand Up @@ -167,7 +168,7 @@ list( APPEND output_manager_src
# ----------------------------------------
list( APPEND output_manager_src
metadata/metadata_base_mod.F90
metadata/multIO_metadata_v2_mod.F90
metadata/multIO_metadata_v3_mod.F90
metadata/grib_metadata_mod.F90
metadata/metadata_factory_mod.F90
metadata/metadata_tracer_mod.F90
Expand Down Expand Up @@ -285,20 +286,82 @@ ecbuild_add_library(
set_target_properties( ecom PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/module/ecom )
target_include_directories( ecom PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/module/ecom> )

ecbuild_add_library(
TARGET ecom-utils
SOURCES
tool/om_tool_distributor_mod.F90
tool/om_tool_utils_mod.F90
tool/om_tool_cfg_mod.F90

DEFINITIONS ${OUTPUT_MANAGER_BUILD_FLAVOUR}

PRIVATE_INCLUDES
${CMAKE_BINARY_DIR}/include
${OUTPUT_MANAGER_INCLUDE_PATH}

PUBLIC_LIBS
fckit
ecom

)

# Module directory
set_target_properties( ecom-utils PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/module/ecom )
target_include_directories( ecom-utils PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/module/ecom> )


if ( HAVE_OUTPUT_MANAGER_TOOL )
ecbuild_add_executable(

TARGET ecom-feed

SOURCES
tool/om_tool_cfg_mod.F90
tool/om_tool_utils_mod.F90
tool/om_tool_prog.F90
tool/om_tool_feed_prog.F90

LIBS
fckit
ecom
ecom-utils
eccodes
eccodes_f90
multio-fapi

LINKER_LANGUAGE Fortran

)



ecbuild_add_executable(

TARGET ecom-list

SOURCES
tool/om_tool_list_prog.F90

LIBS
fckit
ecom
ecom-utils
eccodes
eccodes_f90
multio-fapi

LINKER_LANGUAGE Fortran

)

ecbuild_add_executable(

TARGET ecom-conf

SOURCES
tool/om_tool_conf_prog.F90

LIBS
fckit
ecom
ecom-utils
eccodes
eccodes_f90
multio-fapi
Expand All @@ -324,10 +387,36 @@ ecbuild_add_executable(
LINKER_LANGUAGE Fortran

)
endif()

#set(CMAKE_Fortran_COMPILER ${MPI_Fortran_COMPILER})
#ecbuild_add_executable(
#
# TARGET ecom-dist-feed
#
# SOURCES
# tool/om_tool_dist_feed_prog.F90
#
# INCLUDES
# ${MPI_Fortran_INCLUDE_DIRS}
#
# LIBS
# fckit
# ecom
# ecom-utils
# eccodes
# eccodes_f90
# multio-fapi
# ${MPI_Fortran_LIBRARIES}
#
# LINKER_LANGUAGE Fortran
#
#)


#target_link_libraries( ecom-dist-feed PUBLIC ${MPI_Fortran_LIBRARIES} )
#target_include_directories( ecom-dist-feed PRIVATE ${MPI_Fortran_INCLUDE_DIRS} )

endif()

#set_target_properties( ecom PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/module/ecom )
#target_include_directories( ecom PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/module/ecom> )

endif()
Loading

0 comments on commit 099d8f8

Please sign in to comment.