From 2cd26084cd650dc341af3a5d398278f577bf40da Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Fri, 3 Feb 2023 14:04:37 +0100 Subject: [PATCH 01/32] tell cmake to include boost libs --- core/CMakeLists.txt | 1 + mss/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index a32f1752..311efca2 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -20,3 +20,4 @@ add_library(core CPUFactory.cpp CPUTopology.cpp ) + target_include_directories(core SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) diff --git a/mss/CMakeLists.txt b/mss/CMakeLists.txt index a25aaf60..fc92368b 100644 --- a/mss/CMakeLists.txt +++ b/mss/CMakeLists.txt @@ -3,3 +3,4 @@ add_library(mss BIU.cpp MSS.cpp ) +target_include_directories(mss SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) From 6299f22bafb1c90776ec973c16b22b495d09cc86 Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Fri, 3 Feb 2023 16:26:30 +0100 Subject: [PATCH 02/32] fixed boost include for tests --- core/CMakeLists.txt | 2 +- test/core/common/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 311efca2..26a75441 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -20,4 +20,4 @@ add_library(core CPUFactory.cpp CPUTopology.cpp ) - target_include_directories(core SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) +target_include_directories(core SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) diff --git a/test/core/common/CMakeLists.txt b/test/core/common/CMakeLists.txt index e87ba6cb..353bb6cf 100644 --- a/test/core/common/CMakeLists.txt +++ b/test/core/common/CMakeLists.txt @@ -4,3 +4,4 @@ project(common_test) add_library(common_test SourceUnit.cpp ) +target_include_directories(common_test SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) From 4795d0bfc65832684f66179172851c7c48f57d89 Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Fri, 10 Feb 2023 08:43:42 +0100 Subject: [PATCH 03/32] using the FindSparta.cmake which sparta installs to find libs and includes --- CMakeLists.txt | 22 ++++++++-------------- core/CMakeLists.txt | 1 + mss/CMakeLists.txt | 1 + test/core/dispatch/CMakeLists.txt | 3 +-- test/sim/CMakeLists.txt | 3 +-- 5 files changed, 12 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 437ae70b..a9a87f29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16) set (CMAKE_CXX_STANDARD 17) set (CMAKE_CXX_STANDARD_REQUIRED ON) -project(olympia CXX) +project(olympia C CXX) add_compile_options ( -Werror -Wall -Wextra -Winline -Winit-self -Wno-unused-function @@ -11,10 +11,12 @@ add_compile_options ( -Werror ################################################################################ # Set up Sparta -if (NOT SPARTA_BASE) - message (FATAL_ERROR "Need to define the location of the Sparta: cmake -DSPARTA_BASE=\"/path/to/sparta\"") -endif () -include (${SPARTA_BASE}/cmake/sparta-config.cmake) +if(IS_DIRECTORY ${SPARTA_SEARCH_DIR}) + set(CMAKE_MODULE_PATH "${SPARTA_SEARCH_DIR}/lib/cmake/sparta" ${CMAKE_MODULE_PATH}) +else() + message (STATUS "If needed, please provide the location where sparta is installed: -DSPARTA_SEARCH_DIR=") +endif() +find_package(Sparta REQUIRED) ################################################################################ # Set up STF library @@ -45,12 +47,6 @@ else() message (FATAL_ERROR "Please provide a CMAKE_BUILD_TYPE: -DCMAKE_BUILD_TYPE=Release|Debug|Profile") endif() -# Sparta/STF linking -link_directories ( - ${SPARTA_BASE}/${SPARTA_BUILD_TYPE} - ${SPARTA_BASE}/${SPARTA_BUILD_TYPE}/simdb - ) - # Profile build flags set(CMAKE_CXX_FLAGS_PROFILE "-O3 -pg -g -ftime-trace") set(CMAKE_CXX_FLAGS_FASTDEBUG "-O3 -g") @@ -59,8 +55,6 @@ set(CMAKE_CXX_FLAGS_FASTDEBUG "-O3 -g") include_directories (core mss) include_directories (SYSTEM mavis) include_directories (SYSTEM stf_lib) -include_directories (SYSTEM ${SPARTA_BASE}) -include_directories (SYSTEM ${SPARTA_BASE}/simdb/include) # The Core, MSS, and the simulator add_subdirectory(core) @@ -77,7 +71,7 @@ add_executable(olympia sim/OlympiaSim.cpp sim/main.cpp ) -target_link_libraries (olympia core mss ${Sparta_LIBS} ${STF_LINK_LIBS}) +target_link_libraries (olympia core mss SPARTA::sparta ${STF_LINK_LIBS}) if (CMAKE_BUILD_TYPE MATCHES "^[Rr]elease") target_link_options (olympia PUBLIC -flto) target_compile_options (olympia PUBLIC -flto) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 26a75441..a7062672 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -21,3 +21,4 @@ add_library(core CPUTopology.cpp ) target_include_directories(core SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) +target_link_libraries(core PUBLIC SPARTA::sparta) diff --git a/mss/CMakeLists.txt b/mss/CMakeLists.txt index fc92368b..7eeafc0c 100644 --- a/mss/CMakeLists.txt +++ b/mss/CMakeLists.txt @@ -4,3 +4,4 @@ add_library(mss MSS.cpp ) target_include_directories(mss SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) +target_link_libraries(mss PUBLIC SPARTA::sparta) diff --git a/test/core/dispatch/CMakeLists.txt b/test/core/dispatch/CMakeLists.txt index be1028b5..b5e556bc 100644 --- a/test/core/dispatch/CMakeLists.txt +++ b/test/core/dispatch/CMakeLists.txt @@ -3,14 +3,13 @@ project(Dispatch_test) add_executable(Dispatch_test Dispatch_test.cpp) target_link_libraries(Dispatch_test core common_test ${STF_LINK_LIBS} ${Sparta_LIBS}) -include(${SPARTA_BASE}/test/TestingMacros.cmake) - file(CREATE_LINK ${SIM_BASE}/mavis/json ${CMAKE_CURRENT_BINARY_DIR}/mavis_isa_files SYMBOLIC) file(CREATE_LINK ${SIM_BASE}/arches ${CMAKE_CURRENT_BINARY_DIR}/arches SYMBOLIC) file(CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR}/test_cores ${CMAKE_CURRENT_BINARY_DIR}/test_cores SYMBOLIC) file(CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR}/expected_output ${CMAKE_CURRENT_BINARY_DIR}/expected_output SYMBOLIC) # Single add per cycle +# Note: these macros get defined when find_package(Sparta) is called sparta_named_test(Dispatch_test_Run_Small Dispatch_test small_core.out -c test_cores/test_small_core.yaml) sparta_named_test(Dispatch_test_Run_Medium Dispatch_test medium_core.out -c test_cores/test_medium_core.yaml) sparta_named_test(Dispatch_test_Run_Big Dispatch_test big_core.out -c test_cores/test_big_core.yaml) diff --git a/test/sim/CMakeLists.txt b/test/sim/CMakeLists.txt index 6538a28b..80c91d25 100644 --- a/test/sim/CMakeLists.txt +++ b/test/sim/CMakeLists.txt @@ -1,7 +1,6 @@ project(olympia_test) -# Include the handy testing marcros defined in Sparta -include(${SPARTA_BASE}/test/TestingMacros.cmake) +# Note: these sparta_* macros/functions get defined when find_package(Sparta) is called # This line will make sure olympia is built before running the tests sparta_regress (olympia) From 88d020016f3787f9cc4ec0114c808f598b843388 Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Mon, 20 Feb 2023 17:02:13 +0100 Subject: [PATCH 04/32] tracking sparta PR #408, weightedcontextcounter is now in sparta/statistics --- core/Dispatch.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/Dispatch.hpp b/core/Dispatch.hpp index 1de48052..4fe4815d 100644 --- a/core/Dispatch.hpp +++ b/core/Dispatch.hpp @@ -14,10 +14,9 @@ #include "sparta/log/MessageSource.hpp" #include "sparta/statistics/Counter.hpp" #include "sparta/statistics/ContextCounter.hpp" +#include "sparta/statistics/WeightedContextCounter.hpp" #include "sparta/simulation/ResourceFactory.hpp" -#include "test/ContextCounter/WeightedContextCounter.hpp" - #include "Dispatcher.hpp" #include "CoreTypes.hpp" #include "InstGroup.hpp" From 86d45bf00eb71e9c8094df7370f60dcf0367a0fe Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Thu, 23 Feb 2023 08:16:23 +0100 Subject: [PATCH 05/32] CI should pick up sparta in default location after make install for sparta --- .github/actions/build/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh index bbe3c6ad..b853fb54 100755 --- a/.github/actions/build/entrypoint.sh +++ b/.github/actions/build/entrypoint.sh @@ -26,7 +26,7 @@ if [ $? -ne 0 ]; then echo "ERROR: Cmake for Sparta framework failed" exit 1 fi -make -j2 +make -j2 install BUILD_SPARTA=$? if [ ${BUILD_SPARTA} -ne 0 ]; then echo "ERROR: build sparta FAILED!!!" @@ -36,7 +36,7 @@ fi cd ${GITHUB_WORKSPACE} mkdir $OLYMPIA_BUILD_TYPE cd $OLYMPIA_BUILD_TYPE -cmake .. -DCMAKE_BUILD_TYPE=$OLYMPIA_BUILD_TYPE -DGEN_DEBUG_INFO=OFF -DSPARTA_BASE=${GITHUB_WORKSPACE}/map/sparta +cmake .. -DCMAKE_BUILD_TYPE=$OLYMPIA_BUILD_TYPE -DGEN_DEBUG_INFO=OFF if [ $? -ne 0 ]; then echo "ERROR: Cmake for olympia failed" exit 1 From eb4182c91123e7841737e032c3fa8c11ff9f9c98 Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Fri, 24 Feb 2023 07:59:57 +0100 Subject: [PATCH 06/32] install sparta in github workspace area where we have permissions to write --- .github/actions/build/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh index b853fb54..fbbf6426 100755 --- a/.github/actions/build/entrypoint.sh +++ b/.github/actions/build/entrypoint.sh @@ -21,7 +21,7 @@ mkdir -p release # Link step expects "release" as dir name ln -s release fastdebug ln -s release debug cd release -cmake .. -DCMAKE_BUILD_TYPE=$OLYMPIA_BUILD_TYPE -DGEN_DEBUG_INFO=OFF +cmake .. -DCMAKE_BUILD_TYPE=$OLYMPIA_BUILD_TYPE -DGEN_DEBUG_INFO=OFF -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/sparta_installed if [ $? -ne 0 ]; then echo "ERROR: Cmake for Sparta framework failed" exit 1 @@ -36,7 +36,7 @@ fi cd ${GITHUB_WORKSPACE} mkdir $OLYMPIA_BUILD_TYPE cd $OLYMPIA_BUILD_TYPE -cmake .. -DCMAKE_BUILD_TYPE=$OLYMPIA_BUILD_TYPE -DGEN_DEBUG_INFO=OFF +cmake .. -DCMAKE_BUILD_TYPE=$OLYMPIA_BUILD_TYPE -DGEN_DEBUG_INFO=OFF -DSPARTA_SEARCH_DIR=${GITHUB_WORKSPACE}/sparta_installed if [ $? -ne 0 ]; then echo "ERROR: Cmake for olympia failed" exit 1 From 7fdb723f9e9a339ddd8711f3812a61b0dbb4644c Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Sat, 4 Mar 2023 08:13:33 +0100 Subject: [PATCH 07/32] no need to mark project as C, hdf5 find is fixed --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 399d0451..f697eab7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.17) set (CMAKE_CXX_STANDARD 17) set (CMAKE_CXX_STANDARD_REQUIRED ON) -project(olympia C CXX) +project(olympia CXX) add_compile_options ( -Werror -Wall -Wextra -Winline -Winit-self -Wno-unused-function From 5722d2a5782e0280842b7e499506260891c4387c Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Mon, 27 Mar 2023 13:12:36 +0200 Subject: [PATCH 08/32] bump cmake to more recent version, so it can find hdf5 --- CMakeLists.txt | 2 +- conda/environment.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f697eab7..49ae0a16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.17) +cmake_minimum_required(VERSION 3.19) set (CMAKE_CXX_STANDARD 17) set (CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/conda/environment.yml b/conda/environment.yml index 8dc319f2..6663e4c8 100644 --- a/conda/environment.yml +++ b/conda/environment.yml @@ -11,7 +11,7 @@ dependencies: - bzip2=1.0.8=h7f98852_4 - c-ares=1.18.1=h7f98852_0 - ca-certificates=2022.12.7=ha878542_0 - - cmake=3.17.0=h28c56e5_0 + - cmake=3.26.1 - cppcheck=2.7.5=py310h94ea96f_1 - curl=7.87.0=h6312ad2_0 - doxygen=1.8.20=had0d8f1_0 From 783865bed46dd5d6122fd133ea5cb736250e246a Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Mon, 27 Mar 2023 13:30:05 +0200 Subject: [PATCH 09/32] somewhat less aggressive: 3.19 might be ok? --- conda/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/environment.yml b/conda/environment.yml index 6663e4c8..2e62a90a 100644 --- a/conda/environment.yml +++ b/conda/environment.yml @@ -11,7 +11,7 @@ dependencies: - bzip2=1.0.8=h7f98852_4 - c-ares=1.18.1=h7f98852_0 - ca-certificates=2022.12.7=ha878542_0 - - cmake=3.26.1 + - cmake=3.19.0 - cppcheck=2.7.5=py310h94ea96f_1 - curl=7.87.0=h6312ad2_0 - doxygen=1.8.20=had0d8f1_0 From 24bc16dc5bf5caddbd6fafe4e8ffc7fa3392226b Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Mon, 27 Mar 2023 13:33:38 +0200 Subject: [PATCH 10/32] need existing version --- conda/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/environment.yml b/conda/environment.yml index 2e62a90a..158ce05a 100644 --- a/conda/environment.yml +++ b/conda/environment.yml @@ -11,7 +11,7 @@ dependencies: - bzip2=1.0.8=h7f98852_4 - c-ares=1.18.1=h7f98852_0 - ca-certificates=2022.12.7=ha878542_0 - - cmake=3.19.0 + - cmake=3.19.7 - cppcheck=2.7.5=py310h94ea96f_1 - curl=7.87.0=h6312ad2_0 - doxygen=1.8.20=had0d8f1_0 From 11941586c8abe40540728a4de85c7557257017eb Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Mon, 27 Mar 2023 13:38:31 +0200 Subject: [PATCH 11/32] nuclear option: no version pins at all --- conda/environment.yml | 138 +++++++++++++++++++++--------------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/conda/environment.yml b/conda/environment.yml index 158ce05a..787c7622 100644 --- a/conda/environment.yml +++ b/conda/environment.yml @@ -2,72 +2,72 @@ name: riscv_perf_model channels: - conda-forge dependencies: - - _libgcc_mutex=0.1=conda_forge - - _openmp_mutex=4.5=2_gnu - - binutils_impl_linux-64=2.39=he00db2b_1 - - binutils_linux-64=2.39=h5fc0e48_11 - - boost=1.76.0=py310h7c3ba0c_1 - - boost-cpp=1.76.0=h312852a_1 - - bzip2=1.0.8=h7f98852_4 - - c-ares=1.18.1=h7f98852_0 - - ca-certificates=2022.12.7=ha878542_0 - - cmake=3.19.7 - - cppcheck=2.7.5=py310h94ea96f_1 - - curl=7.87.0=h6312ad2_0 - - doxygen=1.8.20=had0d8f1_0 - - expat=2.5.0=h27087fc_0 - - gcc_impl_linux-64=10.4.0=h5231bdf_19 - - gcc_linux-64=10.4.0=h9215b83_11 - - gxx_impl_linux-64=10.4.0=h5231bdf_19 - - gxx_linux-64=10.4.0=h6e491c6_11 - - hdf5=1.10.6=nompi_h6a2412b_1114 - - icu=68.2=h9c3ff4c_0 - - kernel-headers_linux-64=2.6.32=he073ed8_15 - - keyutils=1.6.1=h166bdaf_0 - - krb5=1.20.1=hf9c8cef_0 - - ld_impl_linux-64=2.39=hcc3a1bd_1 - - libblas=3.9.0=16_linux64_openblas - - libcblas=3.9.0=16_linux64_openblas - - libcurl=7.87.0=h6312ad2_0 - - libedit=3.1.20191231=he28a2e2_2 - - libev=4.33=h516909a_1 - - libffi=3.4.2=h7f98852_5 - - libgcc-devel_linux-64=10.4.0=hd38fd1e_19 - - libgcc-ng=12.2.0=h65d4601_19 - - libgfortran-ng=12.2.0=h69a702a_19 - - libgfortran5=12.2.0=h337968e_19 - - libgomp=12.2.0=h65d4601_19 - - libiconv=1.17=h166bdaf_0 - - liblapack=3.9.0=16_linux64_openblas - - libnghttp2=1.51.0=hdcd2b5c_0 - - libnsl=2.0.0=h7f98852_0 - - libopenblas=0.3.21=pthreads_h78a6416_3 - - libsanitizer=10.4.0=h5246dfb_19 - - libsqlite=3.40.0=h753d276_0 - - libssh2=1.10.0=haa6b8db_3 - - libstdcxx-devel_linux-64=10.4.0=hd38fd1e_19 - - libstdcxx-ng=12.2.0=h46fd767_19 - - libuuid=2.32.1=h7f98852_1000 - - libuv=1.44.2=h166bdaf_0 - - libzlib=1.2.13=h166bdaf_4 - - ncurses=6.3=h27087fc_1 - - numpy=1.24.1=py310h08bbf29_0 - - openssl=1.1.1s=h0b41bf4_1 - - pcre=8.45=h9c3ff4c_0 - - pip=22.3.1=pyhd8ed1ab_0 - - pygments=2.11.2=pyhd8ed1ab_0 - - python=3.10.8=h257c98d_0_cpython - - python_abi=3.10=3_cp310 - - rapidjson=1.1.0=he1b5a44_1002 - - readline=8.1.2=h0f457ee_0 - - rhash=1.4.3=h166bdaf_0 - - setuptools=65.6.3=pyhd8ed1ab_0 - - sqlite=3.36.0=h9cd32fc_2 - - sysroot_linux-64=2.12=he073ed8_15 - - tk=8.6.12=h27826a3_0 - - tzdata=2022g=h191b570_0 - - wheel=0.38.4=pyhd8ed1ab_0 - - xz=5.2.6=h166bdaf_0 - - yaml-cpp=0.7.0=h27087fc_2 - - zlib=1.2.13=h166bdaf_4 - - zstd=1.5.2=h6239696_4 + - _libgcc_mutex>=0.1=conda_forge + - _openmp_mutex>=4.5=2_gnu + - binutils_impl_linux-64>=2.39=he00db2b_1 + - binutils_linux-64>=2.39=h5fc0e48_11 + - boost>=1.76.0=py310h7c3ba0c_1 + - boost-cpp>=1.76.0=h312852a_1 + - bzip2>=1.0.8=h7f98852_4 + - c-ares>=1.18.1=h7f98852_0 + - ca-certificates>=2022.12.7=ha878542_0 + - cmake>=3.19.7 + - cppcheck>=2.7.5=py310h94ea96f_1 + - curl>=7.87.0=h6312ad2_0 + - doxygen>=1.8.20=had0d8f1_0 + - expat>=2.5.0=h27087fc_0 + - gcc_impl_linux-64>=10.4.0=h5231bdf_19 + - gcc_linux-64>=10.4.0=h9215b83_11 + - gxx_impl_linux-64>=10.4.0=h5231bdf_19 + - gxx_linux-64>=10.4.0=h6e491c6_11 + - hdf5>=1.10.6=nompi_h6a2412b_1114 + - icu>=68.2=h9c3ff4c_0 + - kernel-headers_linux-64>=2.6.32=he073ed8_15 + - keyutils>=1.6.1=h166bdaf_0 + - krb5>=1.20.1=hf9c8cef_0 + - ld_impl_linux-64>=2.39=hcc3a1bd_1 + - libblas>=3.9.0=16_linux64_openblas + - libcblas>=3.9.0=16_linux64_openblas + - libcurl>=7.87.0=h6312ad2_0 + - libedit>=3.1.20191231=he28a2e2_2 + - libev>=4.33=h516909a_1 + - libffi>=3.4.2=h7f98852_5 + - libgcc-devel_linux-64>=10.4.0=hd38fd1e_19 + - libgcc-ng>=12.2.0=h65d4601_19 + - libgfortran-ng>=12.2.0=h69a702a_19 + - libgfortran5>=12.2.0=h337968e_19 + - libgomp>=12.2.0=h65d4601_19 + - libiconv>=1.17=h166bdaf_0 + - liblapack>=3.9.0=16_linux64_openblas + - libnghttp2>=1.51.0=hdcd2b5c_0 + - libnsl>=2.0.0=h7f98852_0 + - libopenblas>=0.3.21=pthreads_h78a6416_3 + - libsanitizer>=10.4.0=h5246dfb_19 + - libsqlite>=3.40.0=h753d276_0 + - libssh2>=1.10.0=haa6b8db_3 + - libstdcxx-devel_linux-64>=10.4.0=hd38fd1e_19 + - libstdcxx-ng>=12.2.0=h46fd767_19 + - libuuid>=2.32.1=h7f98852_1000 + - libuv>=1.44.2=h166bdaf_0 + - libzlib>=1.2.13=h166bdaf_4 + - ncurses>=6.3=h27087fc_1 + - numpy>=1.24.1=py310h08bbf29_0 + - openssl>=1.1.1s=h0b41bf4_1 + - pcre>=8.45=h9c3ff4c_0 + - pip>=22.3.1=pyhd8ed1ab_0 + - pygments>=2.11.2=pyhd8ed1ab_0 + - python>=3.10.8=h257c98d_0_cpython + - python_abi>=3.10=3_cp310 + - rapidjson>=1.1.0=he1b5a44_1002 + - readline>=8.1.2=h0f457ee_0 + - rhash>=1.4.3=h166bdaf_0 + - setuptools>=65.6.3=pyhd8ed1ab_0 + - sqlite>=3.36.0=h9cd32fc_2 + - sysroot_linux-64>=2.12=he073ed8_15 + - tk>=8.6.12=h27826a3_0 + - tzdata>=2022g=h191b570_0 + - wheel>=0.38.4=pyhd8ed1ab_0 + - xz>=5.2.6=h166bdaf_0 + - yaml-cpp>=0.7.0=h27087fc_2 + - zlib>=1.2.13=h166bdaf_4 + - zstd>=1.5.2=h6239696_4 From e615d9ebd3b23067e39e5119a77884ca74bab24d Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Mon, 27 Mar 2023 13:54:48 +0200 Subject: [PATCH 12/32] branch needs sparta master --- .github/workflows/ubuntu-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ubuntu-build.yml b/.github/workflows/ubuntu-build.yml index 0c579ba5..62f40003 100644 --- a/.github/workflows/ubuntu-build.yml +++ b/.github/workflows/ubuntu-build.yml @@ -36,6 +36,7 @@ jobs: with: repository: sparcians/map path: map + ref: master # Setup Conda and build environment From 57aadb2d922772b2a1e7d01cad493b9ff38b39f6 Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Tue, 28 Mar 2023 09:37:28 +0200 Subject: [PATCH 13/32] double check on sparta git version we use in CI --- .github/workflows/ubuntu-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ubuntu-build.yml b/.github/workflows/ubuntu-build.yml index 62f40003..0c579ba5 100644 --- a/.github/workflows/ubuntu-build.yml +++ b/.github/workflows/ubuntu-build.yml @@ -36,7 +36,6 @@ jobs: with: repository: sparcians/map path: map - ref: master # Setup Conda and build environment From f23e0ec17f98f5a1f89957cc53f6039a241ca59c Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Tue, 28 Mar 2023 09:40:45 +0200 Subject: [PATCH 14/32] hacky workaround to get the right sparta branch in CI --- .github/actions/build/entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh index fbbf6426..8aab90af 100755 --- a/.github/actions/build/entrypoint.sh +++ b/.github/actions/build/entrypoint.sh @@ -17,6 +17,10 @@ echo "PWD:" `pwd` # echo "Building Sparta Infra" cd ${GITHUB_WORKSPACE}/map/sparta +# Double check if which hash we have +# FIXME: hacky: ensure we have master here on the branch +git checkout master +echo "sparta git @ $(git rev-parse HEAD)" mkdir -p release # Link step expects "release" as dir name ln -s release fastdebug ln -s release debug From 6fd31f2a036023a71652925ca7fe51d7f6f6336b Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Tue, 28 Mar 2023 10:04:35 +0200 Subject: [PATCH 15/32] hacky workaround to get the right sparta branch in CI, v2 --- .github/actions/build/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh index 8aab90af..079a79e1 100755 --- a/.github/actions/build/entrypoint.sh +++ b/.github/actions/build/entrypoint.sh @@ -19,7 +19,7 @@ echo "Building Sparta Infra" cd ${GITHUB_WORKSPACE}/map/sparta # Double check if which hash we have # FIXME: hacky: ensure we have master here on the branch -git checkout master +git checkout --progress --force -B master refs/remotes/origin/master echo "sparta git @ $(git rev-parse HEAD)" mkdir -p release # Link step expects "release" as dir name ln -s release fastdebug From 60dcb1f6880bd951e8c277efc42b23ceb20cb762 Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Tue, 28 Mar 2023 10:15:21 +0200 Subject: [PATCH 16/32] hacky workaround to get the right sparta branch in CI, v3 --- .github/actions/build/entrypoint.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh index 079a79e1..4cb4f005 100755 --- a/.github/actions/build/entrypoint.sh +++ b/.github/actions/build/entrypoint.sh @@ -19,8 +19,10 @@ echo "Building Sparta Infra" cd ${GITHUB_WORKSPACE}/map/sparta # Double check if which hash we have # FIXME: hacky: ensure we have master here on the branch -git checkout --progress --force -B master refs/remotes/origin/master -echo "sparta git @ $(git rev-parse HEAD)" +git remote -v show +git branch -l +git checkout --progress --force -B master origin/master +git rev-parse HEAD mkdir -p release # Link step expects "release" as dir name ln -s release fastdebug ln -s release debug From d9335004f9ce72cbf818ccf9e957cceedeb7fa5b Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Tue, 28 Mar 2023 10:27:10 +0200 Subject: [PATCH 17/32] hacky workaround to get the right sparta branch in CI, v4 --- .github/actions/build/entrypoint.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh index 4cb4f005..697a2b61 100755 --- a/.github/actions/build/entrypoint.sh +++ b/.github/actions/build/entrypoint.sh @@ -20,8 +20,9 @@ cd ${GITHUB_WORKSPACE}/map/sparta # Double check if which hash we have # FIXME: hacky: ensure we have master here on the branch git remote -v show -git branch -l -git checkout --progress --force -B master origin/master +git fetch +git branch -la +git switch master git rev-parse HEAD mkdir -p release # Link step expects "release" as dir name ln -s release fastdebug From aa8d97e9598beb07221d5583c123d773ea2f9e20 Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Tue, 28 Mar 2023 11:03:49 +0200 Subject: [PATCH 18/32] latest submodules just like master --- mavis | 2 +- stf_lib | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mavis b/mavis index a3563228..c3c1060c 160000 --- a/mavis +++ b/mavis @@ -1 +1 @@ -Subproject commit a356322830f5b4b720aa11749b89b2fc91e9b9ee +Subproject commit c3c1060cf59baf8c16c13ddd2473f84e7c3aeb65 diff --git a/stf_lib b/stf_lib index 77021032..742037fb 160000 --- a/stf_lib +++ b/stf_lib @@ -1 +1 @@ -Subproject commit 7702103205549d910d691b310f554a840d600cca +Subproject commit 742037fb80bfe97cb27d7063e24f9bb60b0144f3 From 85f9c55137190965282cdfa912ad35be74a9d1e5 Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Tue, 28 Mar 2023 11:21:49 +0200 Subject: [PATCH 19/32] verbose build for CI debug --- .github/actions/build/entrypoint.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh index 697a2b61..07c09fff 100755 --- a/.github/actions/build/entrypoint.sh +++ b/.github/actions/build/entrypoint.sh @@ -19,9 +19,7 @@ echo "Building Sparta Infra" cd ${GITHUB_WORKSPACE}/map/sparta # Double check if which hash we have # FIXME: hacky: ensure we have master here on the branch -git remote -v show git fetch -git branch -la git switch master git rev-parse HEAD mkdir -p release # Link step expects "release" as dir name @@ -48,7 +46,7 @@ if [ $? -ne 0 ]; then echo "ERROR: Cmake for olympia failed" exit 1 fi -make -j2 regress +make -j2 regress VERBOSE=1 BUILD_OLYMPIA=$? if [ ${BUILD_OLYMPIA} -ne 0 ]; then echo "ERROR: build/regress of olympia FAILED!!!" From 7f1a9dfe37012ac68669588b96bb37d22d8d03da Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Tue, 28 Mar 2023 11:51:17 +0200 Subject: [PATCH 20/32] added sparta dep to core common test --- test/core/common/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test/core/common/CMakeLists.txt b/test/core/common/CMakeLists.txt index 353bb6cf..7594a329 100644 --- a/test/core/common/CMakeLists.txt +++ b/test/core/common/CMakeLists.txt @@ -5,3 +5,4 @@ add_library(common_test SourceUnit.cpp ) target_include_directories(common_test SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) +target_link_libraries(common_test SPARTA::sparta) From e5db40aa02a46b98d6179b31dfff30dd7283ec2a Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Tue, 28 Mar 2023 11:51:59 +0200 Subject: [PATCH 21/32] no need for verbose --- .github/actions/build/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh index 07c09fff..bdacea71 100755 --- a/.github/actions/build/entrypoint.sh +++ b/.github/actions/build/entrypoint.sh @@ -46,7 +46,7 @@ if [ $? -ne 0 ]; then echo "ERROR: Cmake for olympia failed" exit 1 fi -make -j2 regress VERBOSE=1 +make -j2 regress BUILD_OLYMPIA=$? if [ ${BUILD_OLYMPIA} -ne 0 ]; then echo "ERROR: build/regress of olympia FAILED!!!" From a065a9b30487a630bf97f9ba72ff3b868e0a5d26 Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Tue, 28 Mar 2023 12:12:57 +0200 Subject: [PATCH 22/32] trying to debug stf linking issue in CI --- .github/actions/build/entrypoint.sh | 2 +- test/core/dispatch/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh index bdacea71..07c09fff 100755 --- a/.github/actions/build/entrypoint.sh +++ b/.github/actions/build/entrypoint.sh @@ -46,7 +46,7 @@ if [ $? -ne 0 ]; then echo "ERROR: Cmake for olympia failed" exit 1 fi -make -j2 regress +make -j2 regress VERBOSE=1 BUILD_OLYMPIA=$? if [ ${BUILD_OLYMPIA} -ne 0 ]; then echo "ERROR: build/regress of olympia FAILED!!!" diff --git a/test/core/dispatch/CMakeLists.txt b/test/core/dispatch/CMakeLists.txt index b5e556bc..f2183449 100644 --- a/test/core/dispatch/CMakeLists.txt +++ b/test/core/dispatch/CMakeLists.txt @@ -1,7 +1,7 @@ project(Dispatch_test) add_executable(Dispatch_test Dispatch_test.cpp) -target_link_libraries(Dispatch_test core common_test ${STF_LINK_LIBS} ${Sparta_LIBS}) +target_link_libraries(Dispatch_test core common_test ${STF_LINK_LIBS} SPARTA::sparta) file(CREATE_LINK ${SIM_BASE}/mavis/json ${CMAKE_CURRENT_BINARY_DIR}/mavis_isa_files SYMBOLIC) file(CREATE_LINK ${SIM_BASE}/arches ${CMAKE_CURRENT_BINARY_DIR}/arches SYMBOLIC) From e8b939ec4a463f1760f5ed82b7fef6329609adaa Mon Sep 17 00:00:00 2001 From: Knute Lingaard Date: Tue, 28 Mar 2023 10:44:43 -0500 Subject: [PATCH 23/32] Trying a conda install of sparta --- .github/actions/build/entrypoint.sh | 14 ++++---------- .github/workflows/ubuntu-build.yml | 2 +- CMakeLists.txt | 15 +++++++++++++-- core/CMakeLists.txt | 2 -- test/core/common/CMakeLists.txt | 2 -- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh index 07c09fff..bf4ba7b3 100755 --- a/.github/actions/build/entrypoint.sh +++ b/.github/actions/build/entrypoint.sh @@ -9,6 +9,7 @@ echo "Starting Build Entry" echo "HOME:" $HOME echo "GITHUB_WORKSPACE:" $GITHUB_WORKSPACE echo "GITHUB_EVENT_PATH:" $GITHUB_EVENT_PATH +echo "CONDA_PREFIX:" $CONDA_PREFIX echo "PWD:" `pwd` # @@ -17,16 +18,9 @@ echo "PWD:" `pwd` # echo "Building Sparta Infra" cd ${GITHUB_WORKSPACE}/map/sparta -# Double check if which hash we have -# FIXME: hacky: ensure we have master here on the branch -git fetch -git switch master -git rev-parse HEAD -mkdir -p release # Link step expects "release" as dir name -ln -s release fastdebug -ln -s release debug +mkdir -p release cd release -cmake .. -DCMAKE_BUILD_TYPE=$OLYMPIA_BUILD_TYPE -DGEN_DEBUG_INFO=OFF -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/sparta_installed +cmake .. -DCMAKE_BUILD_TYPE=$OLYMPIA_BUILD_TYPE -DGEN_DEBUG_INFO=OFF -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} if [ $? -ne 0 ]; then echo "ERROR: Cmake for Sparta framework failed" exit 1 @@ -41,7 +35,7 @@ fi cd ${GITHUB_WORKSPACE} mkdir $OLYMPIA_BUILD_TYPE cd $OLYMPIA_BUILD_TYPE -cmake .. -DCMAKE_BUILD_TYPE=$OLYMPIA_BUILD_TYPE -DGEN_DEBUG_INFO=OFF -DSPARTA_SEARCH_DIR=${GITHUB_WORKSPACE}/sparta_installed +cmake .. -DCMAKE_BUILD_TYPE=$OLYMPIA_BUILD_TYPE -DGEN_DEBUG_INFO=OFF if [ $? -ne 0 ]; then echo "ERROR: Cmake for olympia failed" exit 1 diff --git a/.github/workflows/ubuntu-build.yml b/.github/workflows/ubuntu-build.yml index 59b0ddcd..e5dc57f8 100644 --- a/.github/workflows/ubuntu-build.yml +++ b/.github/workflows/ubuntu-build.yml @@ -36,7 +36,7 @@ jobs: with: repository: sparcians/map path: map - ref: map_v1.1.1 + ref: master # Setup Conda and build environment - name: Grab Python v3.8 diff --git a/CMakeLists.txt b/CMakeLists.txt index 49ae0a16..61b899c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,13 +11,24 @@ add_compile_options ( -Werror ################################################################################ # Set up Sparta -if(IS_DIRECTORY ${SPARTA_SEARCH_DIR}) - set(CMAKE_MODULE_PATH "${SPARTA_SEARCH_DIR}/lib/cmake/sparta" ${CMAKE_MODULE_PATH}) +if(IS_DIRECTORY ${SPARTA_SEARCH_DIR}) + message (STATUS "Using '${SPARTA_SEARCH_DIR}' for sparta install") +elseif(DEFINED ENV{CONDA_PREFIX}) + message (STATUS "Looking for SPARTA in the conda environment: '$ENV{CONDA_PREFIX}'") + set(SPARTA_SEARCH_DIR $ENV{CONDA_PREFIX}) else() message (STATUS "If needed, please provide the location where sparta is installed: -DSPARTA_SEARCH_DIR=") endif() +set(CMAKE_MODULE_PATH "${SPARTA_SEARCH_DIR}/lib/cmake/sparta" ${CMAKE_MODULE_PATH}) + find_package(Sparta REQUIRED) +if (NOT SPARTA_FOUND) + message (FATAL_ERROR "Sparta was not found in ${SPARTA_SEARCH_DIR}") +else() + message (STATUS "Sparta was found in ${SPARTA_SEARCH_DIR}") +endif() + ################################################################################ # Set up STF library set (STF_LIB_BASE ${PROJECT_SOURCE_DIR}/stf_lib) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index a7062672..a32f1752 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -20,5 +20,3 @@ add_library(core CPUFactory.cpp CPUTopology.cpp ) -target_include_directories(core SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) -target_link_libraries(core PUBLIC SPARTA::sparta) diff --git a/test/core/common/CMakeLists.txt b/test/core/common/CMakeLists.txt index 7594a329..e87ba6cb 100644 --- a/test/core/common/CMakeLists.txt +++ b/test/core/common/CMakeLists.txt @@ -4,5 +4,3 @@ project(common_test) add_library(common_test SourceUnit.cpp ) -target_include_directories(common_test SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) -target_link_libraries(common_test SPARTA::sparta) From fdc60b32a884dde5f289c9f487199e5fa7614d37 Mon Sep 17 00:00:00 2001 From: Knute Lingaard Date: Tue, 28 Mar 2023 12:24:11 -0700 Subject: [PATCH 24/32] Setup linker support for LTO --- CMakeLists.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61b899c7..a956253c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,12 +28,20 @@ if (NOT SPARTA_FOUND) else() message (STATUS "Sparta was found in ${SPARTA_SEARCH_DIR}") endif() +#include_directories(${SPARTA_INCLUDE_DIRS}) ################################################################################ # Set up STF library set (STF_LIB_BASE ${PROJECT_SOURCE_DIR}/stf_lib) set (DISABLE_STF_DOXYGEN ON) -#include(${STF_LIB_BASE}/cmake/stf-config.cmake) + +if (CMAKE_BUILD_TYPE MATCHES "^[Rr]elease") + set (FULL_LTO true) + include(${STF_LIB_BASE}/cmake/stf_linker_setup.cmake) + setup_stf_linker(false) +endif() + + # Use ccache if installed find_program (CCACHE_PROGRAM ccache) @@ -84,8 +92,10 @@ add_executable(olympia ) target_link_libraries (olympia core mss SPARTA::sparta ${STF_LINK_LIBS}) if (CMAKE_BUILD_TYPE MATCHES "^[Rr]elease") - target_link_options (olympia PUBLIC -flto) + target_compile_options (core PUBLIC -flto) + target_compile_options (mss PUBLIC -flto) target_compile_options (olympia PUBLIC -flto) + target_link_options (olympia PUBLIC -flto) endif() # Create a few links like reports and arch directories From a7cf25d03e5661c03c4642a30f8ed377a40f6b92 Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Wed, 29 Mar 2023 08:55:16 +0200 Subject: [PATCH 25/32] add in link libraries where they were missing --- core/CMakeLists.txt | 1 + test/core/common/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index a32f1752..cd117625 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -20,3 +20,4 @@ add_library(core CPUFactory.cpp CPUTopology.cpp ) +target_link_libraries (core PUBLIC SPARTA::sparta ${STF_LINK_LIBS}) diff --git a/test/core/common/CMakeLists.txt b/test/core/common/CMakeLists.txt index e87ba6cb..ed87dfd4 100644 --- a/test/core/common/CMakeLists.txt +++ b/test/core/common/CMakeLists.txt @@ -4,3 +4,4 @@ project(common_test) add_library(common_test SourceUnit.cpp ) +target_link_libraries(common_test PRIVATE core SPARTA::sparta) From 53cac695fb213a847d579e4791edae82c10d6c8b Mon Sep 17 00:00:00 2001 From: Knute Lingaard Date: Thu, 13 Apr 2023 19:45:49 -0500 Subject: [PATCH 26/32] I think these changes will work in Peter's environment --- .github/workflows/ubuntu-build.yml | 2 +- CMakeLists.txt | 3 ++- core/CMakeLists.txt | 1 - mss/CMakeLists.txt | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ubuntu-build.yml b/.github/workflows/ubuntu-build.yml index e5dc57f8..91d27145 100644 --- a/.github/workflows/ubuntu-build.yml +++ b/.github/workflows/ubuntu-build.yml @@ -36,7 +36,7 @@ jobs: with: repository: sparcians/map path: map - ref: master + ref: map_v2.0.0 # Setup Conda and build environment - name: Grab Python v3.8 diff --git a/CMakeLists.txt b/CMakeLists.txt index a956253c..dde60b66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,8 @@ if (NOT SPARTA_FOUND) else() message (STATUS "Sparta was found in ${SPARTA_SEARCH_DIR}") endif() -#include_directories(${SPARTA_INCLUDE_DIRS}) + +include_directories(${SPARTA_INCLUDE_DIRS}) ################################################################################ # Set up STF library diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index cd117625..a32f1752 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -20,4 +20,3 @@ add_library(core CPUFactory.cpp CPUTopology.cpp ) -target_link_libraries (core PUBLIC SPARTA::sparta ${STF_LINK_LIBS}) diff --git a/mss/CMakeLists.txt b/mss/CMakeLists.txt index 7eeafc0c..fc92368b 100644 --- a/mss/CMakeLists.txt +++ b/mss/CMakeLists.txt @@ -4,4 +4,3 @@ add_library(mss MSS.cpp ) target_include_directories(mss SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) -target_link_libraries(mss PUBLIC SPARTA::sparta) From f3d7eccb5d997371221dcb921a5ce98b357ac0e4 Mon Sep 17 00:00:00 2001 From: Knute Lingaard Date: Thu, 13 Apr 2023 20:13:40 -0500 Subject: [PATCH 27/32] Added cool banner --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cdfc6cc7..ff173526 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Regress Olympia on Ubuntu](https://github.com/riscv-software-src/riscv-perf-model/actions/workflows/ubuntu-build.yml/badge.svg)](https://github.com/riscv-software-src/riscv-perf-model/actions/workflows/ubuntu-build.yml) + # olympia Olympia is a Performance Model written in C++ for the RISC-V community as an From f1c16b3e15954633a1db9acf3a0e7349dba61415 Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Fri, 28 Apr 2023 14:21:07 +0200 Subject: [PATCH 28/32] get all required includes for sparta from the property --- core/CMakeLists.txt | 4 +++- mss/CMakeLists.txt | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index a32f1752..8fb9ffd9 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -19,4 +19,6 @@ add_library(core CPU.cpp CPUFactory.cpp CPUTopology.cpp - ) +) +get_property(SPARTA_INCLUDE_PROP TARGET SPARTA::sparta PROPERTY INTERFACE_INCLUDE_DIRECTORIES) +target_include_directories(core SYSTEM PRIVATE ${SPARTA_INCLUDE_PROP}) diff --git a/mss/CMakeLists.txt b/mss/CMakeLists.txt index fc92368b..706261d4 100644 --- a/mss/CMakeLists.txt +++ b/mss/CMakeLists.txt @@ -3,4 +3,5 @@ add_library(mss BIU.cpp MSS.cpp ) -target_include_directories(mss SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) +get_property(SPARTA_INCLUDE_PROP TARGET SPARTA::sparta PROPERTY INTERFACE_INCLUDE_DIRECTORIES) +target_include_directories(mss SYSTEM PRIVATE ${SPARTA_INCLUDE_PROP}) From 11239953bd7e8144dc100c3beb926bec78dd036a Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Fri, 28 Apr 2023 14:31:58 +0200 Subject: [PATCH 29/32] resolve conflict with master --- .github/actions/build/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh index bf4ba7b3..17f53b20 100755 --- a/.github/actions/build/entrypoint.sh +++ b/.github/actions/build/entrypoint.sh @@ -25,7 +25,7 @@ if [ $? -ne 0 ]; then echo "ERROR: Cmake for Sparta framework failed" exit 1 fi -make -j2 install +make -j$(nproc --all) install BUILD_SPARTA=$? if [ ${BUILD_SPARTA} -ne 0 ]; then echo "ERROR: build sparta FAILED!!!" @@ -40,7 +40,7 @@ if [ $? -ne 0 ]; then echo "ERROR: Cmake for olympia failed" exit 1 fi -make -j2 regress VERBOSE=1 +make -j$(nproc --all) regress BUILD_OLYMPIA=$? if [ ${BUILD_OLYMPIA} -ne 0 ]; then echo "ERROR: build/regress of olympia FAILED!!!" From 589c16d92d2fee6be4088a7b7a1da2f4bfe36a6e Mon Sep 17 00:00:00 2001 From: Peter Debacker Date: Fri, 28 Apr 2023 14:51:23 +0200 Subject: [PATCH 30/32] should not have removed install --- .github/actions/build/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh index 07add1a8..17f53b20 100755 --- a/.github/actions/build/entrypoint.sh +++ b/.github/actions/build/entrypoint.sh @@ -25,7 +25,7 @@ if [ $? -ne 0 ]; then echo "ERROR: Cmake for Sparta framework failed" exit 1 fi -make -j$(nproc --all) +make -j$(nproc --all) install BUILD_SPARTA=$? if [ ${BUILD_SPARTA} -ne 0 ]; then echo "ERROR: build sparta FAILED!!!" From faed61137bd81b6e6056111961614f29a75fb8c9 Mon Sep 17 00:00:00 2001 From: Knute Lingaard Date: Sun, 7 May 2023 17:14:51 -0500 Subject: [PATCH 31/32] Use the branch map_v2 for regressions --- .github/workflows/ubuntu-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu-build.yml b/.github/workflows/ubuntu-build.yml index 91d27145..1da07d1b 100644 --- a/.github/workflows/ubuntu-build.yml +++ b/.github/workflows/ubuntu-build.yml @@ -36,7 +36,7 @@ jobs: with: repository: sparcians/map path: map - ref: map_v2.0.0 + ref: map_v2 # Setup Conda and build environment - name: Grab Python v3.8 From 5ce1b6a2549a49a36a89795faa3d0b953e66d532 Mon Sep 17 00:00:00 2001 From: Knute Lingaard Date: Sun, 7 May 2023 17:31:13 -0500 Subject: [PATCH 32/32] Update README.md Updated with map_v2.0 notes Signed-off-by: Knute Lingaard --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ff173526..c4921d94 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ under development. # Build Directions 1. Set up a clean working `conda` environment by following the directions [here](https://github.com/riscv-software-src/riscv-perf-model/tree/master/conda) -1. Download and build Sparta and checkout tag [map_v1.1.0](https://github.com/sparcians/map/releases/tag/map_v1.1.0). Follow the directions on the [Sparta README](https://github.com/sparcians/map/tree/map_v1.1.0/sparta#building-sparta-with-packages-used-in-continuous-integration-macos--centos7-or-newer-linux) +1. Download and build Sparta and checkout branch [map_v2](https://github.com/sparcians/map/tree/map_v2). Follow the directions on the [Sparta README](https://github.com/sparcians/map/tree/map_v2#building-map) to build _and install_ Sparta 1. Make sure you have the [required libraries](https://github.com/sparcians/stf_lib#required-packages) for the STF toolsuite installed 1. Clone olympia ```