The new source has been released:
http://ippolit.wikispaces.com/file/deta ... m-Beta.tar
I will begin attempting to make a compile.
IvanHoe55
-
- Site Admin
- Posts: 1226
- Joined: Wed Jun 09, 2010 7:49 am
- Real Name: Jeremy Bernstein
- Location: Berlin, Germany
- Contact:
Re: IvanHoe55
If your OS doesn't support pthread_spinlocks (OSX, for instance), you will need to reimplement them using pthread_mutexes or something. Arg...xshat wrote:The new source has been released:
http://ippolit.wikispaces.com/file/deta ... m-Beta.tar
I will begin attempting to make a compile.
Jeremy
-
- Site Admin
- Posts: 1226
- Joined: Wed Jun 09, 2010 7:49 am
- Real Name: Jeremy Bernstein
- Location: Berlin, Germany
- Contact:
Re: IvanHoe55
In RobboTotalBase.h:Jeremy Bernstein wrote:If your OS doesn't support pthread_spinlocks (OSX, for instance), you will need to reimplement them using pthread_mutexes or something. Arg...xshat wrote:The new source has been released:
http://ippolit.wikispaces.com/file/deta ... m-Beta.tar
I will begin attempting to make a compile.
Jeremy
Code: Select all
#if 0 /* replace with a decent condition if you care */
#define ROBBO_LOCK_TYPE pthread_spinlock_t
#define ROBBO_LOCK_IT(x) pthread_spin_lock (x)
#define ROBBO_UNLOCK_IT(x) pthread_spin_unlock (x)
#define ROBBO_LOCK(tb, ind) pthread_spin_lock (&(tb->locks)[ind]);
#define ROBBO_UNLOCK(tb, ind) pthread_spin_unlock (&(tb->locks)[ind]);
#define ROBBO_LOCK_INIT(x) pthread_spin_init (x, 1) /* HACK */
#define ROBBO_LOCK_DESTROY(x) pthread_spin_destroy (x)
#else
#define ROBBO_LOCK_TYPE pthread_mutex_t
#define ROBBO_LOCK_IT(x) pthread_mutex_lock (x)
#define ROBBO_UNLOCK_IT(x) pthread_mutex_unlock (x)
#define ROBBO_LOCK(tb, ind) pthread_mutex_lock (&(tb->locks)[ind]);
#define ROBBO_UNLOCK(tb, ind) pthread_mutex_unlock (&(tb->locks)[ind]);
#define ROBBO_LOCK_INIT(x) pthread_mutex_init (x, NULL)
#define ROBBO_LOCK_DESTROY(x) pthread_mutex_destroy (x)
#endif
Code: Select all
...
Position 7: Nodes: 1308791 Time: 1005ms
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0000000104931f50
0x0000000100029635 in Search (POSITION=0x1003ef2e0) at search.c:272
272 (p + 1)->move = 0;
Code: Select all
{
boolean REPETITION;
for (p = POSITION->DYN - POSITION->DYN->reversible; p < POSITION->DYN; p++)
{
REPETITION = FALSE;
for (q = p + 2; q < POSITION->DYN; q += 2)
if (p->HASH == q->HASH)
{
REPETITION = TRUE;
break;
}
if (!REPETITION)
POSITION->STACK[p - POSITION->DYN + POSITION->DYN->reversible] = 0;
(p + 1)->move = 0;
}
}
-
- Site Admin
- Posts: 1226
- Joined: Wed Jun 09, 2010 7:49 am
- Real Name: Jeremy Bernstein
- Location: Berlin, Germany
- Contact:
Re: IvanHoe55
I replaced the repetition check code in 55 with the same code from 63 and the bad access goes away:
Not sure what is really happening there, though -- what reversible is being used for -- so it's possible that my "fix" is no good. Compared to 63:
Code: Select all
if (ANALYSING)
{
boolean REPETITION;
for (p = POSITION->DYN_ROOT; p < POSITION->DYN; p++)
{
REPETITION = FALSE;
for (q = p + 2; q < POSITION->DYN; q += 2)
if (p->HASH == q->HASH)
{
REPETITION = TRUE;
break;
}
if (!REPETITION)
POSITION->STACK[p - POSITION->DYN_ROOT] = 0;
(p + 1)->move = 0;
}
}
63: Total Nodes: 21935784 Time: 16062ms Total NPS: 1365000 55: Total Nodes: 21277934 Time: 16056ms Total NPS: 1325000