Skip to content

Commit

Permalink
Added noop OM
Browse files Browse the repository at this point in the history
  • Loading branch information
MircoValentiniECMWF committed Nov 24, 2024
1 parent 41511c7 commit 6106435
Show file tree
Hide file tree
Showing 9 changed files with 1,466 additions and 1,179 deletions.
2 changes: 2 additions & 0 deletions src/multiom/hooks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ add_subdirectory( options )
add_subdirectory( debug )
add_subdirectory( log )
add_subdirectory( trace )
add_subdirectory( paranoid_profile )

set( MULTIOM_HOOKS_MAIN_SOURCES
${MULTIOM_HOOKS_DIR}/hooks_mod.F90
Expand All @@ -24,6 +25,7 @@ set( MULTIOM_HOOKS_SOURCES
${MULTIOM_HOOKS_DEBUG_SOURCES}
${MULTIOM_HOOKS_LOG_SOURCES}
${MULTIOM_HOOKS_TRACE_SOURCES}
${MULTIOM_HOOKS_PARANOID_PROFILE_SOURCES}
CACHE INTERNAL "List of all sources in hooks directory"
)

Expand Down
2 changes: 2 additions & 0 deletions src/multiom/hooks/hooks_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ MODULE HOOKS_MOD
USE :: DEBUG_MOD, ONLY: DEBUG_T
USE :: TRACE_MOD, ONLY: TRACER_T
USE :: LOG_MOD, ONLY: LOGGER_T
USE :: PARANOID_PROFILE_MOD, ONLY: PARANOID_PROFILER_T

IMPLICIT NONE

Expand All @@ -27,6 +28,7 @@ MODULE HOOKS_MOD
TYPE(TRACER_T) :: TRACE_HOOK_
TYPE(LOGGER_T) :: LOG_HOOK_
TYPE(DEBUG_T) :: DEBUG_HOOK_
TYPE(PARANOID_PROFILER_T) :: PARANOID_PROFILE_HOOK_
END TYPE

!> Public symbols
Expand Down
23 changes: 23 additions & 0 deletions src/multiom/hooks/paranoid_profile/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
set(MULTIOM_HOOKS_PARANOID_PROFILE_DIR ${CMAKE_CURRENT_SOURCE_DIR})

# Enter in the module
message("${OFFSET} + hooks/paranoid_profile sources: ${MULTIOM_HOOKS_PARANOID_PROFILE_DIR}")

# Recursive print
set(OFFSET ${OFFSET}${DOFFSET})

# Collect source files in module2
set( MULTIOM_HOOKS_PARANOID_PROFILE_SOURCES
${MULTIOM_HOOKS_PARANOID_PROFILE_DIR}/paranoid_profile_mod.F90
CACHE INTERNAL "List of all sources in hooks/paranoid_profile directory"
)

# Optionally, message what has been appended for paranoid_profileging
foreach(source_file IN LISTS MULTIOM_HOOKS_PARANOID_PROFILE_SOURCES)

# Extract the filename (without the directory)
get_filename_component(filename ${source_file} NAME)

# Print the filename
message("${OFFSET} - ${filename}")
endforeach()
31 changes: 31 additions & 0 deletions src/multiom/hooks/paranoid_profile/paranoid_profile_mod.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
! Include preprocessor utils
! Include preprocessor utils
#include "output_manager_preprocessor_utils.h"
#include "output_manager_preprocessor_trace_utils.h"
#include "output_manager_preprocessor_logging_utils.h"
#include "output_manager_preprocessor_errhdl_utils.h"


#define PP_FILE_NAME 'paranoid_profile_mod.F90'
#define PP_SECTION_TYPE 'MODULE'
#define PP_SECTION_NAME 'PARANOID_PROFILE_MOD'
MODULE PARANOID_PROFILE_MOD

IMPLICIT NONE

! Default visibility
PRIVATE

! The profiler type
TYPE :: PARANOID_PROFILER_T
PRIVATE
END TYPE


! Whitelist of public symbols (types)
PUBLIC :: PARANOID_PROFILER_T

END MODULE PARANOID_PROFILE_MOD
#undef PP_SECTION_NAME
#undef PP_SECTION_TYPE
#undef PP_FILE_NAME
2 changes: 1 addition & 1 deletion src/multiom/output-manager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set(OFFSET ${OFFSET}${DOFFSET})
set( MULTIOM_OUTPUT_MANAGER_MAIN_SOURCES
${MULTIOM_OUTPUT_MANAGER_DIR}/output_manager_base_mod.F90
${MULTIOM_OUTPUT_MANAGER_DIR}/output_manager_factory_mod.F90
# ${MULTIOM_OUTPUT_MANAGER_DIR}/noop_output_manager_mod.F90
${MULTIOM_OUTPUT_MANAGER_DIR}/noop_mod.F90
)

# Collect source files in module2
Expand Down
Loading

0 comments on commit 6106435

Please sign in to comment.