Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Daniel_Droste
Beginner
278 Views

BOOST with oneAPI

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
10 Replies
GouthamK_Intel
Moderator
252 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


Daniel_Droste
Beginner
246 Views

Sure.

OS: Windows 10

Compiler: Intel 2021.1

Boost: 1.75.0

 

Daniel_Droste
Beginner
245 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

 

Daniel_Droste
Beginner
207 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,

GouthamK_Intel
Moderator
201 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


chen_intel
Employee
181 Views

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


chen_intel
Employee
90 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


chen_intel
Employee
86 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

Daniel_Droste
Beginner
77 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

chen_intel
Employee
71 Views

Hi Daniel,

I will be on vacation from 2/10-2/17.  I will have a look at this after my vacation. Response may be delayed.

 

Thanks,

Chen