No. It is not common to execute Python scripts or libraries from C/C++ code. If you are looking for ways to use PETSc and PyTorch together, it is best to build your application in Python so that you can use both petsc4py and PyTorch. See the following code for an example: https://github.com/caidao22/pnode
Hong (Mr.) On Jun 13, 2022, at 9:50 AM, Amneet Bhalla <[email protected]<mailto:[email protected]>> wrote: Hi Guys, Is there a PETSc interface to make calls to Python scripts or libraries (e.g., Pytorch) from a C/C++ code making use of PETSc? If so, are there some examples that I refer to? Thanks, -- --Amneet
