On 4 August 2010 12:44, Barry Smith <bsmith at mcs.anl.gov> wrote: > > ?Lisandro, > > ? ?We would like to help you make it possible for petsc4py to be installed by > easyinstall and automatically install PETSc with it, thus making it trivial > for Python users to start using petsc4py. How can we help make this happen? >
$ export PETSC_DIR=/path/to/petsc $ export PETSC_ARCH=arch-name $ easy_install petsc4py This should work and be enough (at least on Linux)... Disclaimer: I've not actually tested this in a long time. If it does not work, it should easy to fix. Right not I do not remember the logics to make things work with prefix and non-prefix PETSc installs, but I remember handling these two cases. > ? ?I image the petsc4py install would look for mpi4py, if it finds it then > figure out the MPI used to build it and pass that MPi information on to > PETSc's configure. Perhaps this will surprise you: petsc4py does not depend in any way on mpi4py. Still, you can still pass an mpi4py.MPI.Comm instance, and petsc4py will accept it and do the right thing... > If it does not find mpi4py then it would tell PETSc configure to not use MPI. > If this doesn't make sense, I just made it up so I can understand it might > not make sense, tell us how it should work. > petsc4py actually parses PETSc makefiles ($PETSC_ARCH/conf/petscvariables) and uses that for build. So petsc4py will use mpicc or plain gcc depending on the value of makefile variables like PCC. > ? ?We would also like to add some nightly tests for petsc-dev/petsc4py-dev > and help keep petsc4py-dev in sync with petsc-dev. > Having nightly tests running would be wonderful. About keeping it in sync with petsc-dev, I have one additional issue: keep it working against previous PETSc releases... >Satish can you check into how you can add this? > Provided that Cython is installed, It is just a matter of following the steps below: cd petsc4py-dev hg pull -u python conf/cythonize.py export PETSC_DIR=<...> export PETSC_ARCH=<...> python setup.py install --home=...|--prefix=.... python test/runtests.py PS: I'll not be available until next Monday. But all what Barry wants should be VERY easy to setup. -- Lisandro Dalcin --------------- CIMEC (INTEC/CONICET-UNL) Predio CONICET-Santa Fe Colectora RN 168 Km 472, Paraje El Pozo Tel: +54-342-4511594 (ext 1011) Tel/Fax: +54-342-4511169