Skip to content

Commit 19f5f25

Browse files
rok-cesnovarserban-nicusor-toptalserban-nicusor-catena
authored
Feature/1879 refactor jenkins stages (#1881)
* Fixed typo in release notes * Revert "release/v2.21.0: updating version numbers" This reverts commit a50deb9. * Fixed conflict in stan/math/prim/fun/log_softmax.hpp * Updated math version * Reverted release of 3.1.1 * Fixed conflict in stan/math/prim/fun/log_softmax.hpp * Fixed conflict in stan/math/prim/fun/log_softmax.hpp * Updated math to v3.1.1 * Reverted release 3.1.1 * Fixed conflict in stan/math/prim/fun/log_softmax.hpp * Fixed conflict in stan/math/prim/fun/log_softmax.hpp * Release v3.1.1 * refactor jenkins steps * branch in full unit * fix jenkins syntax * jenkins syntax Co-authored-by: Nicusor Serban <48496524+serban-nicusor-toptal@users.noreply.github.com> Co-authored-by: serban-nicusor-toptal <serban.nicusor@toptal.com> Co-authored-by: Nicusor Serban <nicusor.serban@catenamedia.com>
1 parent 6025c33 commit 19f5f25

File tree

2 files changed

+60
-32
lines changed

2 files changed

+60
-32
lines changed

Jenkinsfile

Lines changed: 60 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -175,15 +175,24 @@ pipeline {
175175
}
176176
post { always { deleteDir() } }
177177
}
178-
stage('Linux Unit with MPI') {
179-
agent { label 'linux && mpi' }
178+
stage('Full Unit Tests') {
179+
agent any
180180
steps {
181-
deleteDir()
182-
unstash 'MathSetup'
183-
sh "echo CXX=${MPICXX} >> make/local"
184-
sh "echo CXX_TYPE=gcc >> make/local"
185-
sh "echo STAN_MPI=true >> make/local"
186-
runTests("test/unit")
181+
script {
182+
if (isUnix()) {
183+
deleteDir()
184+
unstash 'MathSetup'
185+
runTests("test/unit/math/prim")
186+
runTests("test/unit/math/rev")
187+
runTests("test/unit")
188+
} else {
189+
deleteDirWin()
190+
unstash 'MathSetup'
191+
runTestsWin("test/unit/math/prim")
192+
runTestsWin("test/unit/math/rev")
193+
runTestsWin("test/unit")
194+
}
195+
}
187196
}
188197
post { always { retry(3) { deleteDir() } } }
189198
}
@@ -194,7 +203,20 @@ pipeline {
194203
}
195204
}
196205
parallel {
197-
stage('Full unit with GPU') {
206+
stage('MPI tests') {
207+
agent { label 'linux && mpi' }
208+
steps {
209+
deleteDir()
210+
unstash 'MathSetup'
211+
sh "echo CXX=${MPICXX} >> make/local"
212+
sh "echo CXX_TYPE=gcc >> make/local"
213+
sh "echo STAN_MPI=true >> make/local"
214+
runTests("test/unit/math/prim/functor")
215+
runTests("test/unit/math/rev/functor")
216+
}
217+
post { always { retry(3) { deleteDir() } } }
218+
}
219+
stage('OpenCL tests') {
198220
agent { label "gpu" }
199221
steps {
200222
deleteDir()
@@ -204,7 +226,13 @@ pipeline {
204226
sh "echo OPENCL_PLATFORM_ID=0>> make/local"
205227
sh "echo OPENCL_DEVICE_ID=${OPENCL_DEVICE_ID}>> make/local"
206228
sh "make -j${env.PARALLEL} test-headers"
207-
runTests("test/unit")
229+
runTests("test/unit/math/opencl")
230+
runTests("test/unit/math/prim/fun/gp_exp_quad_cov_test")
231+
runTests("test/unit/math/prim/fun/mdivide_left_tri_test")
232+
runTests("test/unit/math/prim/fun/mdivide_right_tri_test")
233+
runTests("test/unit/math/prim/fun/multiply_test")
234+
runTests("test/unit/math/rev/fun/mdivide_left_tri_test")
235+
runTests("test/unit/math/rev/fun/multiply_test")
208236
}
209237
post { always { retry(3) { deleteDir() } } }
210238
}
@@ -238,14 +266,28 @@ pipeline {
238266
stage('Threading tests') {
239267
agent any
240268
steps {
241-
deleteDir()
242-
unstash 'MathSetup'
243-
sh "echo CXX=${env.CXX} -Werror > make/local"
244-
sh "echo CPPFLAGS+=-DSTAN_THREADS >> make/local"
245-
sh "export STAN_NUM_THREADS=4"
246-
runTests("test/unit -f thread")
247-
sh "find . -name *_test.xml | xargs rm"
248-
runTests("test/unit -f map_rect")
269+
script {
270+
if (isUnix()) {
271+
deleteDir()
272+
unstash 'MathSetup'
273+
sh "echo CXX=${env.CXX} -Werror > make/local"
274+
sh "echo CPPFLAGS+=-DSTAN_THREADS >> make/local"
275+
sh "export STAN_NUM_THREADS=4"
276+
runTests("test/unit -f thread")
277+
sh "find . -name *_test.xml | xargs rm"
278+
runTests("test/unit -f map_rect")
279+
sh "find . -name *_test.xml | xargs rm"
280+
runTests("test/unit -f reduce_sum")
281+
} else {
282+
deleteDirWin()
283+
unstash 'MathSetup'
284+
bat "echo CXX=${env.CXX} -Werror > make/local"
285+
bat "echo CXXFLAGS+=-DSTAN_THREADS >> make/local"
286+
runTestsWin("test/unit -f thread", false)
287+
runTestsWin("test/unit -f map_rect", false)
288+
runTestsWin("test/unit -f reduce_sum", false)
289+
}
290+
}
249291
}
250292
post { always { retry(3) { deleteDir() } } }
251293
}
@@ -259,17 +301,6 @@ pipeline {
259301
runTestsWin("test/unit", false)
260302
}
261303
}
262-
stage('Windows Threading') {
263-
agent { label 'windows' }
264-
steps {
265-
deleteDirWin()
266-
unstash 'MathSetup'
267-
bat "echo CXX=${env.CXX} -Werror > make/local"
268-
bat "echo CXXFLAGS+=-DSTAN_THREADS >> make/local"
269-
runTestsWin("test/unit -f thread")
270-
runTestsWin("test/unit -f map_rect")
271-
}
272-
}
273304
}
274305
}
275306
stage('Additional merge tests') {

stan/math/prim/fun/inv_cloglog.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,16 @@ namespace math {
2626
\textrm{NaN} & \mbox{if } y = \textrm{NaN}
2727
\end{cases}
2828
\f]
29-
3029
\f[
3130
\frac{\partial\, \mbox{inv\_cloglog}(y)}{\partial y} =
3231
\begin{cases}
3332
\frac{\partial\, \mbox{cloglog}^{-1}(y)}{\partial y} & \mbox{if }
3433
-\infty\leq y\leq \infty \\[6pt] \textrm{NaN} & \mbox{if } y = \textrm{NaN}
3534
\end{cases}
3635
\f]
37-
3836
\f[
3937
\mbox{cloglog}^{-1}(y) = 1 - \exp \left( - \exp(y) \right)
4038
\f]
41-
4239
\f[
4340
\frac{\partial \, \mbox{cloglog}^{-1}(y)}{\partial y} = \exp(y-\exp(y))
4441
\f]

0 commit comments

Comments
 (0)