Adapt your ~/user-config.jam to contain the following lines:
## Toolset to be used for compiling for the host using intel : host : : <cxxflags>"-std=c++0x" ; ## Toolset to be used for compiling for the Xeon Phi using intel : mic : : <cxxflags>"-std=c++0x -mmic" <linkflags>"-std=c++0x -mmic" ;
Change to the directory you unpacked boost in (from now on referred to as $BOOST_ROOT) and execute the following commands:
$ ./bootstrap.sh $ ./b2 toolset=intel-mic -j<N>You should now have all the required boost libraries.
Run the configure-make-install procedure as follows:
$ CC=icc CFLAGS=-mmic CXX=icpc CXXFLAGS=-mmic LDFLAGS=-mmic ./configure --host=k1om --prefix=$HWLOC_ROOT $ make $ make installYou now have a working hwloc installation in $HWLOC_ROOT.
After all the prerequistes have been succesfully installed, we can now start building and installing HPX. The build procedure is almost the same as for How to Install HPX on Unix Variants with the sole difference that you have to enable the Xeon Phi in the CMake Build system. This is achieved by invoking CMake in the following way:
cmake \ -DCMAKE_CXX_COMPILER=icpc \ -DCMAKE_C_COMPILER=icc \ -DHPX_NATIVE_MIC=On \ -DBOOST_ROOT=$BOOST_ROOT \ -DHWLOC_ROOT=$HWLOC_ROOT \ /path/to/hpx
For more detailed information about using CMake please refer its documentation and to the section Building HPX with CMake. Please pay special attention to the section about HPX_MALLOC as this is crucial for getting decent performance on the Xeon Phi.