UoB-HPC / BabelStream

STREAM, for lots of devices written in many programming models
Other
313 stars 109 forks source link

Changes needed for the STDdata for Spack Package to Work #165

Closed kaanolgu closed 4 months ago

kaanolgu commented 9 months ago

The Spack couldn't link the TBB to the package but with this small fix, it is now building the STDdata with TBB and the performance is comparable to the results from CMake

tom91136 commented 9 months ago

Can you check if this conflicts with the develop branch and switch base to that?

tom91136 commented 9 months ago

Cool, let's see if CI is green.

kaanolgu commented 9 months ago

Cool, let's see if CI is green.

NVHPC fails in some versions of CMake and it succeeds with some versions ?

kaanolgu commented 4 months ago

@tom91136 @tomdeakin : It's been a long time now but I found the solution. It requires the following flag for the Spack package to make sure that CMake succesfully picks TBB and executes the register_link_library(TBB::tbb) :

args.append("-DCMAKE_PREFIX_PATH=" + self.spec["intel-tbb"].prefix + "/tbb/latest/")

For the future: I did test with Isambard-Phase3 with Milan CPU and works as expected with gcc@12.2.0 std-data I will update the https://github.com/spack/spack/pull/41019 with this change

EDIT: no need for any change in BabelStream package EDIT 2 : Actually, further tests showed me that the intel-tbb path is automatically included in the CMAKE_PREFIX_PATH when dependency is added the key part is -DUSE_TBB=ON is not working since I think it is TBB:tbb ( I will double check this later) but adding -DCXX_EXTRA_FLAGS=-ltbb solved the issue