From 40a8f6995bef592046a9517b34dbfc7484efecf6 Mon Sep 17 00:00:00 2001 From: jgabry Date: Thu, 15 Oct 2026 09:19:24 -0600 Subject: [PATCH 1/3] Say how to install the 1.0 release candidate [skip ci] --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ae7a9ea39..f51d42c3a 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,17 @@ install.packages("cmdstanr", repos = c('https://stan-dev.r-universe.dev', getOpt This does not install the vignettes, which take a long time to build, but they are always available online at https://mc-stan.org/cmdstanr/articles/. -To instead install the latest development version of the package from GitHub use +The development version is currently the release candidate for CmdStanR 1.0, +which we'd like people to test. Install it from GitHub with ```r # install.packages("remotes") -remotes::install_github("stan-dev/cmdstanr") +remotes::install_github("stan-dev/cmdstanr@v1.0") ``` +The release notes and documentation for the candidate are at +https://mc-stan.org/cmdstanr/rc. + #### Installing CmdStan If you don't already have CmdStan installed then, in addition to installing the From ce8a5ae4de44d8236c984858c1c95c62342f7664 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 21 Oct 2026 20:56:14 +0800 Subject: [PATCH 2/3] Add Windows OpenCL CI via pocl --- .github/workflows/R-CMD-check.yaml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 276ed6a62..5b6ccdfe5 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -38,13 +38,13 @@ jobs: - {os: macos-26, r: 'release', opencl: false} - {os: macos-15-intel, r: 'release', opencl: false} - {os: windows-latest, r: 'devel', opencl: false} - - {os: windows-latest, r: 'release', opencl: false} + - {os: windows-latest, r: 'release', opencl: true} - {os: windows-2022, r: '4.1', opencl: false} - {os: windows-latest, r: 'oldrel', opencl: false} - {os: ubuntu-latest, r: 'devel', opencl: false} - {os: ubuntu-latest, r: 'release', opencl: true} - {os: ubuntu-latest, r: 'oldrel', opencl: false} - - {os: windows-11-arm, r: 'release', opencl: false} + - {os: windows-11-arm, r: 'release', opencl: true} env: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} @@ -113,6 +113,30 @@ jobs: } shell: Rscript {0} + - name: Install POCL on Windows Runners + if: ${{ runner.os == 'Windows' && matrix.config.opencl }} + id: msys2 + uses: msys2/setup-msys2@v2 + with: + msystem: ${{ runner.arch == 'ARM64' && 'CLANGARM64' || 'UCRT64' }} + update: true + pacboy: pocl:p + + - name: Configure OpenCL on Windows Runners + if: ${{ runner.os == 'Windows' && matrix.config.opencl }} + env: + MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }} + run: | + $prefix = "$env:MSYS2_LOCATION/$($env:MSYSTEM.ToLowerInvariant())" + "$prefix/bin" >> $env:GITHUB_PATH + # Avoid mixing MSYS2 and Rtools runtime libraries via -L. + "LDLIBS_OPENCL='$prefix/lib/libOpenCL.dll.a'" >> $env:GITHUB_ENV + # Elevated runners ignore OCL_ICD_FILENAMES. + $vendors = 'HKLM:\SOFTWARE\Khronos\OpenCL\Vendors' + New-Item -Path $vendors -Force | Out-Null + New-ItemProperty -Path $vendors -Name "$prefix/bin/pocl.dll" -PropertyType DWord -Value 0 -Force | Out-Null + shell: pwsh + - name: Install POCL on Ubuntu Runners if: ${{ matrix.config.os == 'ubuntu-latest' && matrix.config.opencl }} run: | From eabddb08df596287e6d1143fb4bd01c6296ef156 Mon Sep 17 00:00:00 2001 From: jgabry Date: Wed, 21 Oct 2026 16:26:02 -0600 Subject: [PATCH 3/3] Use forward slashes in the Windows OpenCL link flag cmdstanr reads LDLIBS with make print-LDLIBS, which drops the quotes, and passes it to R CMD SHLIB, where sh drops the backslashes from the MSYS2 location. --- .github/workflows/R-CMD-check.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 282feb4f3..5329657c8 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -133,9 +133,14 @@ jobs: MSYS2_LOCATION: ${{ steps.msys2.outputs.msys2-location }} run: | $prefix = "$env:MSYS2_LOCATION/$($env:MSYSTEM.ToLowerInvariant())" + # pocl.dll loads its own DLLs (LLVM, libstdc++) through PATH. The + # MSYS2 compilers in the same directory go unused: R and cmdstanr + # put Rtools first. "$prefix/bin" >> $env:GITHUB_PATH # Avoid mixing MSYS2 and Rtools runtime libraries via -L. - "LDLIBS_OPENCL='$prefix/lib/libOpenCL.dll.a'" >> $env:GITHUB_ENV + # Forward slashes: cmdstanr passes LDLIBS to R CMD SHLIB unquoted, + # and sh drops backslashes. + "LDLIBS_OPENCL='$($prefix.Replace('\', '/'))/lib/libOpenCL.dll.a'" >> $env:GITHUB_ENV # Elevated runners ignore OCL_ICD_FILENAMES. $vendors = 'HKLM:\SOFTWARE\Khronos\OpenCL\Vendors' New-Item -Path $vendors -Force | Out-Null