building libraries

Satish Balay balay at mcs.anl.gov
Thu Jun 1 12:11:36 CDT 2006


Did you try PETSc examples before attempting your code? Do they work?

Looks like you are not using PETSc makefiles. This is the recommended
thing to do.

If you want to have your own makefiles - do the following - and make
sure all the comile options you see are listed in your makefile.

cd src/ksp/ksp/examples
make ex2

You can also get this info with the following [in PETSC_DIR]:

make getpetscflags
make getincludedirs
make getlinklibs

Satish

On Thu, 1 Jun 2006, Matt Funk wrote:

> Thanks for the replies, 
> 
> the whole mpicc is a little system specific. It build the libraries after all, 
> so it's fine.
> 
> However, now i got another question. I link the libraries into my program, and 
> then in my top level code i include petscksp.h. When i try to compile it, it 
> gives me the following error:
> 
> In file included 
> from /home2/users/mafunk/AMR/PETSC/petsc-2.3.1-p12/include/petscis.h:7,
>                  
> from /home2/users/mafunk/AMR/PETSC/petsc-2.3.1-p12/include/petscvec.h:9,
>                  
> from /home2/users/mafunk/AMR/PETSC/petsc-2.3.1-p12/include/petscmat.h:6,
>                  
> from /home2/users/mafunk/AMR/PETSC/petsc-2.3.1-p12/include/petscpc.h:6,
>                  
> from /home2/users/mafunk/AMR/PETSC/petsc-2.3.1-p12/include/petscksp.h:6,
>                  from testNodePoisson.cpp:65:
> /home2/users/mafunk/AMR/PETSC/petsc-2.3.1-p12/include/petsc.h:13:23: 
> petscconf.h: No such file or directory
> 
> The only include directory that i have specified is /include in the petsc root 
> directory. I couldn't find petscconf.h anywhere, so i was wondering if 
> somebody knows what i am doing wrong here.
> 
> thanks
> mat
> 
> 
> On Wednesday 31 May 2006 16:08, Matthew Knepley wrote:
> > You can have PETSc install MPI using --download-mpich. You can make
> > sure that it does not use mpicc using --with-mpi-compilers=0.
> >
> >    Matt
> >
> > On 5/31/06, Matt Funk <mafunk at nmsu.edu> wrote:
> > > Hi,
> > >
> > > i need to build PETsC on s sycld machine. Basically i need to have MPI
> > > support
> > > in PetsC but i need to switch from using mpicc to gcc.
> > >
> > > I was wondering if someone could point to how i can do that. (Is there an
> > > option that i overlooked?)
> > >
> > > thanks
> > > mat
> 
> 




More information about the petsc-users mailing list