Skip to content
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

Intel TBB 2019 Update 8 #151

Merged
merged 1 commit into from Feb 1, 2021
Merged

Intel TBB 2019 Update 8 #151

merged 1 commit into from Feb 1, 2021

Conversation

hsbadr
Copy link
Contributor

@hsbadr hsbadr commented Jan 29, 2021

Fixes Windows issues and may help other targets.

I didn't update to newer versions (e.g., oneTBB) because they use a new TBB interface and may break reverse dependencies, since it requires code changes to replace the deprecated task_scheduler_init.

Fixes Windows issues and may help other targets.
@kevinushey
Copy link
Contributor

Does this PR need an update to src/Makevars.in or something similar? After pulling this PR and rebuilding the package I see:

$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        deleted:    inst/include/tbb_local/serial/tbb/parallel_for.h
        deleted:    inst/include/tbb_local/serial/tbb/tbb_annotate.h
        deleted:    inst/include/tbb_local/tbb/aggregator.h
        deleted:    inst/include/tbb_local/tbb/aligned_space.h
        deleted:    inst/include/tbb_local/tbb/atomic.h
        deleted:    inst/include/tbb_local/tbb/blocked_range.h
        deleted:    inst/include/tbb_local/tbb/blocked_range2d.h
        deleted:    inst/include/tbb_local/tbb/blocked_range3d.h
        deleted:    inst/include/tbb_local/tbb/blocked_rangeNd.h
        deleted:    inst/include/tbb_local/tbb/cache_aligned_allocator.h
        deleted:    inst/include/tbb_local/tbb/combinable.h
        deleted:    inst/include/tbb_local/tbb/compat/condition_variable
        deleted:    inst/include/tbb_local/tbb/compat/ppl.h
        deleted:    inst/include/tbb_local/tbb/compat/thread
        deleted:    inst/include/tbb_local/tbb/compat/tuple
        deleted:    inst/include/tbb_local/tbb/concurrent_hash_map.h
        deleted:    inst/include/tbb_local/tbb/concurrent_lru_cache.h
        deleted:    inst/include/tbb_local/tbb/concurrent_map.h
        deleted:    inst/include/tbb_local/tbb/concurrent_priority_queue.h
        deleted:    inst/include/tbb_local/tbb/concurrent_queue.h
        deleted:    inst/include/tbb_local/tbb/concurrent_set.h
        deleted:    inst/include/tbb_local/tbb/concurrent_unordered_map.h
        deleted:    inst/include/tbb_local/tbb/concurrent_unordered_set.h
        deleted:    inst/include/tbb_local/tbb/concurrent_vector.h
        deleted:    inst/include/tbb_local/tbb/critical_section.h
        deleted:    inst/include/tbb_local/tbb/enumerable_thread_specific.h
        deleted:    inst/include/tbb_local/tbb/flow_graph.h
        deleted:    inst/include/tbb_local/tbb/flow_graph_abstractions.h
        deleted:    inst/include/tbb_local/tbb/flow_graph_opencl_node.h
        deleted:    inst/include/tbb_local/tbb/gfx_factory.h
        deleted:    inst/include/tbb_local/tbb/global_control.h
        deleted:    inst/include/tbb_local/tbb/index.html
        deleted:    inst/include/tbb_local/tbb/internal/_aggregator_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_allocator_traits.h
        deleted:    inst/include/tbb_local/tbb/internal/_concurrent_queue_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_concurrent_skip_list_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_concurrent_unordered_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_flow_graph_async_msg_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_flow_graph_body_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_flow_graph_cache_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_flow_graph_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_flow_graph_indexer_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_flow_graph_item_buffer_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_flow_graph_join_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_flow_graph_node_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_flow_graph_streaming_node.h
        deleted:    inst/include/tbb_local/tbb/internal/_flow_graph_tagged_buffer_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_flow_graph_trace_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_flow_graph_types_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_mutex_padding.h
        deleted:    inst/include/tbb_local/tbb/internal/_node_handle_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_range_iterator.h
        deleted:    inst/include/tbb_local/tbb/internal/_tbb_hash_compare_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_tbb_strings.h
        deleted:    inst/include/tbb_local/tbb/internal/_tbb_trace_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_tbb_windef.h
        deleted:    inst/include/tbb_local/tbb/internal/_template_helpers.h
        deleted:    inst/include/tbb_local/tbb/internal/_x86_eliding_mutex_impl.h
        deleted:    inst/include/tbb_local/tbb/internal/_x86_rtm_rw_mutex_impl.h
        deleted:    inst/include/tbb_local/tbb/iterators.h
        deleted:    inst/include/tbb_local/tbb/machine/gcc_arm.h
        deleted:    inst/include/tbb_local/tbb/machine/gcc_armv7.h
        deleted:    inst/include/tbb_local/tbb/machine/gcc_generic.h
        deleted:    inst/include/tbb_local/tbb/machine/gcc_ia32_common.h
        deleted:    inst/include/tbb_local/tbb/machine/gcc_itsx.h
        deleted:    inst/include/tbb_local/tbb/machine/ibm_aix51.h
        deleted:    inst/include/tbb_local/tbb/machine/icc_generic.h
        deleted:    inst/include/tbb_local/tbb/machine/linux_common.h
        deleted:    inst/include/tbb_local/tbb/machine/linux_ia32.h
        deleted:    inst/include/tbb_local/tbb/machine/linux_ia64.h
        deleted:    inst/include/tbb_local/tbb/machine/linux_intel64.h
        deleted:    inst/include/tbb_local/tbb/machine/mac_ppc.h
        deleted:    inst/include/tbb_local/tbb/machine/macos_common.h
        deleted:    inst/include/tbb_local/tbb/machine/mic_common.h
        deleted:    inst/include/tbb_local/tbb/machine/msvc_armv7.h
        deleted:    inst/include/tbb_local/tbb/machine/msvc_ia32_common.h
        deleted:    inst/include/tbb_local/tbb/machine/sunos_sparc.h
        deleted:    inst/include/tbb_local/tbb/machine/windows_api.h
        deleted:    inst/include/tbb_local/tbb/machine/windows_ia32.h
        deleted:    inst/include/tbb_local/tbb/machine/windows_intel64.h
        deleted:    inst/include/tbb_local/tbb/memory_pool.h
        deleted:    inst/include/tbb_local/tbb/mutex.h
        deleted:    inst/include/tbb_local/tbb/null_mutex.h
        deleted:    inst/include/tbb_local/tbb/null_rw_mutex.h
        deleted:    inst/include/tbb_local/tbb/parallel_do.h
        deleted:    inst/include/tbb_local/tbb/parallel_for.h
        deleted:    inst/include/tbb_local/tbb/parallel_for_each.h
        deleted:    inst/include/tbb_local/tbb/parallel_invoke.h
        deleted:    inst/include/tbb_local/tbb/parallel_reduce.h
        deleted:    inst/include/tbb_local/tbb/parallel_scan.h
        deleted:    inst/include/tbb_local/tbb/parallel_sort.h
        deleted:    inst/include/tbb_local/tbb/parallel_while.h
        deleted:    inst/include/tbb_local/tbb/partitioner.h
        deleted:    inst/include/tbb_local/tbb/pipeline.h
        deleted:    inst/include/tbb_local/tbb/queuing_mutex.h
        deleted:    inst/include/tbb_local/tbb/queuing_rw_mutex.h
        deleted:    inst/include/tbb_local/tbb/reader_writer_lock.h
        deleted:    inst/include/tbb_local/tbb/recursive_mutex.h
        deleted:    inst/include/tbb_local/tbb/runtime_loader.h
        deleted:    inst/include/tbb_local/tbb/scalable_allocator.h
        deleted:    inst/include/tbb_local/tbb/spin_mutex.h
        deleted:    inst/include/tbb_local/tbb/spin_rw_mutex.h
        deleted:    inst/include/tbb_local/tbb/task.h
        deleted:    inst/include/tbb_local/tbb/task_arena.h
        deleted:    inst/include/tbb_local/tbb/task_group.h
        deleted:    inst/include/tbb_local/tbb/task_scheduler_init.h
        deleted:    inst/include/tbb_local/tbb/task_scheduler_observer.h
        deleted:    inst/include/tbb_local/tbb/tbb.h
        deleted:    inst/include/tbb_local/tbb/tbb_allocator.h
        deleted:    inst/include/tbb_local/tbb/tbb_config.h
        deleted:    inst/include/tbb_local/tbb/tbb_disable_exceptions.h
        deleted:    inst/include/tbb_local/tbb/tbb_exception.h
        deleted:    inst/include/tbb_local/tbb/tbb_machine.h
        deleted:    inst/include/tbb_local/tbb/tbb_profiling.h
        deleted:    inst/include/tbb_local/tbb/tbb_stddef.h
        deleted:    inst/include/tbb_local/tbb/tbb_thread.h
        deleted:    inst/include/tbb_local/tbb/tbbmalloc_proxy.h
        deleted:    inst/include/tbb_local/tbb/tick_count.h

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        inst/include/serial/
        inst/include/tbb/

@hsbadr
Copy link
Contributor Author

hsbadr commented Feb 1, 2021

@kevinushey This seems to be due to the following lines:

cp -R ../inst/include/tbb_local/* ../inst/include/; \
rm -Rf ../inst/include/tbb_local/; \

We did so to hide the internal TBB headers under inst/include/tbb_local and copy them if needed, to avoid conflicts with external/system TBB library where the new headers will be copied instead.

@kevinushey
Copy link
Contributor

kevinushey commented Feb 1, 2021

This might be my fault for running R CMD INSTALL --preclean . directly from within the package sources rather than on the tarball produced by R CMD build.

Just to make sure I understand then: we use these tbb_local paths to avoid conflicts when building RcppParallel itself, but when bundling tbb in the installed / binary builds of RcppParallel, there's no issue with having those live in include/tbb?

I think that's ultimately true because RcppParallel will use the appropriate library paths based on whether the user has opted into using the system versus bundled TBB but want to double-check.

@hsbadr
Copy link
Contributor Author

hsbadr commented Feb 1, 2021

Just to make sure I understand then: we use these tbb_local paths to avoid conflicts when building RcppParallel itself, but when bundling tbb in the installed / binary builds of RcppParallel, there's no issue with having those live in include/tbb?

Yes. The installed RcppParallel includes the correct TBB headers and libraries in both cases (building TBB from the embedded source code or using an external prebuilt TBB library). The tbb_local is temporary and will be removed in both cases; it's used to store the internal headers and is removed after copying the required headers (from tbb_local or from TBB_INC directory) to the correct path (RcppParallel/include/).

@kevinushey
Copy link
Contributor

Got it. Thank you for clarifying and responding so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants