[CIG-SEISMO] Post-Processing mesh2vtu can not make
Peter Danecek
Peter.Danecek at bo.ingv.it
Mon Dec 3 00:14:04 PST 2012
Hi Steven,
to execute mesh2vtu.pl, you need to compile mesh2vtu first. The perl
script mesh2vtu.pl is just a wrapper, but you can use the compiled
executable directly as well. To my understanding you have no mesh2vtu
yet, because you compilation failed. The error itself is probably due
to a wrong include path -I, but the wrong lib path would give you an
error during linking as well.
You need to point to the correct location of the vtk library, -I needs
to point to the include directory, -L to the library path. I think
there might be some inconsistency there. VTK seems to be installed in /
opt/vtk (at least it looks like that), but your Makefile points to /
usr/local/include/vtk-5.8 and /usr/local/lib/vtk-5.8, or /usr/local/
include/vtk/ or /usr/local/include/, respectively. Then check, if you
the header files you are including are present in the specified
directory ...
Hope that helps!
~petr
On 2 Dec 2012, at 17:00, 胡喆骞 wrote:
> Hello all:
>
> This is Steven. I don't known how to fix it. I need your help.
> Thank you very much!
>
> There are some publise with SPECFEM3D about Post-Processing.
> There is a error about mesh2vtu.pl as below:
> [root at Redhat mesh2vtu]# ./mesh2vtu.pl -i velocity_Z_it000400.mesh -o
> velocity_Z_it000400.vtu
> env: /SPECFEM3D/utils/Visualization/Paraview/mesh2vtu: Permission
> denied
>
> For that, VTK has been installed as below:
> [root at Redhat vtk]# ls -lF
> total 101156
> drwxr-xr-x 25 root root 4096 Dec 1 16:04 bin/
> drwxr-xr-x 23 503 503 4096 Aug 24 2011 VTK/
> -rw-r--r-- 1 root root 23745803 Sep 7 20:32 vtk-5.8.0.tar.gz
> drwxr-xr-x 4 503 503 4096 Aug 24 2011 VTKData/
> -rw-r--r-- 1 root root 79709318 Sep 7 21:23 vtkdata-5.8.0.tar.gz
>
> I installed VTK in /opt/vtk/bin.
> When 'ccmake' I set BUILD_SHARED_LIBS to ON, and PYTHON_WRAPPING
> to ON. After 'make' and 'make install', I edit .bashrc add path as
> blow:
> export LD_LIBRARY_PATH=$LD_LIBRATY_PATH:/opt/vtk/bin/bin/
> export DYLD_FALLBACK_LIBRARY_PATH=/opt/vtk/bin/bin/
> export PYTHONPATH=/opt/vtk/bin/bin/
> export PYTHONPATH=$PYTHONPATH:/opt/vtk/VTK/Wrapping/Python/
>
> But I can't run setup.pl.in which is in /opt/vtk/VTK/Wrapping/Python
> [root at Redhat Python]# python setup.py.in install
> File "setup.py.in", line 36
> vtk_use_rendering = @VTK_PYTHON_USE_RENDERING@
> ^
> SyntaxError: invalid syntax
>
> I tested python scripts in /opt/vtk/VTK/Examples/GUI/Python.
> [root at Redhat Python]# ./BoxWidget.py
> Useing Python script to run the examply of the VTK is ok. I can
> see the pop-up dialog box.
> [root at Redhat Python]# python
> Python 2.7.3 (default, Dec 1 2012, 15:04:54)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import vtk
> >>>
> Python looks good with VTK.But I'm not sure that VTK installed
> properly.
>
> After that I can not run mesh2vtu.pl too, I get the same error.
> [root at Redhat mesh2vtu]# ./mesh2vtu.pl -i velocity_Z_it000400.mesh -o
> velocity_Z_it000400.vtu
> env: /SPECFEM3D/utils/Visualization/Paraview/mesh2vtu: Permission
> denied
>
> I change files owner to root, and give all competence.
> [root at Redhat mesh2vtu]# chown root:root *
> [root at Redhat mesh2vtu]# chmod 777 *
> [root at Redhat mesh2vtu]# ll
> total 1100
> -rwxrwxrwx 1 root root 4150 Apr 18 2010 cell2vtu.cxx
> -rwxrwxrwx 1 root root 1385 Apr 18 2010 cell2vtu.pl
> -rwxrwxrwx 1 root root 736 Apr 18 2010 century2xyz.pl
> -rwxrwxrwx 1 root root 943 Dec 2 12:13 Makefile
> -rwxrwxrwx 1 root root 943 Dec 2 12:13 Makefile~
> -rwxrwxrwx 1 root root 1000 Nov 26 11:44 Makefile (copy)
> -rwxrwxrwx 1 root root 3988 Apr 18 2010 mesh2vtu.cxx
> -rwxrwxrwx 1 root root 1330 Nov 18 13:57 mesh2vtu.pl
> -rwxrwxrwx 1 root root 1346 Nov 18 13:44 mesh2vtu.pl~
> -rwxrwxrwx 1 root root 2046 Apr 18 2010 points2vtu.pl
> -rwxrwxrwx 1 root root 4195 Apr 18 2010 surf2vtu.cxx
> -rwxrwxrwx 1 root root 1399 Apr 18 2010 surf2vtu.pl
> -rwxrwxrwx 1 root root 3001 Apr 18 2010 ugrid.cxx
> -rwxrwxrwx 1 root root 1967 Apr 18 2010 ugrid_pts.cxx
> -rwxrwxrwx 1 root root 1056328 Sep 7 14:43 velocity_Z_it000400.mesh
> But the error as before.
>
> I try to 'make' in /SPECFEM3D/utils/Visualization/Paraview/
> mesh2vtu. Then I get error as blow:
> [root at Redhat mesh2vtu]# make
> g++ -O3 -I/opt/seismo-util/include -I/opt/seismo-util/include/vtk -
> Wno-
> deprecated -c mesh2vtu.cxx -o mesh2vtu.o
> mesh2vtu.cxx:39:31: error: vtk/vtkFloatArray.h: No such file or
> directory
> mesh2vtu.cxx:40:27: error: vtk/vtkPoints.h: No such file or directory
> mesh2vtu.cxx:41:30: error: vtk/vtkPointData.h: No such file or
> directory
> mesh2vtu.cxx:42:37: error: vtk/vtkUnstructuredGrid.h: No such file
> or directory
> mesh2vtu.cxx:43:46: error: vtk/vtkXMLUnstructuredGridWriter.h: No
> such file or directory
> mesh2vtu.cxx:44:53: error: vtk/
> vtkUnstructuredGridToPolyDataFilter.h: No such file or directory
> mesh2vtu.cxx:45:38: error: vtk/vtkXMLPolyDataWriter.h: No such file
> or directory
> mesh2vtu.cxx:47:31: error: vtk/vtkDelaunay3D.h: No such file or
> directory
> mesh2vtu.cxx:48:30: error: vtk/vtkCellArray.h: No such file or
> directory
> mesh2vtu.cxx:49:29: error: vtk/vtkPointSet.h: No such file or
> directory
> mesh2vtu.cxx:50:31: error: vtk/vtkHexahedron.h: No such file or
> directory
> mesh2vtu.cxx: In function ‘int main(int, char**)’:
> mesh2vtu.cxx:81: error: ‘vtkPoints’ was not declared in this
> scope
> mesh2vtu.cxx:81: error: ‘newPts’ was not declared in this scope
> mesh2vtu.cxx:81: error: ‘vtkPoints’ is not a class or namespace
> mesh2vtu.cxx:82: error: ‘vtkFloatArray’ was not declared in this
> scope
> mesh2vtu.cxx:82: error: ‘newScalars’ was not declared in this
> scope
> mesh2vtu.cxx:82: error: ‘vtkFloatArray’ is not a class or
> namespace
> mesh2vtu.cxx:94: error: ‘vtkCellArray’ was not declared in this
> scope
> mesh2vtu.cxx:94: error: ‘cells’ was not declared in this scope
> mesh2vtu.cxx:94: error: ‘vtkCellArray’ is not a class or
> namespace
> mesh2vtu.cxx:102: error: ‘vtkHexahedron’ was not declared in
> this scope
> mesh2vtu.cxx:102: error: ‘hex’ was not declared in this scope
> mesh2vtu.cxx:102: error: ‘vtkHexahedron’ is not a class or
> namespace
> mesh2vtu.cxx:118: error: ‘vtkUnstructuredGrid’ was not declared
> in this scope
> mesh2vtu.cxx:118: error: ‘dataSet’ was not declared in this scope
> mesh2vtu.cxx:118: error: ‘vtkUnstructuredGrid’ is not a class or
> namespace
> mesh2vtu.cxx:129: error: ‘vtkXMLUnstructuredGridWriter’ was not
> declared in this scope
> mesh2vtu.cxx:129: error: ‘writer’ was not declared in this scope
> mesh2vtu.cxx:129: error: ‘vtkXMLUnstructuredGridWriter’ is not a
> class or namespace
> make: *** [mesh2vtu.o] Error 1
>
> I edit Makefile in /SPECFEM3D/utils/Visualization/Paraview/
> mesh2vtu as blow:
> #############################################################
> ## modify to match your compiler defaults
> CXX=g++
>
> ## modify to match your library paths
> # VTK libraries
> VTK=/opt/vtk/bin
> LIBS=-L/usr/local/lib/vtk-5.8 -lvtkCommon -lvtkIO -lvtkRendering -
> lvtkFiltering -lvtkGraphics
>
> INCLUDES=-I/usr/local/include/vtk-5.8
> CPPFLAGS= -O3 $(INCLUDES) -Wno-deprecated
> #############################################################
> When I 'make' I get the same error:
> [root at Redhat mesh2vtu]# make
> g++ -O3 -I/usr/local/include/vtk-5.8 -Wno- deprecated -c
> mesh2vtu.cxx -o mesh2vtu.o
> mesh2vtu.cxx:39:31: error: vtk/vtkFloatArray.h: No such file or
> directory
> mesh2vtu.cxx:40:27: error: vtk/vtkPoints.h: No such file or directory
> ......
>
> I copy /opt/VTK-build/include/vtk-5.8 to /opt/VTK-build/include/vtk
> [root at Redhat mesh2vtu]# cp /opt/VTK-build/include/vtk-5.8 /opt/VTK-
> build/include/vtk
> [root at Redhat include]# ll
> total 204
> drwxr-xr-x 2 root root 4096 Nov 18 12:49 GL
> drwxr-xr-x 2 root root 4096 Dec 1 15:06 python2.7
> drwxr-xr-x 20 root root 73728 Dec 2 09:39 vtk
> drwxr-xr-x 20 root root 118784 Dec 2 09:39 vtk-5.8
>
> After that I try to edit Makefile again in /SPECFEM3D/utils/
> Visualization/Paraview/mesh2vtu.
> #############################################################
> ## modify to match your compiler defaults
> CXX=g++
>
> ## modify to match your library paths
> # VTK libraries
> VTK=/opt/vtk/bin
> LIBS=-L/usr/local/lib/vtk-5.8 -lvtkCommon -lvtkIO -lvtkRendering -
> lvtkFiltering -lvtkGraphics
>
> INCLUDES=-I/usr/local/include/
> CPPFLAGS= -O3 $(INCLUDES) -Wno-deprecated
> #############################################################
> When I 'make', I get new error as blow:
> [root at Redhat mesh2vtu]# make
> c++ -O3 -I/usr/local/include/ -Wno-deprecated -c mesh2vtu.cxx -o
> mesh2vtu.o
> In file included from /usr/local/include/vtk/vtkVariant.h:35,
> from /usr/local/include/vtk/vtkAbstractArray.h:45,
> from /usr/local/include/vtk/vtkDataArray.h:37,
> from /usr/local/include/vtk/vtkFloatArray.h:29,
> from mesh2vtu.cxx:39:
> /usr/local/include/vtk/vtkStdString.h:25:54: error: vtkstd/string:
> No such file or directory
> In file included from /usr/local/include/vtk/vtkVariant.h:36,
> from /usr/local/include/vtk/vtkAbstractArray.h:45,
> from /usr/local/include/vtk/vtkDataArray.h:37,
> from /usr/local/include/vtk/vtkFloatArray.h:29,
> from mesh2vtu.cxx:39:
> /usr/local/include/vtk/vtkUnicodeString.h:47:31: error:
> vtkSystemIncludes.h: No such file or directory
> /usr/local/include/vtk/vtkUnicodeString.h:49:25: error: vtkstd/
> vector: No such file or directory
> /usr/local/include/vtk/vtkUnicodeString.h:156: error: invalid use of
> ‘::’
> /usr/local/include/vtk/vtkUnicodeString.h:156: error: expected
> ‘;’ before ‘<’ token
> /usr/local/include/vtk/vtkUnicodeString.h:160: error:
> ‘std::vector’ has not been declared
> /usr/local/include/vtk/vtkUnicodeString.h:160: error: expected
> ‘,’ or ‘...’ before ‘<’ token
> make: *** [mesh2vtu.o] Error 1
>
> All of *.h file is in /usr/local/include/vtk/.
> What should I do for this?
> ---------------------------------------------
> Steven Hu
>
>
> _______________________________________________
> CIG-SEISMO mailing list
> CIG-SEISMO at geodynamics.org
> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-seismo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1762 bytes
Desc: not available
Url : http://geodynamics.org/pipermail/cig-seismo/attachments/20121203/76013cae/attachment-0001.bin
More information about the CIG-SEISMO
mailing list