Page 1 of 1

ZCT 3.2442 by Zach Wegner - JA Windows builds available

PostPosted: 29 Apr 2008, 11:36
by Jim Ablett
Image
ZCT 3.2442 by Zach Wegner
http://sourceforge.net/projects/zct/

Windows x64 & win32 Intel compiler 10 p.g.o
& Gcc-cygwin SMP builds.


I had some problems compiling the smp version
in native Windows, so I compiled it with Cygwin. A bit
slower than the Intel builds and only 32 bit. I'm sure
this will be sorted out soon.

Available from my homepage.

Jim.

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

PostPosted: 29 Apr 2008, 15:37
by Olivier Deville
Hello Jim !

There seems to be an issue with pondering.

Winboard debug in your mailbox.

Olivier

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

PostPosted: 29 Apr 2008, 15:52
by Jim Ablett
Olivier Deville wrote:Hello Jim !

There seems to be an issue with pondering.

Winboard debug in your mailbox.

Olivier


Hi Olivier,

I'm also getting a 'white resigned for black' error every now and again.
I can probably fix that one.
I suppose we must expect bugs as this isn't an official release, just the
beta CVS src code and the best way to get them fixed is to report them
as you are doing now. :)

Jim.

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

PostPosted: 29 Apr 2008, 16:15
by Jim Ablett
I found the problem in 'input.c' there is no windows equivalent to check for input >

Code: Select all
/**
input_available():
This function checks during a search if there is input waiting that we need to process.
Created 102206; last modified 102206
**/
BOOL input_available(void)
{
#ifdef ZCT_POSIX
   int fd;
   fd_set f_s;
   struct timeval tv;

   if (source)
      return FALSE;
   fd = fileno(input_stream);
   FD_ZERO(&f_s);
   FD_SET(fd, &f_s);
   tv.tv_sec = 0;
   tv.tv_usec = 0;
   select(1, &f_s, 0, 0, &tv);
   return FD_ISSET(fd, &f_s);
#elif defined(ZCT_WINDOWS)
   if (source)
      return FALSE;
   return 0;
#endif
}


Adding the windows equivalent code from olithink should fix it >

Code: Select all
/**
input_available():
This function checks during a search if there is input waiting that we need to process.
Created 102206; last modified 102206
**/
BOOL input_available(void)
{
#ifdef ZCT_POSIX
   int fd;
   fd_set f_s;
   struct timeval tv;

   if (source)
      return FALSE;
   fd = fileno(input_stream);
   FD_ZERO(&f_s);
   FD_SET(fd, &f_s);
   tv.tv_sec = 0;
   tv.tv_usec = 0;
   select(1, &f_s, 0, 0, &tv);
   return FD_ISSET(fd, &f_s);

#elif defined(ZCT_WINDOWS)
   if (source)
      return FALSE;
//   return 0;

/*
  From Beowulf, from Olithink
*/
   
   
    /* If we're running under XBoard then we can't use _kbhit() as the input
     * commands are sent to us directly over the internal pipe */

#if defined(FILE_CNT)
    if (stdin->_cnt > 0)
        return stdin->_cnt;
#endif
    if (!init) {
        init = 1;
        inh = GetStdHandle(STD_INPUT_HANDLE);
        pipe = !GetConsoleMode(inh, &dw);
        if (!pipe) {
            SetConsoleMode(inh, dw & ~(ENABLE_MOUSE_INPUT | ENABLE_WINDOW_INPUT));
            FlushConsoleInputBuffer(inh);
        }
    }
    if (pipe) {
        if (!PeekNamedPipe(inh, NULL, 0, NULL, &dw, NULL))
            return 1;
        return dw;
    } else {
        GetNumberOfConsoleInputEvents(inh, &dw);
        return dw <= 1 ? 0 : dw;
   

}


#endif
}


Jim.

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

PostPosted: 29 Apr 2008, 20:28
by Jim Ablett
There's an update available on my homepage now.

It fixes the ponder bug and also a workaround fix for
the 'too early mate result' bug.

Jim.

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

PostPosted: 29 Apr 2008, 20:35
by Jim Ablett
I forgot to mention egbb support in activated, but it is non-configurable at the moment.
The EGBB folder must be placed in ZCT's engine folder.

Jim.

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

PostPosted: 29 Apr 2008, 21:33
by Teemu Pudas
Jim Ablett wrote:I had some problems compiling the smp version
in native Windows, so I compiled it with Cygwin.


No kidding. I've managed to fix some of it: now it doesn't crash, it just keeps spawning processes forever (fork() is failing to make CreateProcess() fail). :D

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

PostPosted: 29 Apr 2008, 21:51
by Jim Ablett
Teemu Pudas wrote:
Jim Ablett wrote:I had some problems compiling the smp version
in native Windows, so I compiled it with Cygwin.


No kidding. I've managed to fix some of it: now it doesn't crash, it just keeps spawning processes forever (fork() is failing to make CreateProcess() fail). :D


Hi Teemu,

in 'smp.c' - smp_cleanup(void)

Did you try this alternative to unix Sigkill ?

Code: Select all
/**
smp_cleanup():
Takes care of all process-related stuff at exit, i.e. kill children, destroy shared memory
Created 080606; last modified 082606
**/
void smp_cleanup(void)
{
   int x;

   if (board.id == 0)
   {
      for (x = 1; x < process_count; x++)
      {
         print("Killing process %i(pid=%i)...\n", x, smp_block[x].pid);
         ExitProcess(smp_block[x].pid);
      }


Jim.

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

PostPosted: 29 Apr 2008, 22:31
by Teemu Pudas
That won't work.
MSDN wrote:ExitProcess Function
Ends the calling process and all its threads.


Instead, I collect the process handles and kill them with TerminateProcess() (which fortunately does work. It'd have hosed my computer otherwise :)). Anyway, that's not the problem I was talking about: fork() is supposed to fail when called by a child, but it doesn't, resulting in exponential spawning.

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

PostPosted: 30 Apr 2008, 09:01
by Jim Ablett
I've decided to remove the ZCT windows build for now as
it's not ready for general release and it's causing
a few headaches for Zach.

Jim.

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

PostPosted: 30 Apr 2008, 13:19
by Zach Wegner
Hello Jim,

Right now, it's perfectly fine to put up compiles, I'd like it. I did an official release just so that the source is distributed along with everything; now anyone can do whatever they want. The best thing to happen now is for the source to go around, any bugs fixed, and compiled by all of the pros. Don't worry about what I said with the bugfixes, you can just keep them fixed and I'll clean it up later. I don't really have the time now, so as long as it works its fine.

Zach

Re: ZCT 3.2442 by Zach Wegner - JA Windows builds available

PostPosted: 30 Apr 2008, 18:18
by Jim Ablett
Zach Wegner wrote:Hello Jim,

Right now, it's perfectly fine to put up compiles, I'd like it. I did an official release just so that the source is distributed along with everything; now anyone can do whatever they want. The best thing to happen now is for the source to go around, any bugs fixed, and compiled by all of the pros. Don't worry about what I said with the bugfixes, you can just keep them fixed and I'll clean it up later. I don't really have the time now, so as long as it works its fine.

Zach


Hi Zach,

Download back up now (with src).

Jim.