This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Problem installing pragmatic

0 votes

I am trying to install pragmatic from https://github.com/meshadaptation/pragmatic on my Ubuntu with Fenics 1.6.0.

When I type make in the terminal I get the following output:

[ 9%] Building CXX object CMakeFiles/coarsen_mesh_3d.dir/tools/coarsen_mesh_3d.cpp.o
In file included from /home/fenics/Downloads/pragmatic-master/tools/coarsen_mesh_3d.cpp:44:0:
/home/fenics/Downloads/pragmatic-master/include/VTKTools.h: In static member function ‘static Mesh* VTKTools::import_vtu(vtkUnstructuredGrid)’:
/home/fenics/Downloads/pragmatic-master/include/VTKTools.h:250:40: error: there are no arguments to ‘METIS_PartMeshNodal’ that depend on a template parameter, so a declaration of ‘METIS_PartMeshNodal’ must be available [-fpermissive]
&(npart[0]));
^
/home/fenics/Downloads/pragmatic-master/include/VTKTools.h:250:40: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/fenics/Downloads/pragmatic-master/include/VTKTools.h: In instantiation of ‘static Mesh
VTKTools::import_vtu(vtkUnstructuredGrid) [with real_t = double]’:
/home/fenics/Downloads/pragmatic-master/include/VTKTools.h:116:25: required from ‘static Mesh
VTKTools::import_vtu(std::string) [with real_t = double; std::string = std::basic_string]’
/home/fenics/Downloads/pragmatic-master/tools/coarsen_mesh_3d.cpp:169:69: required from here
/home/fenics/Downloads/pragmatic-master/include/VTKTools.h:250:40: error: ‘METIS_PartMeshNodal’ was not declared in this scope
make[2]: *** [CMakeFiles/coarsen_mesh_3d.dir/tools/coarsen_mesh_3d.cpp.o] Error 1
make[1]: *** [CMakeFiles/coarsen_mesh_3d.dir/all] Error 2
make: *** [all] Error 2

Is the problem related to the library?

asked Apr 19, 2016 by nicholas_ FEniCS Novice (310 points)

2 Answers

0 votes
 
Best answer

I was able to resolve this problem by installing the METIS library: the package on the Ubuntu repositories is libmetis-dev.

answered Apr 21, 2016 by FF FEniCS User (4,630 points)
selected Apr 22, 2016 by nicholas_
0 votes

This problem is related to the library. The correct install instructions are

$ git clone https://github.com/meshadaptation/pragmatic.git
$ cd pragmatic
$ cmake .
$ make

If you want to use the python interface for FEniCS and get

Failed to load libpragmatic in /usr/local/lib/libpragmatic.so

, you need to change the path in pragmatic.py or copy libpragmatic.so from the lib folder.

answered Apr 19, 2016 by KristianE FEniCS Expert (12,900 points)
edited Apr 19, 2016 by KristianE
...