[petsc-users] GPUs and the float-double dilemma

Ces VLC cesarillovlc at gmail.com
Fri Feb 10 06:59:36 CST 2023


Hi!

I searched if it’s supported to link an application to two different builds
of PETSc (one configured as float precision, and the other as double). The
last post I found on that topic was from 2016 and it said it’s not
recommended.

The point is that if you wish to prepare builds of your application for
end-users, and if your app offers the option of using GPUs, you have a
critical problem if you cannot link with two different PETSc builds in the
same executable: either you don’t provide support for most GPUs (as they
are float only), or you force float precision even when using the CPU. A
third option (shipping two executables for the app) is not practical, as
the user won’t be able to compare results without quitting the app and
running the other version.

Has the situation changed since 2016, now that GPU support is being added
to PETSc?

An obvious solution would be if PETSc could be built prepending a prefix to
all symbols (functions, structs, types, everything).

Any advances, plans, or thoughts on this?

Thanks!

César
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230210/9a9018d7/attachment.html>


More information about the petsc-users mailing list