ComStock 1.0.2 Stockfish with robobases

Discussion about chess-playing software (engines, hosts, opening books, platforms, etc...)
BB+
Posts: 1484
Joined: Thu Jun 10, 2010 4:26 am

Re: ComStock 1.0.2 Stockfish with robobases

Post by BB+ » Fri Feb 18, 2011 4:44 am

Do you have the "win64bits.h" file? There seems to be a copy of this in the ComStock distribution in both the RobboTotalCode and RobboTripleCode directories. Also, are you building in 64-bit mode? If not, maybe you want something like win32bits.h?

Prima
Posts: 328
Joined: Tue Dec 14, 2010 6:12 am

Re: ComStock 1.0.2 Stockfish with robobases

Post by Prima » Fri Feb 18, 2011 4:53 am

I went ahead and reverted #include (win64bits.h) back to its default of; #include <windows.h>.

After another compile attempt, I get an error about MEMALIGN. It wants definition of it. This was the inquiry I seek as to how or what to define it....for SMP use.
Attachments
ComStock-2.PNG

Prima
Posts: 328
Joined: Tue Dec 14, 2010 6:12 am

Re: ComStock 1.0.2 Stockfish with robobases

Post by Prima » Fri Feb 18, 2011 4:55 am

BB+ wrote:Do you have the "win64bits.h" file? There seems to be a copy of this in the ComStock distribution in both the RobboTotalCode and RobboTripleCode directories. Also, are you building in 64-bit mode? If not, maybe you want something like win32bits.h?
Actually I have the win64bits.h files, for RobboTotalCode and RobboTripleCode folders respectively. And yes, I want to build 64-bits versions. Then do 32-bit versions later.

BB+
Posts: 1484
Joined: Thu Jun 10, 2010 4:26 am

Re: ComStock 1.0.2 Stockfish with robobases

Post by BB+ » Fri Feb 18, 2011 5:00 am

KLO might know more about MEMALIGN. I think he found that they were casting something the wrong way. In the screenshot, it looks the one with "(uint64_t*)" is correct, so you might want to find all others occurrences of #define MEMALIGN ... and change them to this.

Prima
Posts: 328
Joined: Tue Dec 14, 2010 6:12 am

Re: ComStock 1.0.2 Stockfish with robobases

Post by Prima » Fri Feb 18, 2011 8:06 am

BB+ wrote:KLO might know more about MEMALIGN. I think he found that they were casting something the wrong way. In the screenshot, it looks the one with "(uint64_t*)" is correct, so you might want to find all others occurrences of #define MEMALIGN ... and change them to this.
Okay. thanks BB+. I appreciate it.

Kingliveson, if you're reading this thread, from my above (or immediate previous posts) any idea on how I can define this MEMALIGN & the pthread that's supposed to accommodate SMP? Thanks.

User avatar
kingliveson
Posts: 1388
Joined: Thu Jun 10, 2010 1:22 am
Real Name: Franklin Titus
Location: 28°32'1"N 81°22'33"W

Re: ComStock 1.0.2 Stockfish with robobases

Post by kingliveson » Fri Feb 18, 2011 11:01 am

Prima wrote:
Kingliveson, if you're reading this thread, from my above (or immediate previous posts) any idea on how I can define this MEMALIGN & the pthread that's supposed to accommodate SMP? Thanks.

MEMALIGN should read as below for the header files:

Code: Select all

#define MEMALIGN(a, b, c) a = _aligned_malloc (c, b)
Windows is not a POSIX compliant environment, you'll need Cygwin or other POSIX implementation for the system to compile pthread.h. So this tells me you are not "defining" something correctly (or it can't see it) as it should not be trying to compile that particular header file which naturally does not exist in the system.
PAWN : Knight >> Bishop >> Rook >>Queen

Prima
Posts: 328
Joined: Tue Dec 14, 2010 6:12 am

Re: ComStock 1.0.2 Stockfish with robobases

Post by Prima » Fri Feb 18, 2011 7:19 pm

kingliveson wrote:
Prima wrote:
Kingliveson, if you're reading this thread, from my above (or immediate previous posts) any idea on how I can define this MEMALIGN & the pthread that's supposed to accommodate SMP? Thanks.

MEMALIGN should read as below for the header files:

Code: Select all

#define MEMALIGN(a, b, c) a = _aligned_malloc (c, b)
Windows is not a POSIX compliant environment, you'll need Cygwin or other POSIX implementation for the system to compile pthread.h. So this tells me you are not "defining" something correctly (or it can't see it) as it should not be trying to compile that particular header file which naturally does not exist in the system.
Actually my MEMALIGN (from IH-win-linux.h in RobboTripleCode) was, and is, defined exactly as you suggest. And I already had Cygwin installed on my OS since 2009. Here's my exact MEMALIGN definition before and after several compile attempts. Even as I'm posting this right now:
#define TYPE_64_BIT "%I64d"
#if 1
#define MEMALIGN(a, b, c) a = _aligned_malloc (c, b)
#define ALIGNED_FREE(x) _aligned_free (x)
#else
#define MEMALIGN(a, b, c) a = malloc (c)
#define ALIGNED_FREE(x) free (x)
#endif
#define __builtin_prefetch /* */
#ifdef WINDOWS_X64 /* 64 bits */
#include "win64bits.h"
#else
#include "win32bits.h"
If there are other POSIX stuffs, besides the already installed Cygwin (from 2009), what are they? I'll like to download them. Thanks.

Prima
Posts: 328
Joined: Tue Dec 14, 2010 6:12 am

Re: ComStock 1.0.2 Stockfish with robobases

Post by Prima » Fri Feb 18, 2011 8:39 pm

Coming to think of it, since I use Intel C++ compiler (v12.0), I redefined the MEMALIGN unit to this:

#define TYPE_64_BIT "%I64d"
#if 1
#define MEMALIGN(a, b, c) a = (uint64_t*)_aligned_malloc (c, b)
#define ALIGNED_FREE(x) _aligned_free (x)
#else
#define MEMALIGN(a, b, c) a = malloc (c)
#define ALIGNED_FREE(x) free (x)


This was suggested by you few weeks ago in this thread, found here http://www.open-chess.org/viewtopic.php ... 7&start=30
Now I'm getting lots of errors that are way too long to put here in forum. I'm not sure my Snipping Tools would capture all these warnings to post image here.

UncombedCoconut
Posts: 44
Joined: Thu Jun 10, 2010 1:43 am
Real Name: Justin Blanchard
Location: United States

Re: ComStock 1.0.2 Stockfish with robobases

Post by UncombedCoconut » Mon Feb 21, 2011 4:47 am

Prima, you may wish to use Pastebin (or a pastebin) to share the output of your build process in its full glory. An expert will probably see the source of your problem instantly.

Prima
Posts: 328
Joined: Tue Dec 14, 2010 6:12 am

Re: ComStock 1.0.2 Stockfish with robobases

Post by Prima » Mon Feb 21, 2011 6:11 am

UncombedCoconut wrote:Prima, you may wish to use Pastebin (or a pastebin) to share the output of your build process in its full glory. An expert will probably see the source of your problem instantly.
Thanks I will Google this Pastebin and put it to use. I appreciate it.

Post Reply