Can I use GPUs to accelerate simulation calculations?

Requests regarding how to set up experiments in ARGoS.
Ryan
Posts: 42
Joined: Wed Oct 23, 2019 3:26 am

Can I use GPUs to accelerate simulation calculations?

Postby Ryan » Thu Mar 26, 2020 1:32 pm

Hey,
I am using ARGoS for evolutionary robotics and the genetic algorithms are taking a long time to complete. And my computer is a server with a GPU. Can I use GPUs to accelerate simulation calculations? If it can be achieved, what should I do?

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

Re: Can I use GPUs to accelerate simulation calculations?

Postby pincy » Thu Mar 26, 2020 3:25 pm

No, there is no GPU support in ARGoS. It is likely that you can significantly speed up your code by
  1. Compiling it in Release (CMAKE_BUILD_TYPE=Release)
  2. Profiling where your code is being slow (you can use gprof or GooglePerfTools)
  3. Checking the performance tips for the dynamics2d engine and the rab medium (argos3 -q dynamycs2d, argos3 -q rab_medium)
I made ARGoS.

Ryan
Posts: 42
Joined: Wed Oct 23, 2019 3:26 am

Re: Can I use GPUs to accelerate simulation calculations?

Postby Ryan » Thu Mar 26, 2020 4:32 pm

Thanks!

Ryan
Posts: 42
Joined: Wed Oct 23, 2019 3:26 am

Re: Can I use GPUs to accelerate simulation calculations?

Postby Ryan » Fri Mar 27, 2020 12:23 pm

If I take a multi-process approach, will it accelerate simulation calculation?

I noticed that you have a multi-process evolutionary algorithm.
https://github.com/ilpincy/argos3-examp ... s/mpga.cpp

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

Re: Can I use GPUs to accelerate simulation calculations?

Postby pincy » Fri Mar 27, 2020 2:52 pm

Yes, you could wrap ARGoS with MPI. That would be fast.
I made ARGoS.


Return to “How to... ?”