STEllAR-GROUP / hpx

The C++ Standard Library for Parallelism and Concurrency
https://hpx.stellar-group.org
Boost Software License 1.0
2.53k stars 435 forks source link

cmake problem resulting in RDTSC not working correctly for Xeon Phi creates very strange results for duration counters #1616

Closed pagrubel closed 9 years ago

pagrubel commented 9 years ago

The counters that use time calculations such as task_overhead and duration counters give results of zero with the following cmake command, I get HPX_WITH_RDTSC_UNINITIALIZED=ON

cmake -DCMAKE_INSTALL_PREFIX=~/build/hpx_buildmic_idle \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_TOOLCHAIN_FILE=$HOME/hpx/cmake/toolchains/XeonPhi.cmake \
      -DBOOST_ROOT=~/boost/boost_1_55_0_mic \
      -DHWLOC_ROOT=/opt/hwloc/1.7-k1om-release \
      -DHPX_WITH_MALLOC=tbbmalloc \
      -DTBBMALLOC_ROOT=/opt/intel/tbb/ \
      -DHPX_WITH_THREAD_GUARD_PAGE=OFF \
      -DHPX_WITH_EXAMPLES=ON \
      -DHPX_WITH_TESTS=ON \
      -DHPX_WITH_THREAD_IDLE_RATES=ON \
       ~/hpx > >(tee cmakeout) 2> >(tee cmakeerr)

I tried adding -DHPX_WITH_RDTSC=ON nothing changed.

Here is the CMakeCache.txt file

hkaiser commented 9 years ago

@pagrubel Please check the file <build_dir>/hpx/config/defines.hpp after configuring with -DHPX_WITH_RDTSC=ON. Does it have a line #define HPX_HAVE_RDTSC?

hkaiser commented 9 years ago

The branch fixing_1616 refines reporting for pre-set variables. This branch also pre-sets HPX_WITH_RDTSC=ON for Xeon/Phis. Everything should be fine now.

pagrubel commented 9 years ago

it did have that line. I'll check the branch

pagrubel commented 9 years ago

Looks like that branch fixes it.