Issue with running the following files. I downloaded biharmonic.ufl , main.cpp and cmakelist.txt from dolfin documentation. I did cmake but after doing make I face the error which is given below

ravina@ravina:~/Downloads$ cd biharmonic/
ravina@ravina:~/Downloads/biharmonic$ cmake .
– The C compiler identification is GNU 7.4.0
– The CXX compiler identification is GNU 7.4.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:15 (cmake_policy):
The OLD behavior for policy CMP0028 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.

– Configuring done
– Generating done
– Build files have been written to: /home/ravina/Downloads/biharmonic
ravina@ravina:~/Downloads/biharmonic$ make
Scanning dependencies of target demo_biharmonic
[ 50%] Building CXX object CMakeFiles/demo_biharmonic.dir/main.cpp.o
In file included from /usr/include/dolfin/common/dolfin_common.h:9:0,
from /usr/include/dolfin.h:6,
from /home/ravina/Downloads/biharmonic/main.cpp:2:
/usr/include/dolfin/common/types.h:24:10: fatal error: petscsys.h: No such file or directory
#include <petscsys.h>
^~~~~~~~~~~~
compilation terminated.
CMakeFiles/demo_biharmonic.dir/build.make:62: recipe for target ‘CMakeFiles/demo_biharmonic.dir/main.cpp.o’ failed
make[2]: *** [CMakeFiles/demo_biharmonic.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/demo_biharmonic.dir/all’ failed
make[1]: *** [CMakeFiles/demo_biharmonic.dir/all] Error 2
Makefile:83: recipe for target ‘all’ failed
make: *** [all] Error 2
ravina@ravina:~/Downloads/biharmonic$

Looks like either you don’t have PETSc installed, or you haven’t set your PETSC_DIR or make is failing to find PETSc in your include directories.

My PETsc is in /usr/lib/petscdir/37.7/x86_64_linux-gnu-real/include/petsc. but the same errror I found. Kindly help me regarding the same. Thanku.

Then you need to carefully go over your compilation process and make sure each stage is linking correctly and PETSc is discoverable by cmake/make.

I did this but didn’t get the result. I discussed this with other people also but they also were not able to do it.