Intel® oneAPI Base Toolkit
Support for the core tools and libraries within the base toolkit that are used to build and deploy high-performance data-centric applications.

BOOST with oneAPI

Daniel_D
Beginner
3,883 Views

Hi,

did anyone manage to get BOOST compiled with oneAPI? So far I didn't find a solution - always stopped with:

"error: No intel compiler version found!"

 

Any help is appreciated.

Thanks.

0 Kudos
15 Replies
GouthamK_Intel
Moderator
3,857 Views

Hi,

Thanks for reaching out to us!

Could you please share more details about your System configuration?

OS Version:

Compiler Version:

Boost version:


>>"error: No intel compiler version found!"

Also, please share the source code and steps to reproduce the above error.


Thanks & Regards

Goutham


0 Kudos
Daniel_D
Beginner
3,851 Views

Sure.

OS: Windows 10

Compiler: Intel 2021.1

Boost: 1.75.0

 

0 Kudos
Daniel_D
Beginner
3,850 Views

To reproduce:

 

start "Intel one api command promt for 64 bit"

cd YOUTR_BOOST_FOLDER

bootstrap.bat intel-win

b2 -a toolset=intel address-model=64 architecture=x86 link=static threading=multi runtime-link=shared --without-graph_parallel --without-mpi --without-python --build-type=complete install

 

 

gives you this output:

/boost_1_75_0/tools/build/src/tools\intel-win.jam:57: in intel-win.init from module intel-win
error: No intel compiler version found!
/boost_1_75_0/tools/build/src/build\toolset.jam:44: in toolset.using from module toolset
/boost_1_75_0/tools/build/src/tools\intel.jam:82: in intel.init from module intel
/boost_1_75_0/tools/build/src/build\toolset.jam:44: in toolset.using from module toolset
/boost_1_75_0/tools/build/src\build-system.jam:543: in process-explicit-toolset-requests from module build-system
/boost_1_75_0/tools/build/src\build-system.jam:610: in load from module build-system
/boost_1_75_0/tools/build/src/kernel\modules.jam:295: in import from module modules
/boost_1_75_0/tools/build/src/kernel/bootstrap.jam:139: in boost-build from module
/boost_1_75_0/boost-build.jam:17: in module scope from module

 

0 Kudos
Daniel_D
Beginner
3,812 Views

Hi,

do you have any update on this or do you need more information? I think boost is very common in the C++ world and at least useful to support it like your older ICC/ICL compiler.

Thanks,

0 Kudos
GouthamK_Intel
Moderator
3,806 Views

Hi Daniel,

Sorry for the delay,

Thanks for the information and steps to reproduce, I was able to reproduce the issue which you are facing.

We are escalating this thread to the Subject Matter Expert (SME) who will guide you further.

Have a Good day!


Thanks & Regards

Goutham


0 Kudos
cw_intel
Moderator
3,786 Views

I can reproduce this issue. Now I try to figure out if there are any workarounds.


0 Kudos
cw_intel
Moderator
3,695 Views

Building the Boost Library with oneAPI, the Base Toolkit & HPC Toolkit are required. I tried to build the atomic library with the below steps, and it succeeded. The steps I used are,

  1. > cd boost_1_75_0​
  2. Modify the intel-win.jam file in folder 'tools\build\src\tools'

a. add 'root = "C:/Program Files (x86)/Intel/oneAPI/compiler/2021.1.1/env" ; ' in line 178 to specify the location of vars.bat in oneAPI.

b. Modify the "iclvars_*.bat" to "vars_*.bat" in line 180;

c. Modify the "iclvars.bat" to "vars.bat" in line 183;

e. add '.iclvars-2021.1-supported-vcs = "14.2 14.1" ; ' in line 503. Because the version of icl in oneAPI is 2021.1;

3 . > bootstrap.bat

4 . > b2 install --prefix=C:\boost_installed --with-atomic toolset=intel-2021.1-vc14.1 link=static address-model=64 architecture=x86 runtime-link=static


0 Kudos
cw_intel
Moderator
3,691 Views

I attached the intel_win.jam   (Note, the ".jam" file can't be uploaded here, so I change it to ".txt" file).

The test code I used is, 

//testBoost.cpp
#include <boost/atomic/atomic.hpp>
#include <thread>
#include <iostream>


boost::atomic<int> a(0);

void thread()
{
  ++a;
}

int main()
{
  std::thread t1{thread};
  std::thread t2{thread};
  t1.join();
  t2.join();
  std::cout << a << std::endl;  std::cout.setf(std::ios::boolalpha);  std::cout << a.is_lock_free() << std::endl;  //true
  
  return 0;
}

 

Open a oneAPI command prompt and  run the code with the below command,

> icl -I C:\boost_withoneAPI\boost_installed_static\include\boost-1_75 /c testBoost.cpp

> icl testBoost.obj /link "C:\boost_installed_static\lib\libboost_atomic-iw-mt-s-x64-1_75.lib" 

> testBoost.exe
2
true

 

This is just a simple test, we will build all libraries in Boost. And will also write a article about the building steps.  After the article is published, I will attach the link here.

 

Thanks,

-Chen

0 Kudos
Daniel_D
Beginner
3,682 Views

Hi Chen,

 

thank you very much for your help. Great that you will publish an article. Looking forward to it.

Similar problems to compile with OpenSSL, maybe you can also have a look into this library? For some libraries in boost you may need OpenSSL (ASIO, SSL, HTTPS).


 

Thanks again.

Daniel

0 Kudos
cw_intel
Moderator
3,676 Views

Hi Daniel,

I'm working in writing the article for building the boost, I will tell you when the article is published.

 

Thanks,

Chen

0 Kudos
cw_intel
Moderator
3,491 Views

The article is under review. I will publish it as soon as possible after review.


0 Kudos
Daniel_D
Beginner
3,489 Views

Cool. Locking forward to read the article. Can you please consider to do this for OpenSSL as well? Same problerms.

 

Daniel

0 Kudos
cw_intel
Moderator
3,320 Views

Hi Daniel,


This article has been reviewed, and I will publish it later.

And now, I'm working on OpenSSL building.


Thanks,

Chen


cw_intel
Moderator
3,173 Views

Hi Daniel,


The article has been published here https://software.intel.com/content/www/us/en/develop/articles/building-boost-with-oneapi.html?wapkw=building%20boost%20with%20intel%20oneAPI.


BTW, this article used boost-1.75. The boost-1.76 add oneAPI 2021 support, but the path that b2 search for this compiler is wrong. Need to specify the path of "setvars.sh" in intel-win.jam. Add " root = "C:/Program Files (x86)/Intel/oneAPI" ; " in lin184 in intel-win.jam. For other building steps with boost-1.76 , can also refer to the steps in that article. 


Thanks.


0 Kudos
cw_intel
Moderator
3,095 Views

We haven't heard back from you for a long time so we are assuming that the provided details helped you in solving your problem. Any further interaction in this thread will be considered community only.



0 Kudos
Reply