Skip to content

Commit

Permalink
Merge pull request #22 from tactcomplabs/kg
Browse files Browse the repository at this point in the history
Fixes for #20 and #21
  • Loading branch information
kpgriesser authored Feb 14, 2025
2 parents 5081eb2 + 09fea18 commit 8ae869f
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 38 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ statistics values for simple components.

## Prerequisites

Given that this is an SST external component, the primary prerequisite is a
current installation of the SST Core. The Rev building infrastructure assumes
that the `sst-config` tool is installed and can be found in the current PATH
environment.
Given that this is an SST external component, the primary prerequisite is a current installation of the SST Core. Some microbenchmarks use components from SST Elements so it is recommended to install that as well. These test case are labeled 'elements' so they can easily be excluded from testing. The sst-bench building infrastructure assumes that the `sst-config` tool is installed and can be found in the current PATH environment.

*sst-bench* relies upon CMake for building the component source. The minimum
required version for this is `3.19`
Expand Down Expand Up @@ -70,10 +67,20 @@ make -j
make install
make test
```
If SST Elements is not installed, the dependent tests can be excluded using:
```
ctest -LE elements
```

A special set of long tests that may create extremely large files and can be excluded using:
```
ctest -LE large
```

A special set of long tests that may create extremely large files can be excluded using:
Currently, the checkpoint tests may generate a large number of files. To clean up after running tests use
```
ctest -E large
cd ..
git clean -f -d
```

## Special Runtime Notes
Expand Down
3 changes: 3 additions & 0 deletions sst-bench/large-stat-chkpnt/large-stat-chkpnt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ namespace SST::LargeStatChkpnt{
// read the remainder of the parameters
numStats = params.find<uint64_t>( "numStats", 1 );
numClocks = params.find<uint64_t>( "numClocks", 1);

output.verbose( CALL_INFO, 0, 0, "numStats=%" PRIu64 "\n", numStats );
output.verbose( CALL_INFO, 0, 0, "numClocks=%" PRIu64 "\n", numClocks );

// initialize the statistics
for( auto i = 0x00ull; i<numStats; i++ ){
Expand Down
2 changes: 0 additions & 2 deletions test/.gitignore

This file was deleted.

22 changes: 11 additions & 11 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# sst-bench/test CMake
#
# Copyright (C) 2017-2024 Tactical Computing Laboratories, LLC
# Copyright (C) 2017-2025 Tactical Computing Laboratories, LLC
# All Rights Reserved
# [email protected]
# See LICENSE in the top level directory for licensing details
Expand All @@ -19,26 +19,26 @@ add_subdirectory(large-stat)
if(${SST_MAJOR_VERSION} GREATER_EQUAL 14)
message(STATUS "[SST-BENCH] Enabling CHKPNT testing")
add_subdirectory(chkpnt)
message(STATUS "[SST-BENCH] Enabling RESTORE testing")
add_subdirectory(restore)
message(STATUS "[SST-BENCH] Enabling RESTART testing")
add_subdirectory(restart)
endif()

set(SST_14_1_MIN 0)
if(${SST_MAJOR_VERSION} EQUAL 14)
if(${SST_MINOR_VERSION} GREATER_EQUAL 1)
message(STATUS "[SST-BENCH] Enabling LARGE-STATE-CHKPNT testing")
add_subdirectory(large-stat-chkpnt)
message(STATUS "[SST-BENCH] Enabling GRID testing")
add_subdirectory(grid)
set(SST_14_1_MIN 1)
endif()
elseif(${SST_MAJOR_VERSION} GREATER 14)
set(SST_14_1_MIN 1)
endif()

if(${SST_14_1_MIN})
message(STATUS "[SST-BENCH] Enabling LARGE-STATE-CHKPNT testing")
add_subdirectory(large-stat-chkpnt)
message(STATUS "[SST-BENCH] Enabling RESTORE testing")
add_subdirectory(restore)
message(STATUS "[SST-BENCH] Enabling RESTART testing")
add_subdirectory(restart)
message(STATUS "[SST-BENCH] Enabling GRID testing")
add_subdirectory(grid)
else()
message(STATUS "[SST-BENCH] sst version 14.1 is minimum requirement to enable LARGE-STATE-CHKPNT and GRID testing")
endif()

if(${ENABLE_SSTDBG})
Expand Down
2 changes: 1 addition & 1 deletion test/chkpnt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if(SSTBENCH_ENABLE_TESTING)
if(NOT ${testName} MATCHES "checkpoint_dump")
add_test(NAME ${testName}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND ${SCRIPTS}/sst-chkpt.sh ${testName}_SAVE_ --checkpoint-period=10ns --add-lib-path=${CMAKE_BINARY_DIR}/sst-bench/chkpnt ${testSrc})
COMMAND ${SCRIPTS}/sst-chkpt.sh ${testName}_SAVE_ --checkpoint-period=100ns --add-lib-path=${CMAKE_BINARY_DIR}/sst-bench/chkpnt ${testSrc})
set_tests_properties(${testName}
PROPERTIES
TIMEOUT 60
Expand Down
4 changes: 2 additions & 2 deletions test/chkpnt/chkpnt-test2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

cp0 = sst.Component("cp0", "chkpnt.Chkpnt")
cp0.addParams({
"verbose" : 5,
"verbose" : 0,
"numPorts" : 10,
"minData" : 1,
"maxData" : 10000,
Expand All @@ -25,7 +25,7 @@

cp1 = sst.Component("cp1", "chkpnt.Chkpnt")
cp1.addParams({
"verbose" : 5,
"verbose" : 0,
"numPorts" : 10,
"minData" : 1,
"maxData" : 10000,
Expand Down
6 changes: 0 additions & 6 deletions test/grid/.gitignore

This file was deleted.

4 changes: 2 additions & 2 deletions test/large-stat-chkpnt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ if(SSTBENCH_ENABLE_TESTING)
get_filename_component(testName ${testSrc} NAME_WE)
add_test(NAME ${testName}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND ${SCRIPTS}/sst-chkpt.sh ${testName}_SAVE_ --checkpoint-period=10ns --add-lib-path=${CMAKE_BINARY_DIR}/sst-bench/large-stat-chkpnt ${testSrc})
COMMAND ${SCRIPTS}/sst-chkpt.sh ${testName}_SAVE_ --checkpoint-period=1us --add-lib-path=${CMAKE_BINARY_DIR}/sst-bench/large-stat-chkpnt ${testSrc})
set_tests_properties(${testName}
PROPERTIES
TIMEOUT 30
TIMEOUT 120
LABELS "all;large"
PASS_REGULAR_EXPRESSION "${passRegex}")
endforeach(testSrc)
Expand Down
6 changes: 3 additions & 3 deletions test/large-stat-chkpnt/large-stat-chkpnt-test1.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

c0 = sst.Component("c0", "largestatchkpnt.LargeStatChkpnt")
c0.addParams({
"verbose" : 5,
"numStats" : 10,
"numClocks" : 100000000,
"verbose" : 0,
"numStats" : 100,
"numClocks" : 100000,
})

# EOF
2 changes: 1 addition & 1 deletion test/large-stat-chkpnt/large-stat-chkpnt-test2.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

parser = argparse.ArgumentParser(description="Run LargeStatChkpnt Test2")
parser.add_argument("--numComps", type=int, help="Number of cores to load", default=1)
parser.add_argument("--numClocks", type=int, help="Number of clocks to run", default=100000000)
parser.add_argument("--numClocks", type=int, help="Number of clocks to run", default=100000)
parser.add_argument("--numStats", type=int, help="Number of stats to load", default=1)
parser.add_argument("--verbose", type=int, help="verbosity level", default=1)
args = parser.parse_args()
Expand Down
2 changes: 1 addition & 1 deletion test/micro-comp-link/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if(SSTBENCH_ENABLE_TESTING)
set_tests_properties(${testName}
PROPERTIES
TIMEOUT 30
LABELS "all"
LABELS "all;elements"
PASS_REGULAR_EXPRESSION "${passRegex}")
endforeach(testSrc)
endif()
Expand Down
1 change: 0 additions & 1 deletion test/msg-perf/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion test/msg-perf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if(SSTBENCH_ENABLE_TESTING)
set_tests_properties(${testName}
PROPERTIES
TIMEOUT 30
LABELS "all"
LABELS "all;elements"
PASS_REGULAR_EXPRESSION "${passRegex}")
endforeach(testSrc)
endif()
Expand Down
2 changes: 1 addition & 1 deletion test/restart/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if(SSTBENCH_ENABLE_TESTING)
set(CHKPT_PFX ${testName}_SAVE_)
add_test(NAME ${testName}_SAVE
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND ${SCRIPTS}/sst-chkpt.sh ${CHKPT_PFX} --checkpoint-period=5us --add-lib-path=${CMAKE_BINARY_DIR}/sst-bench/restore ${testSrc})
COMMAND ${SCRIPTS}/sst-chkpt.sh ${CHKPT_PFX} --checkpoint-period=5us --add-lib-path=${CMAKE_BINARY_DIR}/sst-bench/restart ${testSrc})
set_tests_properties(${testName}_SAVE
PROPERTIES
TIMEOUT 60
Expand Down

0 comments on commit 8ae869f

Please sign in to comment.