View Single Post
Old 2016-02-07, 04:46   #26
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
Rep├║blica de California

231028 Posts
Default

OK, I got both un-and-multithreaded builds (all manual compile and link) to work, via the following hacks to platform.h:

o Got rid of these undefs at top - these (duh!) make it impossible for use of PLATFORM_DEBUG as intended, no clue WTF I was thinking with these undefs:

#undef PLATFORM_DEBUG
#undef OS_DEBUG
#undef OS_BITS_DEBUG
#undef CPU_DEBUG
#undef CMPLR_DEBUG

o Instead of initially undefing the following 3 things I now init them to 'unknown' (the not-defined CPU_NAME was hosing the util.c compile):

#define CPU_TYPE "Unknown CPU type"
#define CPU_NAME "Unknown CPU name"
#define CPU_SUBTYPE_NAME "Unknown CPU subtype"

o Changed

#ifndef CPU_TYPE
#error platform.h : CPU_TYPE not defined!
#endif

to a #warning. (OS_TYPE and COMPILER_TYPE are still required to be defined during preprocessing of the platform.h file, though.)

o Added a #elif for the case of Unknown hardware platform, but under Linux/GCC.

Fiddled version of the header attached. I only did a pair of quick spot-checks of the 2 binaries @FFT length 128K via './Mlucas -fftlen 128 -iters 100' in each of my 2 build dirs (one for unthreaded, one with pthreading). All the normal Linux thread-affinity stuff seems to be working, though no clue how much || scaling one can expect in these puny guest-accounts. (My virtual setup shows just 2 cores.)
Attached Files
File Type: gz platform.h.gz (10.6 KB, 151 views)
ewmayer is offline   Reply With Quote