hristo$ ./crafty
unable to open book file [./book.bin].
book is disabled
unable to open book file [./books.bin].
ERROR. shmget() failed, unable to allocate a shared memory segment.
Please verify that your /proc/sys/kernel/shmmax value is
large enough to allow allocating the amount of memory you
are requesting. "echo 1000000000 > /proc/sys/kernel/shmmax"
will allow a segment up to one billion bytes.
Tony wrote:I always nullmove, since it always gives me something. Killer moves, threaths, hash moves (iid) etc.
Indeed. The _only_ condition I use right now is whether I am in check.
Yes, you are right. I have 1 condition.
Tony
Do you check to see if you just executed a null move? (Double null move)
I don't. I removed that condition too, because it didn't really matter. So now I allow triple, quadruple, etc. nullmoves. One less parameter to my search function...
It means that your program may see a draw in position that the side to move is losing because the best thing for both sides is to play a null move.
Tony wrote:I always nullmove, since it always gives me something. Killer moves, threaths, hash moves (iid) etc.
Indeed. The _only_ condition I use right now is whether I am in check.
Yes, you are right. I have 1 condition.
Tony
Do you check to see if you just executed a null move? (Double null move)
I notice, but I still do it.
I make sure the best move isn't a nullmove (verification search) and when fe nullmove returns a checkmate score and a double nullmove was executed, I jump back 2 plies.
Tony wrote:I always nullmove, since it always gives me something. Killer moves, threaths, hash moves (iid) etc.
Indeed. The _only_ condition I use right now is whether I am in check.
Yes, you are right. I have 1 condition.
Tony
Do you check to see if you just executed a null move? (Double null move)
I don't. I removed that condition too, because it didn't really matter. So now I allow triple, quadruple, etc. nullmoves. One less parameter to my search function...
It means that your program may see a draw in position that the side to move is losing because the best thing for both sides is to play a null move.
hristo$ ./crafty
unable to open book file [./book.bin].
book is disabled
unable to open book file [./books.bin].
ERROR. shmget() failed, unable to allocate a shared memory segment.
Please verify that your /proc/sys/kernel/shmmax value is
large enough to allow allocating the amount of memory you
are requesting. "echo 1000000000 > /proc/sys/kernel/shmmax"
will allow a segment up to one billion bytes.
Cheers,
Hristo
Read the entire error. As root, type "echo 1000000000 > /proc/sys/kernel/shmmax" and you will be set.
hristo$ ./crafty
unable to open book file [./book.bin].
book is disabled
unable to open book file [./books.bin].
ERROR. shmget() failed, unable to allocate a shared memory segment.
Please verify that your /proc/sys/kernel/shmmax value is
large enough to allow allocating the amount of memory you
are requesting. "echo 1000000000 > /proc/sys/kernel/shmmax"
will allow a segment up to one billion bytes.
Because of this nonsense I chose to do shared memory with mmap(). Much easier.
mmap() is an alternative, but it too has some portability issues. I once used that but have had no failures with shmget()/shmat() except for the max segment size issue. Personally, I think the MacOS is pretty poor if you can't dynamically change this. Linux has had this for years...
bob wrote:mmap() is an alternative, but it too has some portability issues. I once used that but have had no failures with shmget()/shmat() except for the max segment size issue. Personally, I think the MacOS is pretty poor if you can't dynamically change this. Linux has had this for years...
I would never ask any user to change such a system settings just to run a chess engine. Not on Linux and certainly not on Mac OS X. Just my opinion of course.
hristo$ ./crafty
unable to open book file [./book.bin].
book is disabled
unable to open book file [./books.bin].
ERROR. shmget() failed, unable to allocate a shared memory segment.
Please verify that your /proc/sys/kernel/shmmax value is
large enough to allow allocating the amount of memory you
are requesting. "echo 1000000000 > /proc/sys/kernel/shmmax"
will allow a segment up to one billion bytes.
Cheers,
Hristo
Read the entire error. As root, type "echo 1000000000 > /proc/sys/kernel/shmmax" and you will be set.
This error would be meaningful if I actually had "/proc/sys/kernel/shmmax" ... but I don't even have "/proc" ... I compiled crafty using a linux target, but am attempting to run it in Darwin, so I don't expect the reported errors to make sense.