Skip to content

Commit 7d3a05d

Browse files
committed
Merge remote-tracking branch 'origin/master' into knutel/doc_updates
2 parents 95ae866 + 45621c7 commit 7d3a05d

24 files changed

+391
-183
lines changed

.azure-pipelines/azure-pipelines-osx.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
jobs:
66
- job: osx
77
pool:
8-
vmImage: macOS-12
8+
vmImage: macOS-13
99
strategy:
1010
matrix:
1111
osx_64_:

.ci_support/linux_64_.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ c_compiler:
55
c_compiler_version:
66
- '13'
77
cdt_name:
8-
- cos7
8+
- conda
99
channel_sources:
1010
- conda-forge
1111
channel_targets:
@@ -15,7 +15,7 @@ cxx_compiler:
1515
cxx_compiler_version:
1616
- '13'
1717
docker_image:
18-
- quay.io/condaforge/linux-anvil-cos7-x86_64
18+
- quay.io/condaforge/linux-anvil-x86_64:alma9
1919
hdf5:
2020
- 1.14.3
2121
linux_clang_version:

.ci_support/osx_64_.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
MACOSX_DEPLOYMENT_TARGET:
2-
- '11.1'
2+
- '14.5'
33
MACOSX_SDK_VERSION:
4-
- '11.1'
4+
- '14.5'
55
boost:
66
- '1.78'
77
c_compiler:
88
- clang
99
c_compiler_version:
10-
- '17'
10+
- '18'
1111
channel_sources:
1212
- conda-forge
1313
channel_targets:
1414
- conda-forge main
1515
cxx_compiler:
1616
- clangxx
1717
cxx_compiler_version:
18-
- '17'
18+
- '18'
1919
hdf5:
2020
- 1.14.3
2121
macos_machine:

.ci_support/osx_arm64_.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
MACOSX_DEPLOYMENT_TARGET:
2-
- '11.1'
2+
- '14.5'
33
MACOSX_SDK_VERSION:
4-
- '11.1'
4+
- '14.5'
55
boost:
66
- '1.78'
77
c_compiler:
88
- clang
99
c_compiler_version:
10-
- '17'
10+
- '18'
1111
channel_sources:
1212
- conda-forge
1313
channel_targets:
1414
- conda-forge main
1515
cxx_compiler:
1616
- clangxx
1717
cxx_compiler_version:
18-
- '17'
18+
- '18'
1919
hdf5:
2020
- 1.14.3
2121
macos_machine:

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
environment:
1313
- CONFIG: "linux_64_"
1414
- UPLOAD_PACKAGES: "False"
15-
DOCKER_IMAGE: "quay.io/condaforge/linux-anvil-cos7-x86_64"
15+
DOCKER_IMAGE: "quay.io/condaforge/linux-anvil-x86_64:alma9"
1616
steps:
1717
- checkout
1818
- run:

.scripts/build_steps.sh

+9-7
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,20 @@ pkgs_dirs:
3131
solver: libmamba
3232
3333
CONDARC
34+
mv /opt/conda/conda-meta/history /opt/conda/conda-meta/history.$(date +%Y-%m-%d-%H-%M-%S)
35+
echo > /opt/conda/conda-meta/history
36+
micromamba install --root-prefix ~/.conda --prefix /opt/conda \
37+
--yes --override-channels --channel conda-forge --strict-channel-priority \
38+
pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1"
3439
export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1
3540

36-
mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \
37-
pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1"
38-
mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \
39-
pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1"
40-
4141
# set up the condarc
4242
setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
4343

4444
source run_conda_forge_build_setup
4545

46+
47+
4648
# make the build number clobber
4749
make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
4850

@@ -71,8 +73,8 @@ else
7173
--extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}"
7274
( startgroup "Inspecting artifacts" ) 2> /dev/null
7375

74-
# inspect_artifacts was only added in conda-forge-ci-setup 4.6.0
75-
command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0"
76+
# inspect_artifacts was only added in conda-forge-ci-setup 4.9.4
77+
command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir "${RECIPE_ROOT}" -m "${CONFIG_FILE}" || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4"
7678

7779
( endgroup "Inspecting artifacts" ) 2> /dev/null
7880

.scripts/run_osx_build.sh

+28-17
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,39 @@ source .scripts/logging_utils.sh
77
set -xe
88

99
MINIFORGE_HOME=${MINIFORGE_HOME:-${HOME}/miniforge3}
10+
MINIFORGE_HOME=${MINIFORGE_HOME%/} # remove trailing slash
1011

11-
( startgroup "Installing a fresh version of Miniforge" ) 2> /dev/null
12-
13-
MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download"
14-
MINIFORGE_FILE="Miniforge3-MacOSX-$(uname -m).sh"
15-
curl -L -O "${MINIFORGE_URL}/${MINIFORGE_FILE}"
16-
rm -rf ${MINIFORGE_HOME}
17-
bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME}
18-
19-
( endgroup "Installing a fresh version of Miniforge" ) 2> /dev/null
12+
( startgroup "Provisioning base env with micromamba" ) 2> /dev/null
13+
MICROMAMBA_VERSION="1.5.10-0"
14+
if [[ "$(uname -m)" == "arm64" ]]; then
15+
osx_arch="osx-arm64"
16+
else
17+
osx_arch="osx-64"
18+
fi
19+
MICROMAMBA_URL="https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-${osx_arch}"
20+
MAMBA_ROOT_PREFIX="${MINIFORGE_HOME}-micromamba-$(date +%s)"
21+
echo "Downloading micromamba ${MICROMAMBA_VERSION}"
22+
micromamba_exe="$(mktemp -d)/micromamba"
23+
curl -L -o "${micromamba_exe}" "${MICROMAMBA_URL}"
24+
chmod +x "${micromamba_exe}"
25+
echo "Creating environment"
26+
"${micromamba_exe}" create --yes --root-prefix "${MAMBA_ROOT_PREFIX}" --prefix "${MINIFORGE_HOME}" \
27+
--channel conda-forge \
28+
pip python=3.12 conda-build conda-forge-ci-setup=4 "conda-build>=24.1"
29+
echo "Moving pkgs cache from ${MAMBA_ROOT_PREFIX} to ${MINIFORGE_HOME}"
30+
mv "${MAMBA_ROOT_PREFIX}/pkgs" "${MINIFORGE_HOME}"
31+
echo "Cleaning up micromamba"
32+
rm -rf "${MAMBA_ROOT_PREFIX}" "${micromamba_exe}" || true
33+
( endgroup "Provisioning base env with micromamba" ) 2> /dev/null
2034

2135
( startgroup "Configuring conda" ) 2> /dev/null
22-
23-
source ${MINIFORGE_HOME}/etc/profile.d/conda.sh
36+
echo "Activating environment"
37+
source "${MINIFORGE_HOME}/etc/profile.d/conda.sh"
2438
conda activate base
2539
export CONDA_SOLVER="libmamba"
2640
export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1
2741

28-
mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \
29-
pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1"
30-
mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \
31-
pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1"
42+
3243

3344

3445

@@ -84,8 +95,8 @@ else
8495

8596
( startgroup "Inspecting artifacts" ) 2> /dev/null
8697

87-
# inspect_artifacts was only added in conda-forge-ci-setup 4.6.0
88-
command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0"
98+
# inspect_artifacts was only added in conda-forge-ci-setup 4.9.4
99+
command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts --recipe-dir ./conda.recipe -m ./.ci_support/${CONFIG}.yaml || echo "inspect_artifacts needs conda-forge-ci-setup >=4.9.4"
89100

90101
( endgroup "Inspecting artifacts" ) 2> /dev/null
91102

azure-pipelines.yml

+27-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,30 @@
22
# update the conda-forge.yml and/or the recipe/meta.yaml.
33
# -*- mode: yaml -*-
44

5-
jobs:
6-
- template: ./.azure-pipelines/azure-pipelines-osx.yml
5+
stages:
6+
- stage: Check
7+
jobs:
8+
- job: Skip
9+
pool:
10+
vmImage: 'ubuntu-22.04'
11+
variables:
12+
DECODE_PERCENTS: 'false'
13+
RET: 'true'
14+
steps:
15+
- checkout: self
16+
fetchDepth: '2'
17+
- bash: |
18+
git_log=`git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " "`
19+
echo "##vso[task.setvariable variable=log]$git_log"
20+
displayName: Obtain commit message
21+
- bash: echo "##vso[task.setvariable variable=RET]false"
22+
condition: and(eq(variables['Build.Reason'], 'PullRequest'), or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]')))
23+
displayName: Skip build?
24+
- bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET"
25+
name: result
26+
displayName: Export result
27+
- stage: Build
28+
condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true'))
29+
dependsOn: Check
30+
jobs:
31+
- template: ./.azure-pipelines/azure-pipelines-osx.yml

conda.recipe/conda_build_config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
macos_machine: # [osx]
2626
- arm64-apple-darwin20.0.0 # [osx and arm64]
2727
MACOSX_DEPLOYMENT_TARGET: # [osx]
28-
- 11.1 # [osx]
28+
- 14.5 # [osx]
2929

3030
# linux_clang_version is not a part of zip_keys
3131
# from conda-forge, if you want to, you can

sparta/.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ build*
1111
[Ff]ast[Dd]ebug*
1212
cmake-build-*
1313
*~
14-
compile_commands.json
14+
compile_commands.json
15+
.vscode

sparta/CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,15 @@ if (ENABLE_SANITIZERS)
157157
set (CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined")
158158
endif ()
159159

160+
set(CMAKE_CXX_FLAGS_PROFILE "-O3 -pg -g")
161+
if(DEFINED SPARTA_CXX_FLAGS_DEBUG AND SPARTA_CXX_FLAGS_DEBUG)
162+
set(CMAKE_CXX_FLAGS_DEBUG "${SPARTA_CXX_FLAGS_DEBUG}")
163+
message(STATUS "Using Sparta custom debug flags: ${CMAKE_CXX_FLAGS_DEBUG}")
164+
else()
165+
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3")
166+
message(STATUS "Using Sparta default debug flags: ${CMAKE_CXX_FLAGS_DEBUG}")
167+
endif()
168+
160169
#
161170
# If we're using CONDA, we might be using the one suggested for
162171
# Sparta. Need to use the llvm-ar found in the conda package to

sparta/sparta/events/EventNode.hpp

+29
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,42 @@ namespace sparta
9797
//! Get the scheduleable associated with this event node
9898
virtual Scheduleable & getScheduleable() = 0;
9999

100+
/**
101+
* \brief Turn on/off auto precedence for this EvendNode
102+
* \param participate Set to true [default] if the EventNode is to
103+
* participate in auto precedence establishment
104+
* in sparta::Unit
105+
*
106+
* In sparta::Unit, registered sparta::Event types and Ports will
107+
* have auto precedence established between them if the user
108+
* of sparta::Unit allows it to do so. However, this might not
109+
* be desired for some Events that are created by the modeler
110+
* and internally bound before the sparta::Unit performs this
111+
* setup. Calling this method with participate set to false,
112+
* will prevent the assertion that the EventNode is be being
113+
* registered after port binding.
114+
*/
115+
virtual void participateInAutoPrecedence(bool participate) {
116+
participate_in_auto_precedence_ = participate;
117+
}
118+
119+
//! \brief Does this EventNode participate in auto-precedence
120+
//! establishment by sparta::Unit?
121+
//! \return true if so, false otherwise
122+
virtual bool doesParticipateInAutoPrecedence() const {
123+
return participate_in_auto_precedence_;
124+
}
125+
100126
private:
101127

102128
//! Make sure the parent is an EventNodeSet
103129
void ensureParentIsEventSet_(sparta::TreeNode* parent);
104130

105131
//! Scheduling phase of this node
106132
const sparta::SchedulingPhase sched_phase_;
133+
134+
//! Does this EventNode participate in auto precedence?
135+
bool participate_in_auto_precedence_ = true;
107136
};
108137
}
109138

0 commit comments

Comments
 (0)