On Thu, 18 Aug 2022, Rohan Yadav wrote:

> I see. To confirm:
> 1) There are no installations of `petsc4py` with GPU support available
> through a package manager

You could try via pip - but its not any more simple. Here the model is - you 
install petsc via pip - and then petsc4py. Here you would specify appropriate 
build options to PETSc via PETSC_CONFIGURE_OPTIONS env variable [as MPI, 
BlasLapack, CUDA are specific to your machine - and pip doesn't really now 
about them] 


> 2) Building and configuring PETSc with GPU support will also build a
> version of `petsc4py`.

PETSc configure option --with-petsc4py=1 will also build PETSc4py [along with 
PETSc]

Satish


> 
> Thanks,
> Rohan
> 
> On Thu, Aug 18, 2022 at 4:31 PM Satish Balay <ba...@mcs.anl.gov> wrote:
> 
> > You could look at PETSc install instructions and examples
> > https://petsc.org/release/install/install/#common-example-usages
> >
> > Assuming a linux box with  cuda at /usr/local/cuda, mpicc etc in PATH, and
> > have system blas/lapack installed, the following build process should work
> >
> > ./configure --with-cuda=1 --with-petsc4py && make && make check
> >
> > Satish
> >
> > On Thu, 18 Aug 2022, Rohan Yadav wrote:
> >
> > > Hi,
> > >
> > > I'm trying to use `petsc4py` on a machine with CUDA GPUs. Is there a way
> > to
> > > download a version of `petsc4py` from pip or conda with GPU support? If
> > > not, how do I go about installing `petsc4py` with GPU support from
> > source?
> > > I can't find much documentation around doing this.
> > >
> > > Thanks,
> > >
> > > Rohan
> > >
> >
> >
> 

Reply via email to