Edwin,
I CCed the mailing list in case this is of general interest.
On May 22, 2007, at 5:16 PM, R. Edwin Garcia wrote:
Hi Dan,
PETSc was written in C. In order to run PETSc from a Python
environment you would have to do some preliminary background work
and wrap the C++ (or C) API so that it can be accessed from Python.
I hope this is not necessary. After a quick search, there seem to be
a number of wrappers out there.
<http://trilinos.sandia.gov/packages/pytrilinos/> - version
2.3.0 seems to have some python bindings, this may build a petsc
version of python
which we don't really want. We really want to
say "import petsc" and "petsc.solve(myMatrix)" if at all
possible.
<http://www.cimec.org.ar/python/> - There is also this which
requires mpi4py and states that it is integrated with numpy.
Integration with numpy
is
probably the most important consideration.
<https://elefant.developer.nicta.com.au/search?
SearchableText=pypetsc>
Also, PETSc's documentation is incredibly confusing, and the only
way to figure out what the heck it does is by playing with the
examples. As I am sure you know, if a code is run in parallel, you
will have to start up all the processes at the beginning of the
program, using MPI_init() (plus the PETSC_Init() call that he will
make before making any PETSc calls), among other individual MPI and
PETSc-related calls. In other words, making a code parallel
requires to make a lot of very small changes into your program
(like parallelizing the mesh, and making everything "collect" at
the right time in order to display it/plot it). If the student has
a degree/background in Comp
At some level we would like to first use petsc without its parallel
function. Simply have access to the solver routines. I understand
that we will still
require the parallel mechanics , but will not have to deal with any
decomposition in fipy. Hopefully.
uter Science he might enjoy integrating PETSc into FiPy. However,
If there is already a set of libraries that make parallel
processing calls (MPI calls) at the Python level I would suggest
him/her to use that instead and skip the "wrapping" of the
subroutines so that they can be used at the Python level.
There are a number of python modules that work with MPI. As I said,
we are not currently interested in making fipy parallel, but
merely accessing the serial functionality of petsc. I assume that is
less of a headache.
I hope this was helpful. If you have any comments or questions,
please feel free to give me a call. Today I will be in my office
until 2:45PM. You can find me at home around 6PM and until 8:30PM.
Cheers,
Edwin
On May 22, 2007, at 10:47 AM, Daniel Wheeler wrote:
Hi Edwin,
Hope all is well.
I was wondering if you could give us your impressions of petsc. We
have a summer student who
will be starting next week with us and it is our hope that he will
make some progress integrating petsc
as a solver module for fipy. Do you see this as a realistic goal?
We have also been thinking about using pytrilinos <http://
trilinos.sandia.gov/packages/pytrilinos/>.
The blurb states that it is well integrated with numpy and scipy,
which may not be the case for petsc.
Thanks
--
Daniel Wheeler
--
Daniel Wheeler