From: Hedayat V. <hed...@gm...> - 2011-02-19 17:56:56
|
Hi, This is the last email I found from Hesham, with his last implementation. It might be helpful regarding the recent discussions. I hope it gets the attention it deserves. :) Good luck, Hedayat -------- Original Message -------- Subject: Fwd: multi-threaded ODE Date: Mon, 16 Jun 2008 07:58:04 +0200 From: H.Ebrahimi <hes...@gm...> To: Sahar Asadi <sah...@gm...> CC: Joschka Boedecker <jos...@am...>, Yuan Xu <xy...@ya...>, Feng Xue <hen...@ma...>, Hedayat Vatankhah <hed...@ai...> Hello Sahar, (cc Joschka, Yuan, Feng and Hedayat) I forgot to mention in scenserver.cpp on line 47 you see: tbb::task_scheduler_init tbb_sched; Sometimes on some machines, it's better to set the number of threads to get the best performance. But in the code I sent you TBB sets the number of threads automatically. On my laptop I get a very good result with 5 threads: tbb::task_scheduler_init tbb_sched(5); But with the latest version of TBB (released in June 2008), I got a very good result without setting the number of threads. Apparently this feature is improved in this version. So if you find time, it would be great to test with different number of threads and compare the result. Probably next weekend I can send you a version that doesn't need to modify the server code. But I'm not sure if we get the same performance. I forwarded this email since I'd forgotten to send it to Feng and Hedayat. Best, Hesham ---------- Forwarded message ---------- From: *H. Ebrahimi* <hes...@gm... <mailto:hes...@gm...>> Date: 2008/6/15 Subject: Re: Agent Type discussion and rules To: Sahar Asadi <sah...@gm... <mailto:sah...@gm...>> Cc: Joschka Boedecker <jos...@am... <mailto:jos...@am...>>, Yuan Xu <xy...@ya... <mailto:xy...@ya...>> Hi Sahar, 2008/6/15 Sahar Asadi <sah...@gm... <mailto:sah...@gm...>>: @Hesham and Joschka: I am still waiting for source files to test with ODE changes Sorry, last week I was away, couldn't work on this. I didn't manage to compile the server with gcc 4.3, so had to install gcc 4.2. Probably until next weekend I cant find time to prepare a patch, so if you don't mind I send you the files and some small modification that should be done. To have a clue of the speedup the multi-threaded version of ODE gives, I use rdtsc to see the time each 100 ODE steps take (sceneserver.cpp prints this number). On my laptop for 3 agents, with multi-threaded ODE I get less than 1E7 and with original ODE I get around 1.6E7. But I expect if we run the agents on other machines, we get even more speedup. So sceneserver.cpp is the only file of the server I've modified. But please modify Makefile in /lib/oxygen/ and add -ltbb -lpthread to: liboxygen_debug_la_LIBADD = -ltbb -lpthread -lode ${spades_libs} Since it will be linked with the static ODE library, if you want to link with another version of ODE, need to link oxygen again. And please make sure the release version of TBB is used. When you compile TBB, it gives the debug and release versions. And the debug version is around 10 times slower. I've also attached all the source files of ODE in /ode/src/, please replace the original ones with them. And also please add -ltbb -lpthread to Makefile of ODE: LIBS = -lstdc++ -lm -lpthread -ltbb -ltbbmalloc -lrt if you want to compile the tests and other directories in ODE, you may need to modify their Makefiles as well. Please let me know if you see any problems with compiling this. By the way, please set the flag of "setAutoDisableFlag(true)" to false, in spark.rb. In the tests I ran, in a few of them after running and connecting the second agent, the server crashed. Please let me know if you see this, in the previous versions of the server with multi-threaded ODE I hadn't seen this. Best, Hesham |