I have to choose between the PETSc and Trilinos libraries for a project that involves the solution of non-linear systems of equations.

From their web sites they both mention support for GPUs, without giving many details (e.g. here and here).

I would like to know which of these libraries is better for GPGPU. In particular, I am looking for a library that, on the basis of the same calling source code, can use either the CPU or the GPU on the basis of a pre-compiler switch or, better, dynamically, on the basis of the time taken to run the computations and to move the data in and out the graphics memory.

  • 1
    $\begingroup$ Hi pietro, and welcome to scicomp. The word "better" can have many interpretations: e.g. Peak performance, portability, user friendliness, etc... What metrics are you most concerned with? $\endgroup$
    – Paul
    Oct 6 '14 at 14:56
  • $\begingroup$ Hi Paul. I just elaborated my question. Thank you. $\endgroup$
    – Pietro
    Oct 6 '14 at 15:06

As of writing this answer (October 2014), Trilinos does not have this capability throughout its code base. There are two packages (Kokkos and Tpetra) that will provide this functionality to Trilinos, but neither are used widely throughout the remainder of the library. The Trilinos plan (as far as I understand it) foresees new packages (and some revamped old packages) to either switch from Epetra to Tpetra for their basic linear algebra needs, or to switch to the Xpetra wrappers that abstract away the differences between Epetra and Tpetra. The majority of packages have not been converted yet.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.