[petsc-users] how to compile the example code

Satish Balay balay at mcs.anl.gov
Wed Oct 22 14:31:07 CDT 2014


You can copy the current example makefile (remove unneeded stuff) -
and modify as needed.

Satish

On Wed, 22 Oct 2014, paul zhang wrote:

> Satish,
> 
> It works. Thanks a lot. Well, if I'm going to write my own code, I have to
> write a new make file, right?
> 
> Paul
> 
> On Wed, Oct 22, 2014 at 3:16 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> 
> >
> > Have you tried using the makefile provided along with the example?
> >
> > for eg:
> >
> > cd src/ksp/ksp/examples/tutorials
> > make ex1 PETSC_DIR=/home/paul/LIB/petsc/
> >
> > Satish
> >
> > On Wed, 22 Oct 2014, paul zhang wrote:
> >
> > > Hello,
> > >
> > > I'm not quite sure how to link the petscksp.h correctly so that I can
> > > compile the ex1.c file and run it in my computer. Can you shed some
> > light?
> > > The PETSc package has been installed  to /home/paul/LIB/petsc/.
> > >
> > >
> > > Thanks,
> > > Paul
> > >
> >
> >
> 
> 
> 



More information about the petsc-users mailing list