Skip to content

Commit

Permalink
Fix for issue #311: Make an StatisticInstance report reference (#456)
Browse files Browse the repository at this point in the history
* Major cleanup on SI; deleted dead file; added failing test
* Moved more Report code to source; removed duplicate pragma once
* Moved stuff around to support SI injection
* Added awareness of previous SIs
* Finished the self-referring SI impl and testing
* Re-render conda environment

A note: After the ravamped design of SI, this added a new seg fault. 
In a nutshell, vector reference won't work.  Didn't realize that the vector of 
SIs would grow AFTER passing these objects to sub reports.
  • Loading branch information
klingaard authored Nov 27, 2023
1 parent 050a860 commit e876f58
Show file tree
Hide file tree
Showing 40 changed files with 1,256 additions and 1,118 deletions.
3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
# TODO: Fast finish on azure pipelines?
- script: |
export CI=azure
export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt)
export remote_url=$(Build.Repository.Uri)
export sha=$(Build.SourceVersion)
export OSX_FORCE_SDK_DOWNLOAD="1"
export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME
export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME})
Expand Down
2 changes: 1 addition & 1 deletion .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cxx_compiler_version:
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
hdf5:
- 1.12.2
- 1.14.2
linux_clang_version:
- '15'
numpy:
Expand Down
6 changes: 3 additions & 3 deletions .ci_support/osx_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ boost_cpp:
c_compiler:
- clang
c_compiler_version:
- '15'
- '16'
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- clangxx
cxx_compiler_version:
- '15'
- '16'
hdf5:
- 1.12.2
- 1.14.2
macos_machine:
- x86_64-apple-darwin13.4.0
numpy:
Expand Down
6 changes: 3 additions & 3 deletions .ci_support/osx_arm64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ boost_cpp:
c_compiler:
- clang
c_compiler_version:
- '15'
- '16'
channel_sources:
- conda-forge
channel_targets:
- conda-forge main
cxx_compiler:
- clangxx
cxx_compiler_version:
- '15'
- '16'
hdf5:
- 1.12.2
- 1.14.2
macos_machine:
- arm64-apple-darwin20.0.0
numpy:
Expand Down
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
# Run, test and (if we have a BINSTAR_TOKEN) upload the distributions.
command: |
export CI=circle
export flow_run_id="circle_$CIRCLE_WORKFLOW_ID"
export remote_url="$CIRCLE_REPOSITORY_URL"
export sha="$CIRCLE_SHA1"
export FEEDSTOCK_NAME=$(basename ${CIRCLE_PROJECT_REPONAME})
if [[ "${CIRCLE_PR_NUMBER:-}" == "" ]]; then
export IS_PR_BUILD="False"
Expand Down
20 changes: 14 additions & 6 deletions .scripts/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ conda-build:
pkgs_dirs:
- ${FEEDSTOCK_ROOT}/build_artifacts/pkg_cache
- /opt/conda/pkgs
solver: libmamba
CONDARC
export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1


mamba install --update-specs --yes --quiet --channel conda-forge \
conda-build pip boa conda-forge-ci-setup=3
mamba update --update-specs --yes --quiet --channel conda-forge \
conda-build pip boa conda-forge-ci-setup=3
mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \
pip mamba conda-build boa conda-forge-ci-setup=4
mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \
pip mamba conda-build boa conda-forge-ci-setup=4

# set up the condarc
setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
Expand All @@ -53,6 +54,12 @@ if [[ -f "${FEEDSTOCK_ROOT}/LICENSE.txt" ]]; then
cp "${FEEDSTOCK_ROOT}/LICENSE.txt" "${RECIPE_ROOT}/recipe-scripts-license.txt"
fi

if [[ "${sha:-}" == "" ]]; then
pushd ${FEEDSTOCK_ROOT}
sha=$(git rev-parse HEAD)
popd
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}"
Expand All @@ -66,7 +73,8 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then
else
conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \
--suppress-variables ${EXTRA_CB_OPTIONS:-} \
--clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml"
--clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \
--extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}"

( startgroup "Uploading packages" ) 2> /dev/null

Expand Down
4 changes: 2 additions & 2 deletions .scripts/logging_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function startgroup {
echo "##[group]$1";;
travis )
echo "$1"
echo -en 'travis_fold:start:'"${1// /}"'\\r';;
echo -en 'travis_fold:start:'"${1// /}"'\r';;
github_actions )
echo "::group::$1";;
* )
Expand All @@ -28,7 +28,7 @@ function endgroup {
azure )
echo "##[endgroup]";;
travis )
echo -en 'travis_fold:end:'"${1// /}"'\\r';;
echo -en 'travis_fold:end:'"${1// /}"'\r';;
github_actions )
echo "::endgroup::";;
esac
Expand Down
3 changes: 3 additions & 0 deletions .scripts/run_docker_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ docker run ${DOCKER_RUN_ARGS} \
-e CPU_COUNT \
-e BUILD_WITH_CONDA_DEBUG \
-e BUILD_OUTPUT_ID \
-e flow_run_id \
-e remote_url \
-e sha \
-e BINSTAR_TOKEN \
"${DOCKER_IMAGE}" \
bash \
Expand Down
19 changes: 13 additions & 6 deletions .scripts/run_osx_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME}

source ${MINIFORGE_HOME}/etc/profile.d/conda.sh
conda activate base
export CONDA_SOLVER="libmamba"
export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1

mamba install --update-specs --quiet --yes --channel conda-forge \
conda-build pip boa conda-forge-ci-setup=3
mamba update --update-specs --yes --quiet --channel conda-forge \
conda-build pip boa conda-forge-ci-setup=3
mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \
pip mamba conda-build boa conda-forge-ci-setup=4
mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \
pip mamba conda-build boa conda-forge-ci-setup=4



Expand All @@ -45,6 +47,10 @@ else
echo -e "\n\nNot mangling homebrew as we are not running in CI"
fi

if [[ "${sha:-}" == "" ]]; then
sha=$(git rev-parse HEAD)
fi

echo -e "\n\nRunning the build setup script."
source run_conda_forge_build_setup

Expand All @@ -55,7 +61,6 @@ source run_conda_forge_build_setup
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
Expand All @@ -71,9 +76,11 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then
# Drop into an interactive shell
/bin/bash
else

conda mambabuild ./conda.recipe -m ./.ci_support/${CONFIG}.yaml \
--suppress-variables ${EXTRA_CB_OPTIONS:-} \
--clobber-file ./.ci_support/clobber_${CONFIG}.yaml
--clobber-file ./.ci_support/clobber_${CONFIG}.yaml \
--extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha"

( startgroup "Uploading packages" ) 2> /dev/null

Expand Down
1 change: 1 addition & 0 deletions sparta/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ list (APPEND SourceCppFiles
src/SingleUpdateReport.cpp
src/SINodeHierarchy.cpp
src/StatisticDef.cpp
src/StatisticInstance.cpp
src/StatisticsArchives.cpp
src/StatisticsStreams.cpp
src/StatsMapping.cpp
Expand Down
2 changes: 0 additions & 2 deletions sparta/python/sparta_support/module_sparta.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,5 +865,3 @@ class PortWrapper{
return inport;
}
};

#pragma once
Loading

0 comments on commit e876f58

Please sign in to comment.