I’m designing an application to solve a vehicle routing problem using ant colony optimization, and I’m looking for some advice to make sure that I can take advantage of GPU processing and CUDA at some point in the future. The application will be written in C++ and will run on linux. I’d like to keep as many options open as possible and GPU processing seems like an ideal means to solve a vehicle routing problem, I’d also like to be able to have a lot of scalability available if needed i.e multiple servers and multiple Tesla cards all working on a subset of the problem and feeding the results back to a central server.
I’m very new to GPU processing and CUDA so sorry if any of this information is already available else where……I did a quick search in the forum and on Google and couldn’t find anything that answered my questions
The questions I’ve got are:
-
Are there any specific threading api’s that work well (or should be avoided) when working with CUDA….I’m weighing up the pro’s and con’s of posix threads, OpenMP, Intel Threading Building Blocks and Boost.thread. I read somewhere that a CPU thread can only talk to one GPU at a time.
-
As the code will initially just use standard CPU type processing albeit split over many threads, are there any steps I should think about to allow CUDA and GPU processing to be added in at a later date with minimal effort/re-coding.
-
I’m planning to use MPI to allow the program to be split over several servers. Is there anything I should consider when using MPI with CUDA
To quickly introduce what the program will do……
There are a number of customers that must be services by a fleet of vehicle and the program will find the optimal route for each of the vehicles to ensure that each customer is visited whilst keeping within certain parameters.
To solve the problem I’m planning to ant colony optimization which uses an algorithm based on a set of ants. Each will act independently of all the other ants and will try various routes to solve the problem. Even though the ants are operating independently they will share a common view of the road network and customers. As the ants travel across the roads they will leave behind a pheromone trail. Other ants will use a combination of the pheromone trail and other factors when deciding which road/customer they should choose next. Over time the pheromone trail will evaporate, so roads that are frequently travelled by ants will have a stronger pheromone trail, whilst other roads will have a weak pheromone trail.
Over several thousand iterations the ants will identify the optimal routes of each of the vehicles.