4 ms·
There are already Python wrapper libraries for PETSc: https://petsc.org/release/petsc4py/ https://petsc.org/release/petsc4py/ I am not a HPC user or developer
by thesuperbigfrog 2y ago
There are already Python wrapper libraries for PETSc: https://petsc.org/release/petsc4py/ https://petsc.org/release/petsc4py/
I am not a HPC user or developer, but I have written Python wrapper libraries for C libraries. It is fairly easy to do, but it looks like some of what you are looking for is already done.
- megaloblasto 2y agoThank you for the reply. I do know about these wrappers, but the documentation is lacking, and there are a few things that I want to implement that are not possible in PETSc. I'm not sure I want to fork the repo and add the things that I need.
- thesuperbigfrog 2y agoAs others have stated in the comments, scientific computing in pure Python is likely to be too slow and possibly difficult to deploy on HPC nodes. Most use of Python in scientific computing and research tends to be as a high-level "glue" or scripting language that calls extremely optimized C, C++, or FORTRAN libraries. Most of the libraries involved are decades old, very mature, and widely used. Depending on what you are trying to do, it might be possible to use CUDA or other GPU-based parallelization libraries. Rust-based libraries might exist, but are likely to be considerably younger, possibly buggy for some problem-set edge cases, and less widely used than their corresponding C, C++, or FORTRAN counterparts. Ambition and building new things to solve problems is always good, but your professors know what works. If you are building new things, I would make sure to compare your work with existing solutions to verify that the new stuff is behaving correctly. Best of luck in your endeavors!
- megaloblasto 2y agoThank you!
- PaulHoule 2y agoI remember using a Lua front end to FORTRAN programs in the mid 1990s. Python is fine as a scripting language to script components written in a systems language but you don’t want to do billions of FLOPS with it.