diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 9f58637d5e..0dd6c438d4 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -5,7 +5,7 @@ jobs: - job: osx pool: - vmImage: macOS-10.15 + vmImage: macOS-11 strategy: matrix: osx_64_: @@ -47,15 +47,6 @@ jobs: displayName: Prepare conda build artifacts condition: succeededOrFailed() - - task: PublishTestResults@2 - condition: succeededOrFailed() - inputs: - testResultsFormat: 'cTest' - testResultsFiles: '**/Test.xml' - mergeTestResults: false # Unclear on impact of setting this true - failTaskOnFailedTests: true - publishRunAttachments: true # uploads xml files for possible inspection - - task: PublishPipelineArtifact@1 displayName: Store conda build artifacts condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml index 648bc407ec..6acf309cfd 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_.yaml @@ -1,11 +1,11 @@ boost: -- 1.74.0 +- 1.78.0 boost_cpp: -- 1.74.0 +- 1.78.0 c_compiler: - gcc c_compiler_version: -- '10' +- '11' cdt_name: - cos6 channel_sources: @@ -15,11 +15,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 hdf5: -- 1.10.6 +- 1.12.2 linux_clang_version: - '13' numpy: @@ -32,8 +32,6 @@ pin_run_as_build: python: min_pin: x.x max_pin: x.x - sqlite: - max_pin: x python: - 3.8.* *_cpython sqlite: @@ -45,3 +43,5 @@ zip_keys: - cxx_compiler_version - - python - numpy +zlib: +- '1.2' diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 44e2f26551..66b5d048d9 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -1,13 +1,13 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.13' +- '11.1' boost: -- 1.74.0 +- 1.78.0 boost_cpp: -- 1.74.0 +- 1.78.0 c_compiler: - clang c_compiler_version: -- '12' +- '14' channel_sources: - conda-forge channel_targets: @@ -15,13 +15,11 @@ channel_targets: cxx_compiler: - clangxx cxx_compiler_version: -- '12' +- '14' hdf5: -- 1.10.6 +- 1.12.2 macos_machine: - x86_64-apple-darwin13.4.0 -macos_min_version: -- '10.13' numpy: - '1.19' pin_run_as_build: @@ -32,8 +30,6 @@ pin_run_as_build: python: min_pin: x.x max_pin: x.x - sqlite: - max_pin: x python: - 3.8.* *_cpython sqlite: @@ -43,7 +39,7 @@ target_platform: zip_keys: - - c_compiler_version - cxx_compiler_version -- - macos_min_version - - MACOSX_DEPLOYMENT_TARGET - - python - numpy +zlib: +- '1.2' diff --git a/.circleci/config.yml b/.circleci/config.yml index f08df1f137..c2fe449549 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ # This file was generated automatically from conda-smithy. To update this configuration, # update the conda-forge.yml and/or the recipe/meta.yaml. -# -*- mode: yaml -*- +# -*- mode: jinja-yaml -*- version: 2 @@ -8,11 +8,11 @@ jobs: build_linux_64_: working_directory: ~/test machine: - image: ubuntu-2004:current + - image: ubuntu-2004:current environment: - CONFIG: "linux_64_" - UPLOAD_PACKAGES: "False" - DOCKER_IMAGE: "quay.io/condaforge/linux-anvil-cos7-x86_64" + - CONFIG: "linux_64_" + - UPLOAD_PACKAGES: "False" + DOCKER_IMAGE: "quay.io/condaforge/linux-anvil-cos7-x86_64" steps: - checkout - run: @@ -36,13 +36,4 @@ workflows: version: 2 build_and_test: jobs: - - build_linux_64_: - # Knute says he only wants it to build for PR's - # That is accomplished by turning on "build only on pull requests" - # on https://app.circleci.com/settings/project/github/sparcians/map/advanced - # which still will build commits on master but we also add filters to ignore - # all branches here as suggested in https://discuss.circleci.com/t/only-build-pull-requests-not-every-branch/200/8 - filters: - branches: - ignore: master - + - build_linux_64_ diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000000..54dd780d42 --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,19 @@ +on: + status: {} + check_suite: + types: + - completed + +jobs: + automerge-action: + runs-on: ubuntu-latest + name: automerge + steps: + - name: checkout + uses: actions/checkout@v3 + - name: automerge-action + id: automerge-action + uses: conda-forge/automerge-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + rerendering_github_token: ${{ secrets.RERENDERING_GITHUB_TOKEN }} diff --git a/.github/workflows/webservices.yml b/.github/workflows/webservices.yml new file mode 100644 index 0000000000..2e5fe71fb8 --- /dev/null +++ b/.github/workflows/webservices.yml @@ -0,0 +1,13 @@ +on: repository_dispatch + +jobs: + webservices: + runs-on: ubuntu-latest + name: webservices + steps: + - name: webservices + id: webservices + uses: conda-forge/webservices-dispatch-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + rerendering_github_token: ${{ secrets.RERENDERING_GITHUB_TOKEN }} diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 8dbbd05f58..be0907ed8c 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -24,15 +24,18 @@ export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" cat >~/.condarc < /dev/null +if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then + cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt" +fi + if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index a4191cf2ce..6b8d444f4f 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -23,11 +23,10 @@ bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME} source ${MINIFORGE_HOME}/etc/profile.d/conda.sh conda activate base -echo -e "\n\nInstalling ['conda-forge-ci-setup=3'] and conda-build." mamba install --update-specs --quiet --yes --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 + conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12" mamba update --update-specs --yes --quiet --channel conda-forge \ - conda-build pip boa conda-forge-ci-setup=3 + conda-build pip boa conda-forge-ci-setup=3 "py-lief<0.12" @@ -57,6 +56,10 @@ echo -e "\n\nMaking the build clobber file" make_build_number ./ ./conda.recipe ./.ci_support/${CONFIG}.yaml +if [[ -f LICENSE.txt ]]; then + cp LICENSE.txt "conda.recipe/recipe-scripts-license.txt" +fi + if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then if [[ "x${BUILD_OUTPUT_ID:-}" != "x" ]]; then EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --output-id ${BUILD_OUTPUT_ID}" diff --git a/README.md b/README.md index 425fb86ec6..881878e600 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,18 @@ MAP is broken into two parts: [![CircleCI](https://circleci.com/gh/sparcians/map.svg?style=svg)](https://circleci.com/gh/sparcians/map) [![MacOS Build Status](https://dev.azure.com/sparcians/map/_apis/build/status/sparcians.map?branchName=master&label=MacOS)](https://dev.azure.com/sparcians/map/_build/latest?definitionId=1&branchName=master) [![Documentation](https://github.com/sparcians/map/workflows/Documentation/badge.svg)](https://sparcians.github.io/map/) + +## Updating Regression/Build Environments + +CI files are generated when the command `conda smithy rerender` is run +inside a MAP clone. That command uses the following files to control +the generation of the CI-specific control files: + +- `conda-forge.yml` - defines which platforms you want to support and some other higher-level things +- `conda.recipe/conda_build_config.yaml` - defines lists of values for variables that are used in meta.yaml +- `conda.recipe/meta.yaml` - uses variables (stuff inside {{ varname }} double curlies) + +To update versions of OSes, edit the following file: +https://github.com/sparcians/map/blob/master/conda.recipe/conda_build_config.yaml +and then run `conda smithy rerender`. (Ensure `conda install +conda-smithy` into your conda installation for that command to exist). \ No newline at end of file diff --git a/conda-forge.yml b/conda-forge.yml index a6f254be05..3a4153cf21 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -8,8 +8,8 @@ skip_render: - build-locally.py - .github provider: - linux: circle - osx: azure + linux_64: circle + osx_64: azure win: None linux_ppc64le: None linux_aarch64: None diff --git a/conda.recipe/conda_build_config.yaml b/conda.recipe/conda_build_config.yaml index 61769e7f23..2a39077752 100644 --- a/conda.recipe/conda_build_config.yaml +++ b/conda.recipe/conda_build_config.yaml @@ -22,21 +22,13 @@ # override macos APK min version. # conda-forge supports from 10.9 but we # have code that needs 10.13. -# See https://sifive.atlassian.net/wiki/x/0IBBJw -# for details -macos_min_version: # [osx] - - 10.13 # [osx] +macos_machine: # [osx] + - arm64-apple-darwin20.0.0 # [osx and arm64] MACOSX_DEPLOYMENT_TARGET: # [osx] - - 10.13 # [osx] - -zip_keys: # [osx] - - # [osx] - - macos_min_version # [osx] - - MACOSX_DEPLOYMENT_TARGET # [osx] - + - 11.1 # [osx] # linux_clang_version is not a part of zip_keys -# from conda-forge, if you want to, you can +# from conda-forge, if you want to, you can # easily matrix the linux builds using the same # backend from gcc but adding new clang versions # here @@ -94,7 +86,7 @@ python_impl: # cdt_name: # - cos6 # - cos6 -# +# # conda-forge-pinnings-feedstock/recipe/conda_build_config.yaml # uses c_compiler_version and cxx_compiler_version in a zip_keys @@ -111,7 +103,7 @@ python_impl: # list and keys can only be in one, so, we have to constrain fortran to be # a matrix as well even though we don't use it. # -# If we really want to define our own zip_keys, we can rerender with +# If we really want to define our own zip_keys, we can rerender with # conda smithy rerender --exclusive-config # # and conda-smithy should just use our configuration @@ -127,5 +119,3 @@ python_impl: # - python # - numpy # - python_impl - - diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 0f52e4d537..1bc44f1b61 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -57,6 +57,7 @@ requirements: - hdf5 - python - rapidjson + - zlib run: - matplotlib-base - numpy diff --git a/sparta/cmake/sparta-config.cmake b/sparta/cmake/sparta-config.cmake index 6f1971fd63..c5d1ba3e00 100644 --- a/sparta/cmake/sparta-config.cmake +++ b/sparta/cmake/sparta-config.cmake @@ -13,7 +13,7 @@ ################################################################################ # Find Boost -set (_BOOST_COMPONENTS filesystem date_time iostreams serialization timer program_options) +set (_BOOST_COMPONENTS date_time iostreams serialization timer program_options) if (COMPILE_WITH_PYTHON) list (APPEND _BOOST_COMPONENTS python) find_package (Python COMPONENTS Interpreter Development) @@ -70,14 +70,19 @@ message (STATUS "Using RapidJSON CPP ${RapidJSON_VERSION}") find_package (SQLite3 3.19 REQUIRED) message (STATUS "Using SQLite3 ${SQLite3_VERSION}") +# Find zlib +find_package(ZLIB REQUIRED) +message (STATUS "Using zlib ${ZLIB_VERSION_STRING}") +include_directories(SYSTEM ${ZLIB_INCLUDE_DIRS}) + # Find HDF5. Need to enable C language for HDF5 testing enable_language (C) find_package (HDF5 1.10 REQUIRED) # Populate the Sparta_LIBS variable with the required libraries for # basic Sparta linking -set (Sparta_LIBS sparta simdb ${HDF5_LIBRARIES} sqlite3 yaml-cpp z pthread - Boost::date_time Boost::filesystem Boost::iostreams Boost::serialization Boost::timer Boost::program_options) +set (Sparta_LIBS sparta simdb ${HDF5_LIBRARIES} sqlite3 yaml-cpp ZLIB::ZLIB pthread + Boost::date_time Boost::iostreams Boost::serialization Boost::timer Boost::program_options) # On Linux we need to link against rt as well if (NOT APPLE) diff --git a/sparta/doc/sparta_docs/building.txt b/sparta/doc/sparta_docs/building.txt index 4e70578e70..38c04d868a 100644 --- a/sparta/doc/sparta_docs/building.txt +++ b/sparta/doc/sparta_docs/building.txt @@ -53,7 +53,6 @@ z pthread Boost::date_time - Boost::filesystem Boost::iostreams Boost::serialization Boost::timer diff --git a/sparta/python/sparta_support/module_sparta.cpp b/sparta/python/sparta_support/module_sparta.cpp index 7fb38a8772..2b104ea026 100644 --- a/sparta/python/sparta_support/module_sparta.cpp +++ b/sparta/python/sparta_support/module_sparta.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include "sparta/simulation/TreeNode.hpp" #include "sparta/simulation/RootTreeNode.hpp" @@ -1448,18 +1449,18 @@ void SimulationDatabase__printAllVerificationSummaries( const std::string & simdb_dir, const bool verbose) { - namespace bfs = boost::filesystem; + namespace sfs = std::filesystem; - auto p = bfs::path(simdb_dir); - if (!bfs::exists(p) || !bfs::is_directory(p)) { + auto p = sfs::path(simdb_dir); + if (!sfs::exists(p) || !sfs::is_directory(p)) { std::cout << "Not a valid directory: '" << simdb_dir << "'\n" << std::endl; return; } - for (bfs::directory_iterator iter(p); iter != bfs::directory_iterator(); ++iter) { - if (bfs::is_regular_file(iter->status()) && iter->path().extension().string() == ".db") { + for (sfs::directory_iterator iter(p); iter != sfs::directory_iterator(); ++iter) { + if (sfs::is_regular_file(iter->status()) && iter->path().extension().string() == ".db") { const std::string db_full_filename = iter->path().string(); - bfs::path db_path(db_full_filename); + sfs::path db_path(db_full_filename); const std::string db_filename = db_path.stem().string() + db_path.extension().string(); simdb::ObjectManager sim_db(simdb_dir); if (sim_db.connectToExistingDatabase(db_filename)) { @@ -1519,18 +1520,18 @@ void SimulationDatabase__getVerificationFailureReportDiffs( void SimulationDatabase__getVerificationFailuresInDir( const std::string & simdb_dir) { - namespace bfs = boost::filesystem; - auto p = bfs::path(simdb_dir); - if (!bfs::exists(p) || !bfs::is_directory(p)) { + namespace sfs = std::filesystem; + auto p = sfs::path(simdb_dir); + if (!sfs::exists(p) || !sfs::is_directory(p)) { std::cout << "Not a valid directory: '" << simdb_dir << "'\n" << std::endl; return; } std::map> db_subdirs_with_failures; - for (bfs::directory_iterator iter(p); iter != bfs::directory_iterator(); ++iter) { - if (bfs::is_regular_file(iter->status()) && iter->path().extension().string() == ".db") { + for (sfs::directory_iterator iter(p); iter != sfs::directory_iterator(); ++iter) { + if (sfs::is_regular_file(iter->status()) && iter->path().extension().string() == ".db") { const std::string db_full_filename = iter->path().string(); - bfs::path db_path(db_full_filename); + sfs::path db_path(db_full_filename); const std::string db_filename = db_path.stem().string() + db_path.extension().string(); simdb::ObjectManager sim_db(simdb_dir); if (sim_db.connectToExistingDatabase(db_filename)) { diff --git a/sparta/sparta/statistics/dispatch/archives/BinaryOArchive.hpp b/sparta/sparta/statistics/dispatch/archives/BinaryOArchive.hpp index a6b5f3ff55..25b05b92ce 100644 --- a/sparta/sparta/statistics/dispatch/archives/BinaryOArchive.hpp +++ b/sparta/sparta/statistics/dispatch/archives/BinaryOArchive.hpp @@ -7,8 +7,8 @@ #include "sparta/statistics/dispatch/archives/ArchiveNode.hpp" #include +#include -#include #include namespace sparta { @@ -50,7 +50,7 @@ class BinaryOArchive : public ArchiveSink const std::string source_full_path = source_path + "/" + source_subpath; const std::string source_tree_filename = source_full_path + "/archive_tree.bin"; - if (!boost::filesystem::exists(source_tree_filename)) { + if (!std::filesystem::exists(source_tree_filename)) { throw SpartaException( "Metadata file not available for read: ") << source_tree_filename; } @@ -60,11 +60,11 @@ class BinaryOArchive : public ArchiveSink const std::string dest_full_path = dest_path + "/" + dest_subpath; const std::string dest_tree_filename = dest_full_path + "/archive_tree.bin"; - if (boost::filesystem::exists(dest_tree_filename)) { - boost::filesystem::remove(dest_tree_filename); + if (std::filesystem::exists(dest_tree_filename)) { + std::filesystem::remove(dest_tree_filename); } - boost::filesystem::copy_file(source_tree_filename, dest_tree_filename); + std::filesystem::copy_file(source_tree_filename, dest_tree_filename); } //Put one vector of statistics data values into the binary file @@ -87,15 +87,15 @@ class BinaryOArchive : public ArchiveSink void createArchiveDirectory_(const std::string & path, const std::string & subpath) const { - boost::filesystem::create_directories(path + "/" + subpath); + std::filesystem::create_directories(path + "/" + subpath); } void openBinaryArchiveFile_(const std::string & path, const std::string & subpath) { const std::string binary_filename = path + "/" + subpath + "/values.bin"; - if (boost::filesystem::exists(binary_filename)) { - boost::filesystem::remove(binary_filename); + if (std::filesystem::exists(binary_filename)) { + std::filesystem::remove(binary_filename); } binary_fout_.open(binary_filename, std::ios::binary); @@ -120,8 +120,8 @@ class BinaryOArchive : public ArchiveSink const std::string & subpath) const { const std::string filename = path + "/" + subpath + "/archive_tree.bin"; - if (boost::filesystem::exists(filename)) { - boost::filesystem::remove(filename); + if (std::filesystem::exists(filename)) { + std::filesystem::remove(filename); } std::ofstream fout(filename, std::ios::binary); @@ -139,4 +139,3 @@ class BinaryOArchive : public ArchiveSink } // namespace statistics } // namespace sparta - diff --git a/sparta/sparta/statistics/dispatch/archives/StatisticsArchives.hpp b/sparta/sparta/statistics/dispatch/archives/StatisticsArchives.hpp index e2ee3813e1..c64d917843 100644 --- a/sparta/sparta/statistics/dispatch/archives/StatisticsArchives.hpp +++ b/sparta/sparta/statistics/dispatch/archives/StatisticsArchives.hpp @@ -6,7 +6,8 @@ #include "sparta/statistics/dispatch/archives/RootArchiveNode.hpp" #include "sparta/statistics/dispatch/archives/ArchiveController.hpp" -#include +#include + #include namespace sparta { @@ -31,10 +32,10 @@ class StatisticsArchives : public StatisticsHierRootNodes //! directory which describes the archive tree. explicit StatisticsArchives(const std::string & db_dir) { - namespace bfs = boost::filesystem; - bfs::path p(db_dir); + namespace sfs = std::filesystem; + sfs::path p(db_dir); - if (!bfs::is_directory(p)) { + if (!sfs::is_directory(p)) { throw SpartaException( "The path given is not a directory: ") << db_dir; } @@ -48,9 +49,9 @@ class StatisticsArchives : public StatisticsHierRootNodes // //We need to loop over the subdirectories, and create //a RootArchiveNode object for each one. - std::vector subdirs; - std::copy(bfs::directory_iterator(p), - bfs::directory_iterator(), + std::vector subdirs; + std::copy(sfs::directory_iterator(p), + sfs::directory_iterator(), std::back_inserter(subdirs)); auto dir_iter = subdirs.begin(); @@ -168,4 +169,3 @@ class StatisticsArchives : public StatisticsHierRootNodes } // namespace statistics } // namespace sparta - diff --git a/sparta/src/AsyncNonTimeseriesReport.cpp b/sparta/src/AsyncNonTimeseriesReport.cpp index 1224f2028d..bea472332b 100644 --- a/sparta/src/AsyncNonTimeseriesReport.cpp +++ b/sparta/src/AsyncNonTimeseriesReport.cpp @@ -3,10 +3,9 @@ #include "sparta/async/AsyncNonTimeseriesReport.hpp" #include -#include //SQLite-specific headers -#include "zlib.h" +#include namespace sparta { namespace async { diff --git a/sparta/src/AsyncTimeseriesReport.cpp b/sparta/src/AsyncTimeseriesReport.cpp index 0d866477bc..33577c6f5a 100644 --- a/sparta/src/AsyncTimeseriesReport.cpp +++ b/sparta/src/AsyncTimeseriesReport.cpp @@ -2,10 +2,8 @@ #include "sparta/async/AsyncTimeseriesReport.hpp" -#include - //SQLite-specific headers -#include "zlib.h" +#include //! Compress buffered SI values and write them to the database. //! This is called on a background thread. diff --git a/sparta/src/CommandLineSimulator.cpp b/sparta/src/CommandLineSimulator.cpp index 9381271401..4b172325c0 100644 --- a/sparta/src/CommandLineSimulator.cpp +++ b/sparta/src/CommandLineSimulator.cpp @@ -13,8 +13,6 @@ #include #include #include -#include -#include #include #include #include @@ -22,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -31,6 +28,7 @@ #include #include #include +#include #include "sparta/kernel/Scheduler.hpp" #include "sparta/utils/StringUtils.hpp" @@ -73,7 +71,7 @@ #include "sparta/utils/Printing.hpp" #include "sparta/utils/SmartLexicalCast.hpp" -namespace bfs = boost::filesystem; +namespace sfs = std::filesystem; namespace sparta { namespace app { @@ -1398,10 +1396,10 @@ bool CommandLineSimulator::parse(int argc, ++i; } else if(o.string_key == "simdb-dir") { const std::string & db_dir = o.value[0]; - auto p = bfs::path(db_dir); - if (!bfs::exists(p)) { - bfs::create_directories(p); - } else if (!bfs::is_directory(p)) { + auto p = sfs::path(db_dir); + if (!sfs::exists(p)) { + sfs::create_directories(p); + } else if (!sfs::is_directory(p)) { throw SpartaException("Invalid 'simdb-dir' argument. Path ") << "exists but is not a directory."; } @@ -1410,8 +1408,8 @@ bool CommandLineSimulator::parse(int argc, } else if(o.string_key == "simdb-enabled-components") { std::vector yaml_opts_files; auto is_yaml_file = [](const std::string & opt) { - auto p = bfs::path(opt); - return (bfs::exists(p) && !bfs::is_directory(p)); + auto p = sfs::path(opt); + return (sfs::exists(p) && !sfs::is_directory(p)); }; for (size_t idx = 0; idx < o.value.size(); ++idx) { @@ -1426,10 +1424,10 @@ bool CommandLineSimulator::parse(int argc, ++i; } else if(o.string_key == "collect-legacy-reports") { const std::string & reports_root_dir = o.value[0]; - auto p = bfs::path(reports_root_dir); - if (!bfs::exists(p)) { - bfs::create_directories(p); - } else if (!bfs::is_directory(p)) { + auto p = sfs::path(reports_root_dir); + if (!sfs::exists(p)) { + sfs::create_directories(p); + } else if (!sfs::is_directory(p)) { throw SpartaException("Invalid 'collect-legacy-reports' argument. Path ") << "exists but is not a directory."; } @@ -2378,18 +2376,18 @@ void CommandLineSimulator::postProcess_(Simulation* sim) if (IsFeatureValueEnabled(feature_cfg, "simdb-verify")) { std::string simdb_fname = simdb->getDatabaseFile(); const std::string simdb_src_fname = simdb_fname; - simdb_fname = bfs::path(simdb_fname).filename().string(); + simdb_fname = sfs::path(simdb_fname).filename().string(); - bfs::path cwd = bfs::current_path(); + sfs::path cwd = sfs::current_path(); const std::string simdb_dest_dir = cwd.string() + "/" + db::ReportVerifier::getVerifResultsDir(); const std::string simdb_dest_fname = simdb_dest_dir + "/" + simdb_fname; - boost::system::error_code err; - bfs::copy_file(simdb_src_fname, simdb_dest_fname, err); + std::error_code err; + sfs::copy_file(simdb_src_fname, simdb_dest_fname, err); if (err) { std::cout << " [simdb] Warning: The 'simdb-verify' post processing step " - << "encountered and trapped a boost::filesystem error: \"" + << "encountered and trapped a std::filesystem error: \"" << err.message() << "\"" << std::endl; } } diff --git a/sparta/src/ConfigParserYAML.cpp b/sparta/src/ConfigParserYAML.cpp index 416af612cd..413813274d 100644 --- a/sparta/src/ConfigParserYAML.cpp +++ b/sparta/src/ConfigParserYAML.cpp @@ -3,8 +3,6 @@ #include #include #include -#include -#include #include #include #include @@ -17,6 +15,7 @@ #include #include #include +#include #include "sparta/parsers/ConfigParserYAML.hpp" #include "sparta/simulation/TreeNode.hpp" @@ -573,16 +572,16 @@ namespace sparta std::string filename_used = filename; // Check to see if we can point to the relative filepath to include based on the // filepath of the current yaml file in the case that the file does not exist. - boost::filesystem::path fp(filename); + std::filesystem::path fp(filename); bool found = false; // Try to find the incldue in the include paths list for(const auto & incl_path : include_paths_) { - boost::filesystem::path curr_inc(incl_path); + std::filesystem::path curr_inc(incl_path); const auto combined_path = curr_inc / filename; - if (boost::filesystem::exists(combined_path)) + if (std::filesystem::exists(combined_path)) { std::cout << " [PARAMETER INCLUDE NOTE] : Including " << combined_path << std::endl; filename_used = combined_path.string(); diff --git a/sparta/src/File.cpp b/sparta/src/File.cpp index 79a7927d14..ab48374e55 100644 --- a/sparta/src/File.cpp +++ b/sparta/src/File.cpp @@ -7,9 +7,7 @@ #include #endif #include -#include -#include -#include +#include #include #include "sparta/utils/Utils.hpp" @@ -18,7 +16,7 @@ #include "sparta/utils/TimeManager.hpp" #include "sparta/utils/SpartaAssert.hpp" -namespace bfs = boost::filesystem; +namespace sfs = std::filesystem; namespace sparta { @@ -73,30 +71,30 @@ namespace sparta for (const auto& search_dir : search_dirs) { // Form starting canonical path - bfs::path p(search_dir); - if (bfs::exists(p)) + sfs::path p(search_dir); + if (sfs::exists(p)) { - p = bfs::canonical(p); + p = sfs::canonical(p); p /= name; // Check for suffixed variations first. const std::string YAML_SUFFIX = ".yaml"; if (false == std::equal(YAML_SUFFIX.rbegin(), YAML_SUFFIX.rend(), name.rbegin())) { - bfs::path p_yaml = p.string() + ".yaml"; - if (bfs::exists(p_yaml)) { + sfs::path p_yaml = p.string() + ".yaml"; + if (sfs::exists(p_yaml)) { return p_yaml.string(); } } const std::string YML_SUFFIX = ".yml"; if (false == std::equal(YML_SUFFIX.rbegin(), YML_SUFFIX.rend(), name.rbegin())){ - bfs::path p_yml = p.string() + ".yml"; - if (bfs::exists(p_yml)) { + sfs::path p_yml = p.string() + ".yml"; + if (sfs::exists(p_yml)) { return p_yml.string(); } } - if (bfs::is_directory(p)) { + if (sfs::is_directory(p)) { try { // Recrusively search for a file of the same name with .yaml within this directory. return findArchitectureConfigFile({p.string()}, name); @@ -108,14 +106,14 @@ namespace sparta "which is required if using a directory to represent an architecture. " << ARCH_OPTIONS_RESOLUTION_RULES; } - } else if (bfs::is_regular_file(p)) { + } else if (sfs::is_regular_file(p)) { // Found regular file with input name return p.string(); - } else if (bfs::is_symlink(p)) { - auto slp = bfs::read_symlink(p); - if (slp == bfs::path()) { + } else if (sfs::is_symlink(p)) { + auto slp = sfs::read_symlink(p); + if (slp == sfs::path()) { // Empty path object means we could not read symlink - } else if (bfs::is_directory(slp)) { + } else if (sfs::is_directory(slp)) { // Symlink was a dir try { // Recrusively search for a file of the same name with .yaml within this directory. @@ -128,7 +126,7 @@ namespace sparta "which is required if using a directory to represent an architecture. " << ARCH_OPTIONS_RESOLUTION_RULES; } - } else if (bfs::is_regular_file(slp)) { + } else if (sfs::is_regular_file(slp)) { // Symlink was regular file. Return the input path not the canonical return p.string(); } diff --git a/sparta/src/MemoryProfiler.cpp b/sparta/src/MemoryProfiler.cpp index fa95091cae..db677e49e3 100644 --- a/sparta/src/MemoryProfiler.cpp +++ b/sparta/src/MemoryProfiler.cpp @@ -10,8 +10,7 @@ #include #include #include - -#include +#include namespace sparta { @@ -218,7 +217,7 @@ class MemoryProfilerConfigFileParserYAML parser_(), def_file_(def_file) { - sparta_assert(boost::filesystem::exists(def_file_), + sparta_assert(std::filesystem::exists(def_file_), ("File '" + def_file + "' cannot be found")); fin_.open(def_file.c_str(), std::ios::in); sparta_assert(fin_.is_open()); @@ -340,7 +339,7 @@ class MemoryProfiler::Impl sim_(sim) { if (!dest_file_.empty() && dest_file_ != "1" && - boost::filesystem::extension(dest_file_) != ".csv") { + std::filesystem::extension(dest_file_) != ".csv") { throw SpartaException("Memory statistics must be saved to a *.csv file, " "not '") << dest_file_ << "' (bad file extension)"; } diff --git a/sparta/src/Report.cpp b/sparta/src/Report.cpp index bdddd1340e..f909daf32e 100644 --- a/sparta/src/Report.cpp +++ b/sparta/src/Report.cpp @@ -13,6 +13,10 @@ #include #include #include +#include + +//SQLite-specific headers +#include #include "sparta/parsers/YAMLTreeEventHandler.hpp" #include "sparta/utils/Printing.hpp" @@ -38,11 +42,6 @@ #include "sparta/report/db/StatInstValueLookup.hpp" #include "sparta/report/db/DatabaseContextCounter.hpp" -//SQLite-specific headers -#include "zlib.h" - -#include "boost/filesystem.hpp" - namespace sparta { typedef std::pair parent_node_info_t; @@ -540,9 +539,9 @@ class ReportFileParserYAML NavVector& device_trees) override { sparta_assert(report_stack_.size() > 0); - boost::filesystem::path filepath = filename; - if(false == boost::filesystem::is_regular_file(filepath.native())){ - boost::filesystem::path curfile(getFilename()); + std::filesystem::path filepath = filename; + if(false == std::filesystem::is_regular_file(filepath.native())){ + std::filesystem::path curfile(getFilename()); filepath = curfile.parent_path() / filename; verbose() << "Note: file \"" << filename << "\" does not exist. Attempting to " "open \"" << filepath.native() << "\" instead" << std::endl; diff --git a/sparta/src/ReportDescriptor.cpp b/sparta/src/ReportDescriptor.cpp index b022ede067..019402e2fd 100644 --- a/sparta/src/ReportDescriptor.cpp +++ b/sparta/src/ReportDescriptor.cpp @@ -12,9 +12,8 @@ #include #include #include -#include -#include #include +#include #include #include #include @@ -121,7 +120,7 @@ bool ReportDescriptor::isSingleTimeseriesReport() const return false; } - std::string extension = boost::filesystem::extension(dest_file); + std::string extension = std::filesystem::path(dest_file).extension(); utils::lowercase_string ext(extension); return ext.getString() == ".csv"; } @@ -529,7 +528,7 @@ report::format::BaseFormatter* ReportDescriptor::addInstantiation(Report* r, run_metadata.begin(), run_metadata.end()); - const std::string extension = boost::filesystem::extension(filename); + const std::string extension = std::filesystem::path(filename).extension(); if (sim_config->getDisabledPrettyPrintFormats().count(extension)) { formatter->disablePrettyPrint(); } @@ -1104,7 +1103,7 @@ class ReportDescriptorFileParserYAML parser_(), def_file_(def_file) { - sparta_assert(boost::filesystem::exists(def_file_), + sparta_assert(std::filesystem::exists(def_file_), ("File '" + def_file + "' cannot be found")); fin_.open(def_file.c_str(), std::ios::in); sparta_assert(fin_.is_open()); diff --git a/sparta/src/ReportRepository.cpp b/sparta/src/ReportRepository.cpp index b27c56fbb1..e7a607dbe2 100644 --- a/sparta/src/ReportRepository.cpp +++ b/sparta/src/ReportRepository.cpp @@ -5,8 +5,6 @@ #include #include #include -#include -#include #include #include #include @@ -17,6 +15,7 @@ #include #include #include +#include #include "sparta/report/Report.hpp" #include "sparta/report/SubContainer.hpp" @@ -1031,7 +1030,7 @@ class ReportRepository::Impl stats_archives_.reset(new statistics::StatisticsArchives); //Statistics archives get written to the temp dir by default - auto tempdir = boost::filesystem::temp_directory_path(); + auto tempdir = std::filesystem::temp_directory_path(); const std::string db_dir = tempdir.string(); for (auto & dir : directories_) { diff --git a/sparta/src/ReportTimeseries.cpp b/sparta/src/ReportTimeseries.cpp index 3a81c6ecc6..b71dbe72d4 100644 --- a/sparta/src/ReportTimeseries.cpp +++ b/sparta/src/ReportTimeseries.cpp @@ -7,11 +7,11 @@ #include #include #include -#include #include #include #include #include +#include #include "sparta/report/db/ReportHeader.hpp" #include "sparta/report/db/Schema.hpp" @@ -23,7 +23,6 @@ #include "simdb/impl/sqlite/SQLiteConnProxy.hpp" //SQLite-specific headers #include "simdb/impl/sqlite/TransactionUtils.hpp" -#include "zlib.h" #include "simdb/Constraints.hpp" #include "simdb/DbConnProxy.hpp" #include "simdb/Errors.hpp" diff --git a/sparta/src/ReportVerifier.cpp b/sparta/src/ReportVerifier.cpp index e738ac3ca6..62be887767 100644 --- a/sparta/src/ReportVerifier.cpp +++ b/sparta/src/ReportVerifier.cpp @@ -2,13 +2,11 @@ #include "sparta/report/db/ReportVerifier.hpp" -#include -#include -#include #include #include #include #include +#include #include "simdb/ObjectManager.hpp" #include "simdb/ObjectRef.hpp" @@ -331,15 +329,15 @@ class ReportVerifier::VerificationSummary::Impl } //Trim away any leading '/' characters. They trip up - //the boost::filesystem::copy_file() calls. + //the std::filesystem::copy_file() calls. std::map trimmed_fnames; for (auto & simdb_to_yaml : simdb_to_yaml_dest_files) { - namespace bfs = boost::filesystem; - bfs::path p(simdb_to_yaml.second); + namespace sfs = std::filesystem; + sfs::path p(simdb_to_yaml.second); std::string to; auto parent_path = p.parent_path(); - if (!bfs::is_directory(parent_path)) { + if (!sfs::is_directory(parent_path)) { auto not_slash = simdb_to_yaml.second.find_first_not_of("/"); if (not_slash != std::string::npos) { to = simdb_to_yaml.second.substr(not_slash); diff --git a/sparta/src/Simulation.cpp b/sparta/src/Simulation.cpp index 82d75b69d8..8537766a00 100644 --- a/sparta/src/Simulation.cpp +++ b/sparta/src/Simulation.cpp @@ -6,10 +6,6 @@ #include #include #include -#include -#include -#include -#include #include #include #include @@ -18,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -27,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -239,7 +237,7 @@ class SimControlFileParserYAML parser_(), def_file_(def_file) { - sparta_assert(boost::filesystem::exists(def_file_), + sparta_assert(std::filesystem::exists(def_file_), ("File '" + def_file + "' cannot be found")); fin_.open(def_file.c_str(), std::ios::in); sparta_assert(fin_.is_open()); @@ -518,7 +516,7 @@ void Simulation::inspectFeatureValues_() if (!db_root_) { std::string db_dir = sim_config_->getSimulationDatabaseLocation(); if (db_dir.empty()) { - auto tempdir = boost::filesystem::temp_directory_path(); + auto tempdir = std::filesystem::temp_directory_path(); db_dir = tempdir.string(); } @@ -1174,7 +1172,7 @@ void Simulation::saveReports() verification_summary->serializeSummary(*stats_db_); } - namespace bfs = boost::filesystem; + namespace sfs = std::filesystem; std::map final_dest_files = verification_summary->getFinalDestFiles(); @@ -1191,12 +1189,12 @@ void Simulation::saveReports() for (const auto & to_copy : final_dest_files) { const std::string & simdb_dest_file = to_copy.first; const std::string & orig_yaml_dest_file = to_copy.second; - if (bfs::exists(simdb_dest_file)) { + if (sfs::exists(simdb_dest_file)) { try { - if (bfs::exists(orig_yaml_dest_file)) { - bfs::remove(orig_yaml_dest_file); + if (sfs::exists(orig_yaml_dest_file)) { + sfs::remove(orig_yaml_dest_file); } - bfs::copy_file(simdb_dest_file, orig_yaml_dest_file); + sfs::copy_file(simdb_dest_file, orig_yaml_dest_file); } catch (const std::exception & ex) { std::cout << " [simdb] Unable to copy report file '" << simdb_dest_file << "' to '" @@ -1261,13 +1259,13 @@ void Simulation::postProcessingLastCall() for (const auto & rd : rep_descs_) { if (rd.isEnabled()) { std::string orig_dest_file = rd.getDescriptorOrigDestFile(); - if (!boost::filesystem::exists(orig_dest_file)) { + if (!std::filesystem::exists(orig_dest_file)) { auto not_slash = orig_dest_file.find_first_not_of("/"); if (not_slash != std::string::npos) { orig_dest_file = orig_dest_file.substr(not_slash); } - if (!boost::filesystem::exists(orig_dest_file)) { + if (!std::filesystem::exists(orig_dest_file)) { oss << "A report descriptor's dest_file was not " << "found at the end of a SimDB verification-enabled simulation " << "('" << orig_dest_file << "')\n"; @@ -1283,11 +1281,11 @@ void Simulation::postProcessingLastCall() } if (sim_config_ && stats_db_) { - namespace bfs = boost::filesystem; + namespace sfs = std::filesystem; const std::string dest_path_str1 = sim_config_->getLegacyReportsCopyDir(); if (!dest_path_str1.empty()) { const std::string dest_path_str2 = - bfs::path(stats_db_->getDatabaseFile()).stem().string(); + sfs::path(stats_db_->getDatabaseFile()).stem().string(); const std::set & collected_formats = sim_config_->getLegacyReportsCollectedFormats(); @@ -1312,13 +1310,13 @@ void Simulation::postProcessingLastCall() continue; } - bfs::path dest_path = bfs::path(dest_path_str1 + "/" + + sfs::path dest_path = sfs::path(dest_path_str1 + "/" + dest_path_str2 + "/" + dest_path_str3); - if (!bfs::exists(dest_path)) { + if (!sfs::exists(dest_path)) { try { - bfs::create_directories(dest_path); + sfs::create_directories(dest_path); } catch (const std::exception & ex) { std::cout << " [simdb] Error occurred while collecting " << "legacy reports: '" << ex.what() << "'" @@ -1326,13 +1324,13 @@ void Simulation::postProcessingLastCall() continue; } catch (...) { } - } else if (!bfs::is_directory(dest_path)) { + } else if (!sfs::is_directory(dest_path)) { throw SpartaException("Path exists, but is not a directory: '") << dest_path.string() << "'"; } std::string orig_dest_file = rd.getDescriptorOrigDestFile(); - if (!bfs::exists(orig_dest_file)) { + if (!sfs::exists(orig_dest_file)) { auto not_slash = orig_dest_file.find_first_not_of("/"); if (not_slash != std::string::npos) { orig_dest_file = orig_dest_file.substr(not_slash); @@ -1343,7 +1341,7 @@ void Simulation::postProcessingLastCall() continue; } - if (bfs::exists(orig_dest_file)) { + if (sfs::exists(orig_dest_file)) { const std::string src_file = orig_dest_file; const std::string dest_file = dest_path_str1 + "/" + @@ -1352,7 +1350,7 @@ void Simulation::postProcessingLastCall() orig_dest_file; try { - bfs::copy_file(src_file, dest_file); + sfs::copy_file(src_file, dest_file); } catch (const std::exception & ex) { std::cout << " [simdb] Error occurred while collecting " << "legacy reports: '" << ex.what() << "'" @@ -1756,13 +1754,13 @@ void Simulation::setupReports_() //to generate a temporary subfolder we can put our report files //in. We'll move those files to their original intended location //at the end of simulation, after we have performed the validation. - namespace bfs = boost::filesystem; + namespace sfs = std::filesystem; std::string dest_file_subfolder; if (isReportValidationEnabled_()) { dest_file_subfolder = db::ReportVerifier::getVerifResultsDir(); dest_file_subfolder += "/"; - bfs::path path = stats_db_->getDatabaseFile(); + sfs::path path = stats_db_->getDatabaseFile(); dest_file_subfolder += path.filename().string(); auto dot = dest_file_subfolder.find_last_of("."); @@ -1826,7 +1824,7 @@ void Simulation::setupReports_() const std::string rd_dest_dir = rd.dest_file.substr(0, last_slash); try { - bfs::create_directories(rd_dest_dir); + sfs::create_directories(rd_dest_dir); } catch (const std::exception & ex) { std::cout << " [simdb] An exception was encountered when " << "attempting to create a report verification " @@ -1959,10 +1957,9 @@ ReportDescVec Simulation::expandReportDescriptor_(const ReportDescriptor & rd) c expanded.format = fmt; auto underscore_idx = fmt.find("_"); if (underscore_idx != std::string::npos) { - boost::filesystem::path dest_file_path(expanded.dest_file); auto dot_idx = expanded.dest_file.find("."); const std::string stem = expanded.dest_file.substr(0, dot_idx); - const std::string ext = boost::filesystem::extension(dest_file_path); + const std::string ext = std::filesystem::path(expanded.dest_file).extension(); expanded.dest_file = stem + fmt.substr(underscore_idx) + ext; } rds_out.emplace_back(expanded); @@ -2155,14 +2152,14 @@ void Simulation::attachReportTo_(sparta::ReportRepository::DirectoryHandle direc std::vector search_paths = sim_config_->getReportDefnSearchPaths(); std::string definition_file = def_file; - while (!boost::filesystem::exists(definition_file) && !search_paths.empty()) { - boost::filesystem::path p(search_paths.back()); + while (!std::filesystem::exists(definition_file) && !search_paths.empty()) { + std::filesystem::path p(search_paths.back()); search_paths.pop_back(); p /= def_file; definition_file = p.string(); } - if (!boost::filesystem::exists(definition_file) && search_paths.empty()) { + if (!std::filesystem::exists(definition_file) && search_paths.empty()) { const std::vector & command_line_search_paths = sim_config_->getReportDefnSearchPaths(); diff --git a/sparta/src/SingleUpdateReport.cpp b/sparta/src/SingleUpdateReport.cpp index 2d99b7192d..38ca014979 100644 --- a/sparta/src/SingleUpdateReport.cpp +++ b/sparta/src/SingleUpdateReport.cpp @@ -3,15 +3,14 @@ #include "sparta/report/db/SingleUpdateReport.hpp" #include -#include #include +#include #include "simdb/ObjectManager.hpp" #include "simdb/ObjectRef.hpp" #include "simdb/TableRef.hpp" #include "simdb/utils/ObjectQuery.hpp" #include "sparta/utils/SpartaException.hpp" -#include "zlib.h" #include "simdb/Constraints.hpp" #include "simdb/schema/ColumnTypedefs.hpp" diff --git a/sparta/src/StatisticsArchives.cpp b/sparta/src/StatisticsArchives.cpp index ac2f735ce4..4dc92d4226 100644 --- a/sparta/src/StatisticsArchives.cpp +++ b/sparta/src/StatisticsArchives.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -21,6 +20,7 @@ #include #include #include +#include #include "sparta/statistics/dispatch/archives/ReportStatisticsArchive.hpp" #include "sparta/statistics/dispatch/archives/StatisticsArchives.hpp" @@ -268,12 +268,12 @@ void OfflineArchiveController::saveTo(const std::string & dir) //in the destination directory. const std::string binary_filename = source_archive_dir_ + "/values.bin"; - if (!boost::filesystem::exists(binary_filename)) { + if (!std::filesystem::exists(binary_filename)) { throw SpartaException("Archive file does not exist: ") << binary_filename; } const std::string archive_tree_filename = source_archive_dir_ + "/archive_tree.bin"; - if (!boost::filesystem::exists(archive_tree_filename)) { + if (!std::filesystem::exists(archive_tree_filename)) { throw SpartaException("Archive file does not exist: ") << archive_tree_filename; } @@ -296,19 +296,19 @@ void OfflineArchiveController::saveTo(const std::string & dir) const std::string dest_archive_dir = oss.str(); const std::string new_binary_filename = dest_archive_dir + "/values.bin"; - if (boost::filesystem::exists(new_binary_filename)) { - boost::filesystem::remove(new_binary_filename); + if (std::filesystem::exists(new_binary_filename)) { + std::filesystem::remove(new_binary_filename); } const std::string new_archive_tree_filename = dest_archive_dir + "/archive_tree.bin"; - if (boost::filesystem::exists(new_archive_tree_filename)) { - boost::filesystem::remove(new_archive_tree_filename); + if (std::filesystem::exists(new_archive_tree_filename)) { + std::filesystem::remove(new_archive_tree_filename); } //Create the directories and copy the files over - boost::filesystem::create_directories(dest_archive_dir); - boost::filesystem::copy_file(binary_filename, new_binary_filename); - boost::filesystem::copy_file(archive_tree_filename, new_archive_tree_filename); + std::filesystem::create_directories(dest_archive_dir); + std::filesystem::copy_file(binary_filename, new_binary_filename); + std::filesystem::copy_file(archive_tree_filename, new_archive_tree_filename); } } // namespace statistics diff --git a/sparta/test/CommandLineSimulator/CommandLineSimulator_test.cpp b/sparta/test/CommandLineSimulator/CommandLineSimulator_test.cpp index b706952de4..88b01e49c1 100644 --- a/sparta/test/CommandLineSimulator/CommandLineSimulator_test.cpp +++ b/sparta/test/CommandLineSimulator/CommandLineSimulator_test.cpp @@ -1,12 +1,10 @@ #include "sparta/app/CommandLineSimulator.hpp" -#include +#include #include #include -#include - #include "sparta/sparta.hpp" #include "sparta/simulation/TreeNode.hpp" #include "sparta/app/SimulationConfiguration.hpp" @@ -165,9 +163,9 @@ int main(int argc, char **argv) // Defaults for command line simulator sparta::app::DefaultValues DEFAULTS; #ifndef __APPLE__ - boost::filesystem::path binary_dir = boost::filesystem::canonical("/proc/self/exe" ); - boost::filesystem::path cmd_dir = binary_dir.parent_path().parent_path(); - auto default_arch_dir = (cmd_dir / boost::filesystem::path("parameters/arch")).string(); + std::filesystem::path binary_dir = std::filesystem::canonical("/proc/self/exe" ); + std::filesystem::path cmd_dir = binary_dir.parent_path().parent_path(); + auto default_arch_dir = (cmd_dir / std::filesystem::path("parameters/arch")).string(); #else // BROKEN! auto default_arch_dir = "parameters/arch"; diff --git a/sparta/test/SimDB/SimDB_test.cpp b/sparta/test/SimDB/SimDB_test.cpp index bc54ebf45a..81da6d3620 100644 --- a/sparta/test/SimDB/SimDB_test.cpp +++ b/sparta/test/SimDB/SimDB_test.cpp @@ -18,7 +18,7 @@ #include "sparta/utils/SpartaTester.hpp" #include -#include +#include TEST_INIT @@ -30,10 +30,10 @@ const std::string DB_DIR = "./temp_dbs"; //! RAII for creating and deleting the temp db directory struct DirDeleter { DirDeleter() { - boost::filesystem::create_directories(DB_DIR); + std::filesystem::create_directories(DB_DIR); } ~DirDeleter() { - boost::filesystem::remove_all(DB_DIR); + std::filesystem::remove_all(DB_DIR); } }; diff --git a/sparta/test/SystemC/scheduler.debug.EXPECTED b/sparta/test/SystemC/scheduler.debug.EXPECTED index 6af489b716..a98cc54c5d 100644 --- a/sparta/test/SystemC/scheduler.debug.EXPECTED +++ b/sparta/test/SystemC/scheduler.debug.EXPECTED @@ -3,11 +3,12 @@ #Exe: #SimulatorVersion: #Repro: -#Start: Saturday Sat Jan 7 09:46:49 2023 -#Elapsed: 0.000749s +#Start: Monday Mon Jan 30 17:02:27 2023 +#Elapsed: 0.000775s {0000000000 -------- scheduler debug} Scheduler is firing interal cycle ZERO {0000000000 -------- scheduler debug} Clearing all events {0000000000 -------- scheduler debug} scheduling: fire_event[DependencyTest::fire()] at tick: 1 rel_time: 1 group: 11 continuing: true +{0000000000 -------- scheduler debug} === SCHEDULER: Run called num_ticks: 2 exacting_run: 1 {0000000000 -------- scheduler debug} scheduling: Scheduler::stopRunning() at tick: 1 rel_time: 1 group: 0 continuing: true {0000000000 -------- scheduler debug} === SCHEDULER: Next tick boundary 1 === {0000000000 -------- scheduler debug} Scheduler's event tree for tick: 1 @@ -31,6 +32,7 @@ {0000000000 -------- scheduler debug} Scheduler's event tree for tick: 1 {0000000000 -------- scheduler debug} Group[zero]: Scheduler::stopRunning() {0000000000 -------- scheduler debug} --> SCHEDULER: Firing Scheduler::stopRunning() at time: 1 group: 19 +{0000000000 -------- scheduler debug} === SCHEDULER: Run called num_ticks: 50 exacting_run: 1 {0000000000 -------- scheduler debug} scheduling: Scheduler::stopRunning() at tick: 51 rel_time: 49 group: 0 continuing: true {0000000000 -------- scheduler debug} === SCHEDULER: Next tick boundary 51 === {0000000000 -------- scheduler debug} Scheduler's event tree for tick: 51