Skip to content

Commit 2f9262e

Browse files
committed
Merge branch 'develop' into hyper-1f0
2 parents 058b96c + c6254fb commit 2f9262e

File tree

21,025 files changed

+376901
-391505
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

21,025 files changed

+376901
-391505
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ If this is a **feature request**, show what you expect to happen if the feature
2525

2626

2727
#### Current Version:
28-
v4.7.0
28+
v4.8.1

.github/workflows/header_checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- uses: actions/checkout@v4
30-
- uses: actions/setup-python@v4
30+
- uses: actions/setup-python@v5
3131
with:
3232
python-version: '3.x'
3333

.github/workflows/main.yml

Lines changed: 13 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- uses: actions/checkout@v4
28-
- uses: actions/setup-python@v4
28+
- uses: actions/setup-python@v5
2929
with:
3030
python-version: '3.x'
3131
- uses: r-lib/actions/setup-r@v2
@@ -35,21 +35,12 @@ jobs:
3535
- name: Set path for Rtools40
3636
if: runner.os == 'Windows'
3737
run: echo "C:/rtools40/usr/bin;C:/rtools40/mingw64/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
38-
- name: Install mingw32-make and check toolchain path
39-
if: runner.os == 'Windows'
40-
run: |
41-
pacman -Syu mingw-w64-x86_64-make --noconfirm
42-
g++ --version
43-
Get-Command g++ | Select-Object -ExpandProperty Definition
44-
mingw32-make --version
45-
Get-Command mingw32-make | Select-Object -ExpandProperty Definition
46-
shell: powershell
4738

4839
- name: Build Math libs
4940
shell: powershell
5041
run: |
5142
Add-Content make\local "O=1`n"
52-
mingw32-make -f make/standalone math-libs -j2
43+
make -f make/standalone math-libs -j2
5344
- name: Add TBB to PATH
5445
shell: powershell
5546
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -63,7 +54,7 @@ jobs:
6354
python.exe runTests.py -j2 test/unit/math/memory
6455
6556
- name: Upload gtest_output xml
66-
uses: actions/upload-artifact@v3
57+
uses: actions/upload-artifact@v4
6758
if: failure()
6859
with:
6960
name: gtest_outputs_xml
@@ -75,7 +66,7 @@ jobs:
7566

7667
steps:
7768
- uses: actions/checkout@v4
78-
- uses: actions/setup-python@v4
69+
- uses: actions/setup-python@v5
7970
with:
8071
python-version: '3.x'
8172
- uses: r-lib/actions/setup-r@v2
@@ -85,21 +76,12 @@ jobs:
8576
- name: Set path for Rtools40
8677
if: runner.os == 'Windows'
8778
run: echo "C:/rtools40/usr/bin;C:/rtools40/mingw64/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
88-
- name: Install mingw32-make and check toolchain path
89-
if: runner.os == 'Windows'
90-
run: |
91-
pacman -Syu mingw-w64-x86_64-make --noconfirm
92-
g++ --version
93-
Get-Command g++ | Select-Object -ExpandProperty Definition
94-
mingw32-make --version
95-
Get-Command mingw32-make | Select-Object -ExpandProperty Definition
96-
shell: powershell
9779

9880
- name: Build Math libs
9981
shell: powershell
10082
run: |
10183
Add-Content make\local "O=1`n"
102-
mingw32-make -f make/standalone math-libs -j2
84+
make -f make/standalone math-libs -j2
10385
- name: Add TBB to PATH
10486
shell: powershell
10587
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -117,7 +99,7 @@ jobs:
11799
python.exe runTests.py test/unit/math/mix/*_test.cpp -j2
118100
119101
- name: Upload gtest_output xml
120-
uses: actions/upload-artifact@v3
102+
uses: actions/upload-artifact@v4
121103
if: failure()
122104
with:
123105
name: gtest_outputs_xml
@@ -129,7 +111,7 @@ jobs:
129111

130112
steps:
131113
- uses: actions/checkout@v4
132-
- uses: actions/setup-python@v4
114+
- uses: actions/setup-python@v5
133115
with:
134116
python-version: '3.x'
135117
- uses: r-lib/actions/setup-r@v2
@@ -139,21 +121,12 @@ jobs:
139121
- name: Set path for Rtools40
140122
if: runner.os == 'Windows'
141123
run: echo "C:/rtools40/usr/bin;C:/rtools40/mingw64/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
142-
- name: Install mingw32-make and check toolchain path
143-
if: runner.os == 'Windows'
144-
run: |
145-
pacman -Syu mingw-w64-x86_64-make --noconfirm
146-
g++ --version
147-
Get-Command g++ | Select-Object -ExpandProperty Definition
148-
mingw32-make --version
149-
Get-Command mingw32-make | Select-Object -ExpandProperty Definition
150-
shell: powershell
151124

152125
- name: Build Math libs
153126
shell: powershell
154127
run: |
155128
Add-Content make\local "O=1`n"
156-
mingw32-make -f make/standalone math-libs -j2
129+
make -f make/standalone math-libs -j2
157130
- name: Add TBB to PATH
158131
shell: powershell
159132
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -166,19 +139,19 @@ jobs:
166139
python.exe runTests.py $MixFunTests[0..$HalfNumberTests]
167140
168141
- name: Upload gtest_output xml
169-
uses: actions/upload-artifact@v3
142+
uses: actions/upload-artifact@v4
170143
if: failure()
171144
with:
172145
name: gtest_outputs_xml
173146
path: '**/*_test.xml'
174-
147+
175148
mix-fun-2:
176149
name: mix/fun tests 2
177150
runs-on: windows-latest
178151

179152
steps:
180153
- uses: actions/checkout@v4
181-
- uses: actions/setup-python@v4
154+
- uses: actions/setup-python@v5
182155
with:
183156
python-version: '3.x'
184157
- uses: r-lib/actions/setup-r@v2
@@ -188,21 +161,12 @@ jobs:
188161
- name: Set path for Rtools40
189162
if: runner.os == 'Windows'
190163
run: echo "C:/rtools40/usr/bin;C:/rtools40/mingw64/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
191-
- name: Install mingw32-make and check toolchain path
192-
if: runner.os == 'Windows'
193-
run: |
194-
pacman -Syu mingw-w64-x86_64-make --noconfirm
195-
g++ --version
196-
Get-Command g++ | Select-Object -ExpandProperty Definition
197-
mingw32-make --version
198-
Get-Command mingw32-make | Select-Object -ExpandProperty Definition
199-
shell: powershell
200164

201165
- name: Build Math libs
202166
shell: powershell
203167
run: |
204168
Add-Content make\local "O=1`n"
205-
mingw32-make -f make/standalone math-libs -j2
169+
make -f make/standalone math-libs -j2
206170
- name: Add TBB to PATH
207171
shell: powershell
208172
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -215,7 +179,7 @@ jobs:
215179
python.exe runTests.py $MixFunTests[($HalfNumberTests + 1)..($NumberTests - 1)]
216180
217181
- name: Upload gtest_output xml
218-
uses: actions/upload-artifact@v3
182+
uses: actions/upload-artifact@v4
219183
if: failure()
220184
with:
221185
name: gtest_outputs_xml

Jenkinsfile

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import org.stan.Utils
44

55
def runTests(String testPath, boolean jumbo = false) {
66
try {
7+
sh "cat make/local"
78
if (jumbo && !params.disableJumbo) {
89
sh "python3 runTests.py -j${env.PARALLEL} ${testPath} --jumbo --debug"
910
} else {
@@ -44,6 +45,8 @@ pipeline {
4445
skipDefaultCheckout()
4546
preserveStashes(buildCount: 7)
4647
parallelsAlwaysFailFast()
48+
buildDiscarder(logRotator(numToKeepStr: '20', daysToKeepStr: '30'))
49+
disableConcurrentBuilds(abortPrevious: true)
4750
}
4851
environment {
4952
STAN_NUM_THREADS = 4
@@ -65,18 +68,6 @@ pipeline {
6568
}
6669
stages {
6770

68-
stage('Kill previous builds') {
69-
when {
70-
not { branch 'develop' }
71-
not { branch 'master' }
72-
}
73-
steps {
74-
script {
75-
utils.killOldBuilds()
76-
}
77-
}
78-
}
79-
8071
stage("Clang-format") {
8172
agent {
8273
docker {
@@ -203,9 +194,11 @@ pipeline {
203194
}
204195

205196
steps {
206-
unstash 'MathSetup'
207-
sh "echo CXX=${CLANG_CXX} -Werror > make/local"
208-
sh "make -j${PARALLEL} test-headers"
197+
retry(1){
198+
unstash 'MathSetup'
199+
sh "echo CXX=${CLANG_CXX} -Werror > make/local"
200+
sh "make -j${PARALLEL} test-headers"
201+
}
209202
}
210203
post { always { deleteDir() } }
211204
}
@@ -352,6 +345,7 @@ pipeline {
352345
runTests("test/unit/multiple_translation_units_test.cpp")
353346
}
354347
}
348+
post { always { retry(3) { deleteDir() } } }
355349
}
356350
}
357351
}
@@ -401,13 +395,15 @@ pipeline {
401395
sh "python ./test/varmat_compatibility_test.py"
402396
withEnv(['PATH+TBB=./lib/tbb']) {
403397
sh "python ./test/expressions/test_expression_testing_framework.py"
398+
sh "cat make/local"
404399
try { sh "./runTests.py -j${PARALLEL} test/expressions" }
405400
finally { junit 'test/**/*.xml' }
406401
}
407402
sh "make clean-all"
408403
sh "echo STAN_THREADS=true >> make/local"
409404
withEnv(['PATH+TBB=./lib/tbb']) {
410405
try {
406+
sh "cat make/local"
411407
sh "./runTests.py -j${PARALLEL} test/expressions --only-functions reduce_sum map_rect"
412408
}
413409
finally { junit 'test/**/*.xml' }
@@ -426,19 +422,21 @@ pipeline {
426422
}
427423
steps {
428424
script {
429-
unstash 'MathSetup'
430-
sh "echo CXX=${CLANG_CXX} -Werror > make/local"
431-
sh "echo STAN_THREADS=true >> make/local"
432-
sh "export STAN_NUM_THREADS=4"
433-
if (isBranch('develop') || isBranch('master')) {
434-
runTests("test/unit")
435-
sh "find . -name *_test.xml | xargs rm"
436-
} else {
437-
runTests("test/unit -f thread")
438-
sh "find . -name *_test.xml | xargs rm"
439-
runTests("test/unit -f map_rect")
440-
sh "find . -name *_test.xml | xargs rm"
441-
runTests("test/unit -f reduce_sum")
425+
retry(1){
426+
unstash 'MathSetup'
427+
sh "echo CXX=${CLANG_CXX} -Werror > make/local"
428+
sh "echo STAN_THREADS=true >> make/local"
429+
sh "export STAN_NUM_THREADS=4"
430+
if (isBranch('develop') || isBranch('master')) {
431+
runTests("test/unit")
432+
sh "find . -name *_test.xml | xargs rm"
433+
} else {
434+
runTests("test/unit -f thread")
435+
sh "find . -name *_test.xml | xargs rm"
436+
runTests("test/unit -f map_rect")
437+
sh "find . -name *_test.xml | xargs rm"
438+
runTests("test/unit -f reduce_sum")
439+
}
442440
}
443441
}
444442
}
@@ -504,6 +502,7 @@ pipeline {
504502
sh "echo CXXFLAGS+=-DSTAN_PROB_TEST_ALL >> make/local"
505503
}
506504
}
505+
sh "cat make/local"
507506
sh "./runTests.py -j${PARALLEL} ${names}"
508507
}
509508
deleteDir()

RELEASE-NOTES.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
Stan Math Library Release Notes
22

3+
======================================================================
4+
v4.8.1 (23 January 2024)
5+
======================================================================
6+
7+
- The distributions defined over cholesky factors now check that their arguments are in support (#3007)
8+
- Fixed an issue with the `inv_wishart_cholesky_rng` function (#3007)
9+
10+
======================================================================
11+
v4.8.0 (16 January 2024)
12+
======================================================================
13+
14+
- Updated Boost headers to v1.81 (#2955)
15+
- Added the Dirichlet-Multinomial distribution to the Stan Math library (dirichlet_multinomial_lpmf, dirichlet_multinomial_log, and dirichlet_multinomial_rng). (#2979)
16+
- `binomial_logit_glm_lpmf` distribution added (#2946)
17+
- Improved numerical stability of Bernoulli CDF functions (#2784)
18+
- Replaced the `std::vector`s for read/write events in `matrix_cl` with `tbb::concurrent_vectors` (#2905)
19+
- Added framework for generic higher-order autodiff support through finite-differences. (#2929)
20+
- Minor cleanup of numerical stability, constants, compound functions in OpenCL kernels (#2934)
21+
- Fixes aliasing issue in adjoint acccumulation for OpenCL (#2943)
22+
- Improve numerical stability of `binomial_logit` distribution (#2945)
23+
- Automatically detect UCRT toolchain use on Windows (#2948)
24+
- Update multiple functions to delegate to the compound functions (`log1p_exp`, etc.) where possible (#2950)
25+
- Fixed the RPATH to the TBB library being passed twice on the command line (#2952)
26+
- Split `eigendecompose` mix tests to fix CI memory issues (#2953)
27+
- Fix distribution test failures with row-vector integer inputs to bernoulli CDF functions (#2954)
28+
- Simplified usage of ref-type deduction (#2958)
29+
- Added OpenCL support for the `binomial_logit_glm` distribution (#2960)
30+
- Fixed a build configuration issue where the optional tbbmalloc and tbbmalloc_proxy libraries were built unconditionally. (#2969)
31+
- Remove unused meta requires (#2976)
32+
- Bugfix for uninitialized `var_value<Matrix>` types and assignment when the rhs of the assignment is an expression (#2978)
33+
- Invert the input matrix in-place which reduces the memory requirement for this function. (#2981)
34+
- Fixes the rng function for the Inverse Wishart Cholesky distribution. (#2984)
35+
- Fixed a compilation issue with the `check_symmetric` function on complex-valued inputs under LLVM 17 (#2991)
36+
- Fixed missing include guard for OpenCL rev headers (#2996)
37+
- Add helpful context to the failure message for the ad testing framework (#2997)
38+
339
======================================================================
440
v4.7.0 (5 September 2023)
541
======================================================================

benchmarks/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python3
22
from __future__ import print_function
33

44
import itertools

doxygen/doxygen.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ PROJECT_NAME = "Stan Math Library"
4848
# could be handy for archiving the generated documentation or if some version
4949
# control system is used.
5050

51-
PROJECT_NUMBER = 4.7.0
51+
PROJECT_NUMBER = 4.8.1
5252

5353
# Using the PROJECT_BRIEF tag one can provide an optional one line description
5454
# for a project that appears at the top of each page and should give viewer a

0 commit comments

Comments
 (0)