From f4d1e7a2650c985722259fbcd594559397095743 Mon Sep 17 00:00:00 2001 From: Hank Anderson Date: Tue, 27 Jan 2015 11:37:39 -0600 Subject: [PATCH] Hardcoded NUM_CORES to get system.cmake working. --- cmake/prebuild.cmake | 40 ++++++++++++++++++++++++++++++++++++++++ cmake/system.cmake | 6 +++--- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake index 200d036..ffebbe3 100644 --- a/cmake/prebuild.cmake +++ b/cmake/prebuild.cmake @@ -9,6 +9,43 @@ ## Next it runs f_check and appends some fortran information to the files. ## Finally it runs getarch and getarch_2nd for even more environment information. +# List of vars set by this file and included files: +# OSNAME +# ARCH +# C_COMPILER +# BINARY32 +# BINARY64 +# CEXTRALIB +# F_COMPILER +# FC +# BU +# CORE +# LIBCORE +# NUM_CORES <- REQUIRED +# HAVE_MMX +# HAVE_SSE +# HAVE_SSE2 +# HAVE_SSE3 +# MAKE +# SGEMM_UNROLL_M +# SGEMM_UNROLL_N +# DGEMM_UNROLL_M +# DGEMM_UNROLL_M +# QGEMM_UNROLL_N +# QGEMM_UNROLL_N +# CGEMM_UNROLL_M +# CGEMM_UNROLL_M +# ZGEMM_UNROLL_N +# ZGEMM_UNROLL_N +# XGEMM_UNROLL_M +# XGEMM_UNROLL_N +# CGEMM3M_UNROLL_M +# CGEMM3M_UNROLL_N +# ZGEMM3M_UNROLL_M +# ZGEMM3M_UNROLL_M +# XGEMM3M_UNROLL_N +# XGEMM3M_UNROLL_N + # CPUIDEMU = ../../cpuid/table.o if (DEFINED CPUIDEMU) @@ -66,3 +103,6 @@ message(STATUS "GETARCH LOG: ${GETARCH_LOG}") # TODO: need to read in the vars from Makefile.conf/Makefile_kernel.conf +# temporarily hardcoded to get system.cmake working +set(NUM_CORES 4) + diff --git a/cmake/system.cmake b/cmake/system.cmake index e5c66f3..dc5aec2 100644 --- a/cmake/system.cmake +++ b/cmake/system.cmake @@ -88,8 +88,8 @@ if (NOT DEFINED NUM_THREADS) set(NUM_THREADS ${NUM_CORES}) endif () -if (NUM_THREADS EQUALS 1) - # TODO: was "override USE_THREAD = 0", do we need override here? -hpa +if (${NUM_THREADS} EQUAL 1) + # TODO: was "override USE_THREAD = 0", do we need "override" here? -hpa set(USE_THREAD 0) endif () @@ -101,7 +101,7 @@ if (DEFINED USE_THREAD) endif () else () # N.B. this is NUM_THREAD in Makefile.system which is probably a bug -hpa - if (${NUM_THREADS} EQUALS 1) + if (${NUM_THREADS} EQUAL 1) unset(SMP) else () set(SMP 1) -- 2.7.4