<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 10, 2023 at 8:16 AM Ces VLC <<a href="mailto:cesarillovlc@gmail.com">cesarillovlc@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<div><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">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.</div></blockquote><div>Why do you say most GPUs are float only?  I do not have a survey but the NVIDIA, AMD, Intel GPUs I have access to all support double :)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><br></div><div dir="auto">Has the situation changed since 2016, now that GPU support is being added to PETSc?</div><div dir="auto"><br></div><div dir="auto">An obvious solution would be if PETSc could be built prepending a prefix to all symbols (functions, structs, types, everything).</div></blockquote><div>Sounds like a bomb </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><br></div><div dir="auto">Any advances, plans, or thoughts on this?</div></blockquote><div>Interfacing petsc with libraries (e.g.,Gingko) that support mixed-precision could be an approach. But we have not tried that yet. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><br></div><div dir="auto">Thanks!</div><div dir="auto"><br></div><div dir="auto">César</div><div dir="auto"><br></div>
</blockquote></div></div>