From 990e5f5c6a7938f4ba5ce49c22cc754cc2c567f2 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Wed, 6 Sep 2023 16:41:00 -0400 Subject: [PATCH 1/8] Try -fsyntax-only in CI --- Jenkinsfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 986491e86..009832149 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,11 +25,11 @@ def tagName() { } } -def runPerformanceTests(String testsPath, String stancFlags = ""){ +def checkCompilation(String testsPath, String stancFlags = ""){ unstash 'ubuntu-exe' sh """ - git clone --recursive --depth 50 https://github.com/stan-dev/performance-tests-cmdstan + git clone --recursive --depth 50 https://github.com/stan-dev/performance-tests-cmdstan --branch compile-only """ writeFile(file:"performance-tests-cmdstan/cmdstan/make/local", text:"CXX=${CXX}") @@ -54,7 +54,7 @@ def runPerformanceTests(String testsPath, String stancFlags = ""){ echo 'O=0' >> make/local echo 'CXXFLAGS+=-Wall' >> make/local make -j${env.PARALLEL} build; cd .. - ./runPerformanceTests.py -j${env.PARALLEL} --runs=0 ${testsPath} + ./checkCompilation.py -j${env.PARALLEL} --syntax-only ${testsPath} """ } @@ -282,7 +282,7 @@ pipeline { dir("${env.WORKSPACE}/compile-tests-good"){ unstash "Stanc3Setup" script { - runPerformanceTests("../test/integration/good", params.stanc_flags) + checkCompilation("../test/integration/good", params.stanc_flags) } xunit([GoogleTest( @@ -314,7 +314,7 @@ pipeline { dir("${env.WORKSPACE}/compile-tests-example"){ script { unstash "Stanc3Setup" - runPerformanceTests("example-models", params.stanc_flags) + checkCompilation("example-models", params.stanc_flags) } xunit([GoogleTest( @@ -351,7 +351,7 @@ pipeline { dir("${env.WORKSPACE}/compile-good-O1"){ unstash "Stanc3Setup" script { - runPerformanceTests("../test/integration/good", "--O1") + checkCompilation("../test/integration/good", "--O1") } xunit([GoogleTest( @@ -388,7 +388,7 @@ pipeline { dir("${env.WORKSPACE}/compile-example-O1"){ script { unstash "Stanc3Setup" - runPerformanceTests("example-models", "--O1") + checkCompilation("example-models", "--O1") } xunit([GoogleTest( From da7e226f277c7c86d39fea60fae6d1ba8292eade Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Wed, 6 Sep 2023 17:04:06 -0400 Subject: [PATCH 2/8] Use python executable --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 009832149..c2d9f4f9a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,7 +54,7 @@ def checkCompilation(String testsPath, String stancFlags = ""){ echo 'O=0' >> make/local echo 'CXXFLAGS+=-Wall' >> make/local make -j${env.PARALLEL} build; cd .. - ./checkCompilation.py -j${env.PARALLEL} --syntax-only ${testsPath} + python ./checkCompilation.py -j${env.PARALLEL} --syntax-only ${testsPath} """ } From ac3211ee398f44c97382cbcb02984d3eb8d864b7 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Thu, 7 Sep 2023 09:22:34 -0400 Subject: [PATCH 3/8] Don't expect performance report from compile test --- Jenkinsfile | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c2d9f4f9a..5838c66bd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -284,14 +284,6 @@ pipeline { script { checkCompilation("../test/integration/good", params.stanc_flags) } - - xunit([GoogleTest( - deleteOutputFiles: false, - failIfNotNew: true, - pattern: 'performance-tests-cmdstan/performance.xml', - skipNoTestFiles: false, - stopProcessingIfError: false) - ]) } } post { always { runShell("rm -rf ${env.WORKSPACE}/compile-tests-good/*") }} @@ -316,14 +308,6 @@ pipeline { unstash "Stanc3Setup" checkCompilation("example-models", params.stanc_flags) } - - xunit([GoogleTest( - deleteOutputFiles: false, - failIfNotNew: true, - pattern: 'performance-tests-cmdstan/performance.xml', - skipNoTestFiles: false, - stopProcessingIfError: false) - ]) } } post { always { runShell("rm -rf ${env.WORKSPACE}/compile-tests-example/*") }} @@ -353,14 +337,6 @@ pipeline { script { checkCompilation("../test/integration/good", "--O1") } - - xunit([GoogleTest( - deleteOutputFiles: false, - failIfNotNew: true, - pattern: 'performance-tests-cmdstan/performance.xml', - skipNoTestFiles: false, - stopProcessingIfError: false) - ]) } } post { always { runShell("rm -rf ${env.WORKSPACE}/compile-good-O1/*") }} @@ -390,14 +366,6 @@ pipeline { unstash "Stanc3Setup" checkCompilation("example-models", "--O1") } - - xunit([GoogleTest( - deleteOutputFiles: false, - failIfNotNew: true, - pattern: 'performance-tests-cmdstan/performance.xml', - skipNoTestFiles: false, - stopProcessingIfError: false) - ]) } } post { always { runShell("rm -rf ${env.WORKSPACE}/compile-example-O1/*") }} From dda42ec64470af2b30d3d60947d072b3a839ac93 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Fri, 8 Sep 2023 15:57:11 -0400 Subject: [PATCH 4/8] Perf test branch was merged --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5838c66bd..1db5ee972 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,7 @@ def checkCompilation(String testsPath, String stancFlags = ""){ unstash 'ubuntu-exe' sh """ - git clone --recursive --depth 50 https://github.com/stan-dev/performance-tests-cmdstan --branch compile-only + git clone --recursive --depth 50 https://github.com/stan-dev/performance-tests-cmdstan """ writeFile(file:"performance-tests-cmdstan/cmdstan/make/local", text:"CXX=${CXX}") From c6714d8c35e5eebc1ae4f639f8cb577639f5f766 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Mon, 11 Sep 2023 16:18:12 -0400 Subject: [PATCH 5/8] Dummy change to trigger build --- .../good/compiler-optimizations/copy-prop-profile.stan | 1 + .../good/compiler-optimizations/cpp.expected | 8 ++++---- .../good/compiler-optimizations/cppO0.expected | 10 +++++----- .../good/compiler-optimizations/cppO1.expected | 10 +++++----- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/test/integration/good/compiler-optimizations/copy-prop-profile.stan b/test/integration/good/compiler-optimizations/copy-prop-profile.stan index 6f0403b27..b0ca1261d 100644 --- a/test/integration/good/compiler-optimizations/copy-prop-profile.stan +++ b/test/integration/good/compiler-optimizations/copy-prop-profile.stan @@ -16,6 +16,7 @@ model { target += sum(vec); row_vector[N] vec3; + { row_vector[N] vec4 = columns_dot_self(X); vec3 = vec4; diff --git a/test/integration/good/compiler-optimizations/cpp.expected b/test/integration/good/compiler-optimizations/cpp.expected index 015c9cee3..e61dd7379 100644 --- a/test/integration/good/compiler-optimizations/cpp.expected +++ b/test/integration/good/compiler-optimizations/cpp.expected @@ -4498,10 +4498,10 @@ static constexpr std::array locations_array__ = " (in 'copy-prop-profile.stan', line 11, column 2 to line 14, column 3)", " (in 'copy-prop-profile.stan', line 18, column 13 to column 14)", " (in 'copy-prop-profile.stan', line 18, column 2 to column 21)", - " (in 'copy-prop-profile.stan', line 20, column 15 to column 16)", - " (in 'copy-prop-profile.stan', line 20, column 4 to column 45)", - " (in 'copy-prop-profile.stan', line 19, column 2 to line 22, column 3)", - " (in 'copy-prop-profile.stan', line 24, column 2 to column 22)", + " (in 'copy-prop-profile.stan', line 21, column 15 to column 16)", + " (in 'copy-prop-profile.stan', line 21, column 4 to column 45)", + " (in 'copy-prop-profile.stan', line 20, column 2 to line 23, column 3)", + " (in 'copy-prop-profile.stan', line 25, column 2 to column 22)", " (in 'copy-prop-profile.stan', line 2, column 2 to column 17)", " (in 'copy-prop-profile.stan', line 5, column 9 to column 10)", " (in 'copy-prop-profile.stan', line 5, column 11 to column 12)"}; diff --git a/test/integration/good/compiler-optimizations/cppO0.expected b/test/integration/good/compiler-optimizations/cppO0.expected index 27244f260..a0c579910 100644 --- a/test/integration/good/compiler-optimizations/cppO0.expected +++ b/test/integration/good/compiler-optimizations/cppO0.expected @@ -1982,11 +1982,11 @@ static constexpr std::array locations_array__ = " (in 'copy-prop-profile.stan', line 16, column 2 to column 21)", " (in 'copy-prop-profile.stan', line 18, column 13 to column 14)", " (in 'copy-prop-profile.stan', line 18, column 2 to column 21)", - " (in 'copy-prop-profile.stan', line 20, column 15 to column 16)", - " (in 'copy-prop-profile.stan', line 20, column 4 to column 45)", - " (in 'copy-prop-profile.stan', line 21, column 4 to column 16)", - " (in 'copy-prop-profile.stan', line 19, column 2 to line 22, column 3)", - " (in 'copy-prop-profile.stan', line 24, column 2 to column 22)", + " (in 'copy-prop-profile.stan', line 21, column 15 to column 16)", + " (in 'copy-prop-profile.stan', line 21, column 4 to column 45)", + " (in 'copy-prop-profile.stan', line 22, column 4 to column 16)", + " (in 'copy-prop-profile.stan', line 20, column 2 to line 23, column 3)", + " (in 'copy-prop-profile.stan', line 25, column 2 to column 22)", " (in 'copy-prop-profile.stan', line 2, column 2 to column 17)", " (in 'copy-prop-profile.stan', line 5, column 9 to column 10)", " (in 'copy-prop-profile.stan', line 5, column 11 to column 12)"}; diff --git a/test/integration/good/compiler-optimizations/cppO1.expected b/test/integration/good/compiler-optimizations/cppO1.expected index 58a4d68c5..ec9639ad8 100644 --- a/test/integration/good/compiler-optimizations/cppO1.expected +++ b/test/integration/good/compiler-optimizations/cppO1.expected @@ -1956,11 +1956,11 @@ static constexpr std::array locations_array__ = " (in 'copy-prop-profile.stan', line 16, column 2 to column 21)", " (in 'copy-prop-profile.stan', line 18, column 13 to column 14)", " (in 'copy-prop-profile.stan', line 18, column 2 to column 21)", - " (in 'copy-prop-profile.stan', line 20, column 15 to column 16)", - " (in 'copy-prop-profile.stan', line 20, column 4 to column 45)", - " (in 'copy-prop-profile.stan', line 21, column 4 to column 16)", - " (in 'copy-prop-profile.stan', line 19, column 2 to line 22, column 3)", - " (in 'copy-prop-profile.stan', line 24, column 2 to column 22)", + " (in 'copy-prop-profile.stan', line 21, column 15 to column 16)", + " (in 'copy-prop-profile.stan', line 21, column 4 to column 45)", + " (in 'copy-prop-profile.stan', line 22, column 4 to column 16)", + " (in 'copy-prop-profile.stan', line 20, column 2 to line 23, column 3)", + " (in 'copy-prop-profile.stan', line 25, column 2 to column 22)", " (in 'copy-prop-profile.stan', line 2, column 2 to column 17)", " (in 'copy-prop-profile.stan', line 5, column 9 to column 10)", " (in 'copy-prop-profile.stan', line 5, column 11 to column 12)"}; From 243a2b9449638ce0c631bbd7b995c830734775c1 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Tue, 12 Sep 2023 11:46:46 -0400 Subject: [PATCH 6/8] Debug --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1db5ee972..d46766f82 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,7 +54,7 @@ def checkCompilation(String testsPath, String stancFlags = ""){ echo 'O=0' >> make/local echo 'CXXFLAGS+=-Wall' >> make/local make -j${env.PARALLEL} build; cd .. - python ./checkCompilation.py -j${env.PARALLEL} --syntax-only ${testsPath} + python ./checkCompilation.py -j${env.PARALLEL} ${testsPath} """ } From 510872b281c7a6ec033a2e8fa4f477eb457e354c Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Tue, 12 Sep 2023 15:16:12 -0400 Subject: [PATCH 7/8] Run on branch --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d46766f82..397b81235 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,7 @@ def checkCompilation(String testsPath, String stancFlags = ""){ unstash 'ubuntu-exe' sh """ - git clone --recursive --depth 50 https://github.com/stan-dev/performance-tests-cmdstan + git clone --recursive --depth 50 https://github.com/stan-dev/performance-tests-cmdstan --branch=fix/checkCompilation """ writeFile(file:"performance-tests-cmdstan/cmdstan/make/local", text:"CXX=${CXX}") @@ -54,7 +54,7 @@ def checkCompilation(String testsPath, String stancFlags = ""){ echo 'O=0' >> make/local echo 'CXXFLAGS+=-Wall' >> make/local make -j${env.PARALLEL} build; cd .. - python ./checkCompilation.py -j${env.PARALLEL} ${testsPath} + python ./checkCompilation.py -j${env.PARALLEL} --syntax-only ${testsPath} """ } From b57c366f3bd8a2bc1f74d0e0c5ade35ab401e9f0 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Thu, 21 Sep 2023 15:50:33 -0400 Subject: [PATCH 8/8] No branch needed now --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 397b81235..1db5ee972 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,7 @@ def checkCompilation(String testsPath, String stancFlags = ""){ unstash 'ubuntu-exe' sh """ - git clone --recursive --depth 50 https://github.com/stan-dev/performance-tests-cmdstan --branch=fix/checkCompilation + git clone --recursive --depth 50 https://github.com/stan-dev/performance-tests-cmdstan """ writeFile(file:"performance-tests-cmdstan/cmdstan/make/local", text:"CXX=${CXX}")