bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnubg] Re: Multiprocessing and remote processing


From: Olivier Baur
Subject: [Bug-gnubg] Re: Multiprocessing and remote processing
Date: Wed, 28 May 2003 17:25:55 +0200

Hi all!

I've come up with a first working version of gnubg with multiprocessing and remote processing. It can now use several processors on a single host and use several "slave" gnubg's running on remote hosts on a TCP/IP network. This requires BSD sockets (sys/socket.h) for remote processing, and POSIX threads (pthread.h) for multi- and remote processing.

This version only works for rollouts for now ; I'll be working on evals pretty soon.

This version doesn't provide any GTK interface for now either; it seems I've got problems with GTK signals being sent to all threads, when only the main thread should be signaled; I've got to enquire this issue, and since I'm a GTK-newbie, I would welcome any spontaneous help from GTK-developers around here about GTK caveats in multithreaded environment. Here are some example error messages I get on the master when rolling out: >> (gnubg:15282): GLib-WARNING **: g_main_context_prepare(): main loop already active in another thread
>> Xlib: unexpected async reply (sequence 0x29bc)!
(the worst part being it DID use to work one week ago, when I wasn't fiddling around with signals!)


The files I have modified/created are:
- lib/neuralnet.c/h (2)
- rollout.c/h (1, 2)
- eval.c (2, 3)
- gnubg.c (4)
- procunits.c/h (for general "processing units" and "tasks" handling) (new files) - threadglobals.h (2) (global variables / static local variables storage mechanism) (new file)

(1) modified to add some thread-wise function wrappers; eg, Threaded_BasicCubefuleRollout(), Threaded_BearoffRollout(); also, changed the RolloutGeneral() main loop to run with asynchronous tasks (one-game rollouts dispatched to local or remote processing units); (2) modified to provide a thread-specific global variables / static local variables storage mechanism; eg, pnn->savedBase, rCubeX, ecBasic, etc; (3) modified to provide an exclusive access mechanism to shared global data through mutexes (eg, the evaluation cache); (4) modified to add some new CLI commands (eg, "show pu info", "show pu stats", "pu add remote a.b.c.d", etc) and init the processing units mechanism in main().


However, I'm not used to using CVS, except for retreiving files :-)
Can you explain me what a "branch" is?
How am I supposed to integrate my work?

Can anyone help me?

Thanks in advance.

Best,

-- Olivier



Le samedi, 3 mai 2003, à 10:40 Europe/Paris, Joern Thyssen a écrit :

On Tue, Apr 22, 2003 at 04:15:01PM +0200, Olivier Baur wrote
Hello Joern.

I'm currently working on parallelism, multiprocessing and remote
processing.
Nobody's already working on it? Can you mark me on the TODO list please?

Done.

Let me know if you need write access to the CVS repository, e.g., for
creating a new branch.

Jørn






reply via email to

[Prev in Thread] Current Thread [Next in Thread]