Skip to content

Commit

Permalink
EH: CS-929: Enhance the gen_types tool to generate lwdb object files
Browse files Browse the repository at this point in the history
EH: CS-932: documents all lwdb methods
  • Loading branch information
ernst-bablick committed Jan 15, 2025
1 parent f017856 commit cee1c02
Show file tree
Hide file tree
Showing 274 changed files with 9,276 additions and 147 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ include(cmake/OsReleaseInfo.cmake)
include(cmake/ArchitectureSpecificSettings.cmake)
include(CTest)

# Catch2 is a header-only test framework, so we can use CPM to install it
#include(cmake/Catch2Config.cmake)

architecture_specific_settings()

# set rpath in binaries and shared libs
Expand Down
1 change: 1 addition & 0 deletions Testing/Temporary/CTestCostData.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
3 changes: 3 additions & 0 deletions Testing/Temporary/LastTest.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Start testing: Jan 15 16:43 CET
----------------------------------------------------------
End testing: Jan 15 16:43 CET
11 changes: 11 additions & 0 deletions cmake/Catch2Config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://github.com/catchorg/Catch2

Include(FetchContent)

FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.4.0 # or a later release
)

FetchContent_MakeAvailable(Catch2)
56 changes: 40 additions & 16 deletions source/libs/sgeobj/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,47 @@
#___INFO__MARK_END_NEW__

# source/libs/sgeobj
if (PROJECT_FEATURES MATCHES "XXX gcs-extensions")
file(GLOB INPUT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/json/*.json)
file(GLOB OUTPUT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cull)
set(OUTPUT_FILES
${OUTPUT_DIR}/sge_sub_object.cc
${OUTPUT_DIR}/sge_all_listsL.h
${OUTPUT_DIR}/sge_boundaries.h
# no need to list other files here, they are included in the above files
)
add_custom_command(
OUTPUT ${OUTPUT_FILES}

# Generate CULL header files from JSON files
# This is a custom target that is not triggered automatically and only available with the gcs-extensions
# Automatic generation of header files is not supported because it would break the build via testsuite.
if (PROJECT_FEATURES MATCHES "gcs-extensions")
add_custom_target(cull_header
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND gen_types json CULL cull
DEPENDS ${INPUT_FILES} gen_types
COMMENT "Generating CULL header files"
)
add_custom_target(cull_header DEPENDS ${OUTPUT_FILES})
endif()

# Generate LWDB header files from JSON files
# This is a custom target that is not triggered automatically and only available with the gcs-extensions
# Automatic generation of header files is not supported because it would break the build via testsuite.
if (PROJECT_FEATURES MATCHES "gcs-extensions")
if (1)
# manual way to generate the header files
add_custom_target(lwdb_header
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND gen_types json LWDB lwdb
COMMENT "Generating LWDB header files"
)
else()
# automatic way to generate the header files (will break parallel build with TS)
file(GLOB INPUT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/json/*.json)
file(GLOB OUTPUT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lwdb)
set(OUTPUT_FILES
${OUTPUT_DIR}/ocs_all_attributes.h
# no need to list other files here, they are included in the file above
)
add_custom_command(
OUTPUT ${OUTPUT_FILES}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND gen_types json LWDB lwdb
DEPENDS ${INPUT_FILES} gen_types
COMMENT "Generating LWDB header files"
)
add_custom_target(lwdb_header
DEPENDS ${OUTPUT_FILES})
endif()
endif()

set(LIBRARY_NAME sgeobj)
Expand Down Expand Up @@ -110,9 +134,9 @@ set(LIBRARY_SOURCES
set(LIBRARY_INCLUDES ${SGE_INCLUDES} "./")

add_library(${LIBRARY_NAME} STATIC ${LIBRARY_SOURCES} ${OUTPUT_FILES})
if (PROJECT_FEATURES MATCHES "gcs-extensions")
# add_dependencies(${LIBRARY_NAME} cull_header)
endif ()
#if (PROJECT_FEATURES MATCHES "gcs-extensions")
# add_dependencies(${LIBRARY_NAME} cull_header)
#endif ()
target_include_directories(${LIBRARY_NAME} PUBLIC ${LIBRARY_INCLUDES})

#add_subdirectory(cpp)
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_ack_ACK_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_advance_reservation_ARA_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_advance_reservation_AR_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 2 additions & 0 deletions source/libs/sgeobj/cull/sge_all_listsL.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
#include "sgeobj/cull/sge_proc_PRO_L.h"
#include "sgeobj/cull/sge_proc_GR_L.h"
#include "sgeobj/cull/sge_binding_BN_L.h"
#include "sgeobj/cull/sge_test_TEST_L.h"
#include "sgeobj/cull/sge_pack_PACK_L.h"
#if defined(__SGE_GDI_LIBRARY_HOME_OBJECT_FILE__)

Expand Down Expand Up @@ -298,6 +299,7 @@ lNameSpace nmv[] = {
{PRO_LOWERBOUND, PRO_SIZE, PRON, PRO_Type},
{GR_LOWERBOUND, GR_SIZE, GRN, GR_Type},
{BN_LOWERBOUND, BN_SIZE, BNN, BN_Type},
{TEST_LOWERBOUND, TEST_SIZE, TESTN, TEST_Type},
{0, 0, nullptr, nullptr}
};

Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_answer_AN_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_attr_ABOOL_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_attr_ACELIST_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_attr_AINTER_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_attr_AMEM_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_attr_APRJLIST_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_attr_AQTLIST_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_attr_ASOLIST_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_attr_ASTRING_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_attr_ASTRLIST_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_attr_ASTR_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_attr_ATIME_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_attr_AULNG_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_attr_AUSRLIST_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_binding_BN_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
5 changes: 4 additions & 1 deletion source/libs/sgeobj/cull/sge_boundaries.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,10 @@ enum NameSpaceBoundaries {
BN_LOWERBOUND = GR_UPPERBOUND + 1,
BN_UPPERBOUND = BN_LOWERBOUND + 2*BASIC_UNIT - 1,

PACK_LOWERBOUND = BN_UPPERBOUND + 1,
TEST_LOWERBOUND = BN_UPPERBOUND + 1,
TEST_UPPERBOUND = TEST_LOWERBOUND + 2*BASIC_UNIT - 1,

PACK_LOWERBOUND = TEST_UPPERBOUND + 1,
PACK_UPPERBOUND = PACK_LOWERBOUND + 2*BASIC_UNIT - 1,

};
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_calendar_CAL_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_calendar_CA_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_calendar_CQU_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_calendar_TMR_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_calendar_TM_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_centry_CE_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_ckpt_CK_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_conf_CF_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_conf_CONF_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_cqueue_CQ_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion source/libs/sgeobj/cull/sge_ct_CCT_L.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*___INFO__MARK_BEGIN_NEW__*/
/***************************************************************************
*
* Copyright 2023-2024 HPC-Gridware GmbH
* Copyright 2024 HPC-Gridware GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit cee1c02

Please sign in to comment.