> I've been trying to link deal.II with PETSc but I'm having problems
> running the example 'step-1'.
> Still the following error message:
>
> cpolind...@sagan:/usr/local/deal.II/examples/step-1$ ./step-1
> ./step-1: error while loading shared libraries: libpetscksp.so: cannot
> open shared object file: No such file or directory

You are indeed having link troubles. You need to let your environment know
where your PETSc shared libraries exist so he can link it all in. Here's
one way you can do that:

(1) Add to your ~/.bashrc the following three lines modified to suit your
system (ie change "/path/to/petsc" and "petsc_arch")

PETSC_DIR=/path/to/petsc; export PETSC_DIR
PETSC_ARCH=petsc_arch; export PETSC_ARCH
export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib:${LD_LIBRARY_PATH}:

that should add the localtion of PETSc to your linker path. This is
equivalent to the export commands you used to compile PETSc (if you
compiled PETSc), but makes them permanent in your environment.

(2) Run "source ~/.bashrc" in your terminal window to refresh your
environment.

Then, you should be ok.

By-the-way:

> I've tried changing the
> permissions to the files and running the executable in SUDO mode, but
> nothing.

Never do that, not even to see what happens!

Best,
        Toby



-----

Toby D. Young
Assistant Professor
Philosophy-Physics
Polish Academy of Sciences
Warszawa, Polska

www:   http://www.ippt.gov.pl/~tyoung
skype: stenografia

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to