stan-dev / stan-dev/rstan

Headers (task_scheduler_init.h, tbb_stddef.h) removed from OneAPI TBB 2021.1

Open
#924 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
1.1k
Forks
266
Avg merge
2h 56m
Merged PRs (30d)
1

Description

Summary:

task_scheduler_init.h is removed from OneAPI TBB 2021.1. The corresponding include should be removed from init_threadpool_tbb.hpp.

Description:

I am using a system TBB library (OneAPI TBB 2021.1). The RStan installation bug checks:

/Users/anirbanmukherjee/Library/R/4.0/library/StanHeaders/include/stan/math/prim/core/init_threadpool_tbb.hpp:12:10: fatal error: 
      'tbb/task_scheduler_init.h' file not found
#include <tbb/task_scheduler_init.h>

task_scheduler_init.h is unavailable as it has been removed from the latest TBB release. See: https://software.intel.com/content/www/us/en/develop/documentation/tbb-documentation/top/intel-threading-building-blocks-developer-reference/appendices/deprecated-features/outdated-and-redundant-api/taskschedulerinit-class.html. I have checked the folder and the header is not that there.

It should be safe to simply remove this include as the header was deprecated a while ago.

R Version:
> R.version
               _                                          
platform       x86_64-apple-darwin20.3.0                  
arch           x86_64                                     
os             darwin20.3.0                               
system         x86_64, darwin20.3.0                       
status         Patched                                    
major          4                                          
minor          0.4                                        
year           2021                                       
month          03                                         
day            18                                         
svn rev        80099                                      
language       R                                          
version.string R version 4.0.4 Patched (2021-03-18 r80099)
nickname       Lost Library Book

> sessionInfo()
R version 4.0.4 Patched (2021-03-18 r80099)
Platform: x86_64-apple-darwin20.3.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.0.4 tools_4.0.4  

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open init_threadpool_tbb.hpp and inspect the include of tbb/task_scheduler_init.h. Remove the unavailable header reference, then verify that RStan installs or builds successfully with OneAPI TBB 2021.1.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, r
Domain
build-system
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.