vetter / shoc-mic

Pre-release of SHOC for Intel Xeon Phi
Other
22 stars 6 forks source link

Compilation breaks upon call to sysconf #2

Open psteinb opened 10 years ago

psteinb commented 10 years ago

HI, I compiled the master branch of shoc-mic inside a fresh clone of this repo. The compilation fails claiming:

scan/Scan.cpp(126): error: identifier "_SC_NPROCESSORS_ONLN" is undefined
          nThreads = sysconf(_SC_NPROCESSORS_ONLN) - 4; // Leave something for the OS

Adding

#include <unistd.h>

to Scan.cpp resolves the issue. OS: CentOS 6.5,kernel: 2.6.32-431.5.1.el6.x86_64 , icc 14.0.0 20130728, MPSS 3.1.2

Best - Peter