2

I have mpi program to distribute the large array amongst several processes on cluster.

Each process calculates its own sum of array elements and returns the result to host.

I want to run parallel prefix scan on array elements of each process.

Any idea whether it is possible with CUDPP. ?

Has anyone used openmpi and cudpp together?

Coder
  • 3,090
  • 8
  • 49
  • 85

1 Answers1

1

There's no reason why you can't combine CUDPP and MPI in the same application. They are orthogonal.

You could also consider using Thrust's scan implementation, if you're using Fortran then see this blog post for some guidance.

Tom
  • 20,852
  • 4
  • 42
  • 54
  • 2
    And as one of the authors of CUDPP, I would highly recommend you use [Thrust](http://thrust.github.com) instead. Note that if you want to do a huge prefix sum across MPI ranks, you will also need to implement the MPI code to scan the sums for each rank and then offset the per-element results within each rank. – harrism Apr 24 '12 at 10:47
  • That's a good point, for some reason I was assuming Fortran (with ISO bindings for CUDPP). Thrust requires C++ of course, but if that's ok then it's a really elegant way of using high performance primitives. – Tom Apr 24 '12 at 13:12
  • @harrism: thanks, I've added to the answer and linked to Massimiliano's blog post on calling Thrust from Fortran. – Tom Apr 25 '12 at 09:28
  • Thanks for the reply. I do not want to use C++ hence i cant use Thrust. Can you please point me to the installation tutorial of CUDPP? Currently I am using OpenMPI 1.4.5 and CUDA 4.1 toolkit. I would like to install CUDPP. Also my current mpi code distributes the large array to the different processes then each process calculates the sum of array elements and returns the result to master process. Master process then gives the final sum. I just want to perform the sum operation using GPUs and would like to use CUDPP to do that. Are there any tutorials using this kind of combination? – Coder Apr 26 '12 at 03:02
  • If you check the blog post linked above you can see how to call Thrust from your Fortran code, if you're using C you can similarly wrap Thrust into C bindings. If you do want to use CUDPP (which, incidentally, uses Thrust for some operations internally), check out the project page (http://code.google.com/p/cudpp/) for more information, in particular this wiki page: http://code.google.com/p/cudpp/wiki/BuildingCUDPPwithCMake. If you have a specific issue, feel free to ask it as a question (better than in the comments). – Tom Apr 26 '12 at 10:38
  • I am using cuda 4.1 toolkit and i found out that it has built in thrust support :) Thanks for ur help – Coder Apr 27 '12 at 03:46