Limitations of ARGoS for 1,000,000 robots

Requests regarding how to set up experiments in ARGoS.
jharwell
Posts: 67
Joined: Thu Jan 25, 2018 4:12 am

Limitations of ARGoS for 1,000,000 robots

Postby jharwell » Sun Jun 09, 2019 4:52 pm

Hi Carlo,

I'm currently contemplating trying to get some simulation results from a 1,000,000 robot swarm (I will have access to a cluster this fall with some nodes with 128 cores/256GB memory, so I think it might be possible for some simple controllers!). My question is this: are there are limitations in ARGoS revolving around swarm sizes? (i.e. things that are counted per-robot each timestep, and are unsigned ints that won't roll over with reasonable swarm sizes, but with 1,000,000 robots they very well might and cause all sorts of havoc).

Also, have you ever tried building ARGoS with profiling, running some simulations, and then feeding the profile results back into ARGoS for a recompile (e.g. gcc's -fprofile-arcs and -fprofile-use)? If so, were the results noticeably faster?

Thanks!
- John

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Limitations of ARGoS for 1,000,000 robots

Postby pincy » Wed Jun 12, 2019 2:05 pm

I have never tried to simulate more than 100,000 robots, so I can't reply with certainty about one order of magnitude more.

In my experiments, up to 10,000 robots ARGoS scales very well. The main bottleneck are the media, because at the moment they're not parallelized. At some point I'll work on that and make it better.

Beyond 10,000, memory starts to become the issue and performance degrades. If you have lots of memory, then you shouldn't - in theory - encounter any problem, because all the counters are stored in size_t (if not, it's a bug).

Anyway, let me know if you find any issue and I'll look into it.

I have never tried -fprofile-arcs and -fprofile-use.
I made ARGoS.

jharwell
Posts: 67
Joined: Thu Jan 25, 2018 4:12 am

Re: Limitations of ARGoS for 1,000,000 robots

Postby jharwell » Fri Jun 21, 2019 2:05 pm

How hard would it be to parallelize the media? Is that something that I could do? (i.e. does it require in depth knowledge of general ARGoS architecture, or is it fairly self-contained?). I've done a lot of computational optimization in the past, a big part of which has been parallelizing non-parallel code + profiling. What would I need to look at to get started?

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Limitations of ARGoS for 1,000,000 robots

Postby pincy » Fri Jun 21, 2019 5:19 pm

It's pretty simple, really. The LED and RAB media are a large for loop that can be very easily parallelized. The only tricky part is deciding whether we want the threads to be managed by ARGoS (as the rest of the simulation) or managed internally by the medium. The first would be better for consistency, the second would be easier. The first would entail changing a few places in the code (just a couple, in fact), the second would leave everything else unchanged.
I made ARGoS.

jharwell
Posts: 67
Joined: Thu Jan 25, 2018 4:12 am

Re: Limitations of ARGoS for 1,000,000 robots

Postby jharwell » Fri Jun 28, 2019 8:48 pm

So taking a look at the code, it seems I need to update space_multi_thread_balance_quantity.cpp and space_multi_thread_balance_length.cpp so that during the phase when the media are update they are done in parallel. Is this correct? So if there are 2 media (say leds +rab), then the update steps would be done in parallel? Is that the maximum parallelism possible? Or can I push the threading down one level and parallelize the updates to each entity within a medium?

- John

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Limitations of ARGoS for 1,000,000 robots

Postby pincy » Sat Jun 29, 2019 3:48 pm

You can't parallelize each entity in the medium - that would end up being a waste of resources (I tried it in the early days of the design of ARGoS). Other than that, yes, those are the only two spots to modify.
I made ARGoS.


Return to “How to... ?”