I want to convert an existing code (C++, heavy use of STL containers, OpenMP, MPI) so that it can run on GPUs too. The code models wave propagation and uses a classic finite-difference time-domain implementation. My idea is to replace the STL containers with Thrust containers and to replace OpenMP with OpenACC. Using Thrust to replace STL was suggested to me during a (failed) submission to a Hackathon and I think it is a good idea too in case (in the future) I want to directly use CUDA.
So my questions are:
- do you agree that this is a good strategy? or not? (please explain why if you want)
- Do you have any suggestions/tips/best practices on how to successfully achieve this conversion?
- Do you have any material to recommend? (I already own and read the two OpenACC books)
Thanks a lot and do not hesitate to ask for info or clarification!