-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable tbb #59
Comments
Hi @pca006132, thanks for the heads up! We'll need to update https://github.com/openscad/openscad-wasm with the oneTBB dep in our build image (cc/ @DSchroer, @t-paul), but in the meantime it seems to build fine:
./scripts/wasm-base-docker-run.sh /bin/bash -c ' \
( test -d oneTBB || git clone https://github.com/uxlfoundation/oneTBB ) && \
cd oneTBB && \
rm -fR build && \
emcmake cmake -B build \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-Wno-unused-command-line-argument" \
-DCMAKE_EXE_LINKER_FLAGS="-sMALLOC=emmalloc" \
-DTBB_DISABLE_HWLOC_AUTOMATIC_SEARCH=ON \
-DTBB_EXAMPLES=OFF \
-DTBB_STRICT=OFF \
-DTBB_TEST=OFF && \
( cmake --build build -j || cmake --build build -j2 || cmake --build build ) && \
cmake --install build && \
cd .. &&
emcmake cmake -B build -DCMAKE_BUILD_TYPE=Release -DEXPERIMENTAL=1 && \
( cmake --build build -j || cmake --build build -j2 || cmake --build build )' Then in the playground codebase: Now based on emscripten's docs I guess to get any kind of parallelism we either need to add COOP / COEP headers and build both tbb & openscad with extra It would be nice to test both options with heavy models that leverage parallelism well: suggestions welcome :-) |
Yeah, and we do need mimalloc for performance here (see allocator-performance section). Do note that we encountered some weird stack corruption that are basically impossible to debug due to the lack of sanitizer support in wasm, not sure if this is fixed in newer versions of emscripten. |
Note that manifold can now be compiled with tbb with minimal changes: elalish/manifold#1045
This can probably enable openscad build with tbb as well. I can help if anyone is interested in adding it here.
The text was updated successfully, but these errors were encountered: