I want to incorporate matrix solver into my program. Is it possible to separate out any library of matrix solver from PETSc? I am working in C language. It will be very helpful if I get any library without installing PETSc. If I get it, then I will just add those source codes and will use it.
Installing only a portion of PETSc
petsc;library
You can configure with separate libraries (--with-single-library=0) and link only the ones you need (e.g., -lpetscmat -lpetscvec -lpetscsys), but this is generally a waste of effort. If you use static libraries, then only the parts you reference go into the binary (if you're trying to squeeze the last megabyte out of a memory-constrained environment). PETSc compiles in about one minute, so build time is not a reason. We don't distribute stand-alone sub-components only because it's simpler to build everything and configure is really the hard part of distribution.