|
||
Title: threads and related stufff Post by doublep on Dec 6th, 2005, 4:53pm According to Jdb, the machine the bots sit on probably has two CPUs. Doesn't really look so, since unthreaded Aami-ra seems to consume 100% CPU, but I got interested in making in threaded anyway... So here are many small questions I got in process:
A little more generally: are there currently bots that are able to utilise multiple CPUs? I threaded Aami-ra in two evenings, though I'm not sure all errors are terminated. My machine has only one CPU, so I cannot stress the implementation seriously, though even with one CPU and two threads I managed to find many problems :). |
||
Title: Re: threads and related stufff Post by jdb on Dec 6th, 2005, 6:25pm This is a quote from an email omar sent me: Quote:
|
||
Title: Re: threads and related stufff Post by doublep on Dec 7th, 2005, 5:01am As far as I know, threads and processes are both created with a call to fork() at the lowest level. So I think Linux can dispatch either two threads of one process or two different processes on two CPUs. I don't have any ways to check right now, though, since I cannot run threaded Aami-ra on gold.arimaa.com due to a missing library... (That's assuming gold.arimaa.com has two CPUs in the first place.) |
||
Title: Re: threads and related stufff Post by 99of9 on Dec 7th, 2005, 5:10am I think it does have 2 processors. When I run gnobby the load only goes up to 0.50. Top still reads 100%, but that's because it's using 100% of one processor. |
||
Title: Re: threads and related stufff Post by doublep on Dec 7th, 2005, 3:02pm on 12/06/05 at 16:53:29, doublep wrote:
Ah, I've just looked closer and libgthread is installed there. Just not the development parts. Will check if it works with a home-compiled bot once the current game against GnoBot finishes. |
||
Title: Re: threads and related stufff Post by doublep on Dec 9th, 2005, 4:22pm OK, now it finally runs faster than before when using two CPUs. I'm still disappointed, since the speedup is merely about 5%, I sort of hoped for more... Anyway, the bot is now configured to run in two threads and use 256 MB of memory for the cache. In case anyone wonders: gold.arimaa.com is indeed a two-CPU machine as can be seen in the file `/proc/cpuinfo'. |
||
Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1! YaBB © 2000-2003. All Rights Reserved. |