You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
address review findings on the windows onetbb build (#272)
* address review findings on the windows onetbb build
- configure: derive TBB_NAME / TBB_MALLOC_NAME whenever an Rtools tree is
adopted, not only when it is oneTBB. gating both on 'oneapi' broke an
explicitly configured legacy TBB_LIB, which linked -ltbb against a
directory holding libtbb_static.a
- configure: don't let the cmake probe throw. it now runs on Windows, where
an unrunnable CMAKE or unparseable --version output has to degrade to
tinythread rather than fail the configure
- configure: correct the required cmake version in the error message (3.5,
matching the check and DESCRIPTION), and rename useBundledTbb to
buildBundledTbb so it no longer collides with the install.libs.R function
- install.libs.R: report the Windows static build explicitly instead of
logging 'no tbb runtime libraries found', which reads like a failure
- tbb.R: note that the stub carries its own oneTBB runtime, so resolving
against it means a second scheduler rather than a free fallback
- downstream check: assert the built library imports nothing from the
tbb.dll stub, which is the property that comment now relies on
- GNU.cmake: probe with an empty file rather than the null device, which
drops the WIN32 special case and removes the unverified 'gcc -c NUL'
- add windows-11-arm to the downstream matrix, restore the trailing newline
in observer_proxy.cpp, pin rstan.yaml against DESCRIPTION, checkout@v4
- regenerate patches/legacy_tbb_abi.diff and patches/mingw_gnu_cmake.diff
* assert one tbb runtime rather than none from the stub
CI disproved the premise of the import assertion added in the previous
commit. On both windows-latest configurations -- the Rtools45 oneTBB and the
bundled build -- the downstream library takes its entire TBB surface (13
tbb::detail::r1:: entry points, including isolate_within_arena and observe)
from tbb.dll, and imports nothing at all from RcppParallel.dll. R CMD SHLIB
links RcppParallel.dll against an export list generated from the package's
own objects, so the TBB entry points pulled out of the static library are
never re-exported; '-ltbb' is therefore load-bearing, not a fallback.
So assert the invariant that does hold and does matter: the TBB surface must
come from exactly one module. A library split across RcppParallel.dll and the
stub would register observers with one scheduler while its tasks ran in the
other, which is silent, unlike the link error this replaced.
Two further defects in the check itself:
- an objdump that cannot read the file exited non-zero having printed no
import table, which parsed as 'no imports' and passed vacuously. This is
what made the windows-11-arm job green: Sys.which() finds the runner's
x86_64 objdump, which cannot read an aarch64 PE.
- the export table follows the import tables and lists the library's own
inlined tbb::detail::d1:: instantiations. Left in, it was absorbed into the
last 'DLL Name:' block and credited that library with TBB imports it never
had -- harmless only because tbb.dll happened to be listed last.
Also correct the tbbLdFlags() comment, which described RcppParallel.dll as
re-exporting an incidental part of the runtime.
# compare against this checkout's DESCRIPTION rather than looking for a
87
+
# '.9000' suffix, so this keeps working across development version bumps
86
88
- name: check RcppParallel is still the one we built
87
89
run: |
88
-
Rscript -e 'v <- as.character(packageVersion("RcppParallel")); writeLines(paste("RcppParallel", v)); if (!grepl("[.]9000$", v)) stop("RcppParallel was replaced by a released build; the rstan build did not test this branch")'
90
+
Rscript -e 'installed <- packageVersion("RcppParallel"); expected <- package_version(read.dcf("DESCRIPTION")[1L, "Version"]); writeLines(sprintf("RcppParallel %s (expected %s)", installed, expected)); if (installed != expected) stop("RcppParallel was replaced by a different build; the rstan build did not test this branch")'
0 commit comments