summaryrefslogtreecommitdiff
path: root/getarch.c
diff options
context:
space:
mode:
authorZhang Xianyi <traits.zhang@gmail.com>2013-07-09 15:38:03 +0800
committerZhang Xianyi <traits.zhang@gmail.com>2013-07-09 15:38:03 +0800
commitf54f5bac9e9b0127052a23aaa7c9cfc4170b1f00 (patch)
treef8b7ed41b450ef937ba1cb9a11e6aab8bc3be183 /getarch.c
parent5d3312142a2926bad34924971208673818947120 (diff)
downloadopenblas-f54f5bac9e9b0127052a23aaa7c9cfc4170b1f00.tar.gz
openblas-f54f5bac9e9b0127052a23aaa7c9cfc4170b1f00.tar.bz2
openblas-f54f5bac9e9b0127052a23aaa7c9cfc4170b1f00.zip
Refs #248. Fixed the LSB compatiable issue for BLAS only.
For example, make CC=lsbcc NO_LAPACK=1.
Diffstat (limited to 'getarch.c')
-rw-r--r--getarch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/getarch.c b/getarch.c
index 7f62e5401..b4573d3ea 100644
--- a/getarch.c
+++ b/getarch.c
@@ -83,6 +83,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
#ifdef linux
#include <sys/sysinfo.h>
+#include <unistd.h>
#endif
/* #define FORCE_P2 */
@@ -736,7 +737,8 @@ static int get_num_cores(void) {
#endif
#ifdef linux
- return get_nprocs();
+ //returns the number of processors which are currently online
+ return sysconf(_SC_NPROCESSORS_ONLN);
#elif defined(OS_WINDOWS)