<div><div>Hello all:</div><div><br></div><div> This is Steven. I don't known how to fix it. I need your help. Thank you very much!</div><div> </div><div> There are some publise with SPECFEM3D about Post-Processing. </div>
<div> There is a error about <a href="http://mesh2vtu.pl" target="_blank">mesh2vtu.pl</a> as below:</div><div><span style="background-color:rgb(204,204,204)">[root@Redhat mesh2vtu]# ./<a href="http://mesh2vtu.pl" target="_blank">mesh2vtu.pl</a> -i velocity_Z_it000400.mesh -o velocity_Z_it000400.vtu</span></div>
<div><span style="background-color:rgb(204,204,204)">env: /SPECFEM3D/utils/Visualization/Paraview/mesh2vtu: Permission denied</span></div><div><br></div><div> For that, VTK has been installed as below:</div><div><span style="background-color:rgb(204,204,204)">[root@Redhat vtk]# ls -lF</span></div>
<div><span style="background-color:rgb(204,204,204)">total 101156</span></div><div><span style="background-color:rgb(204,204,204)">drwxr-xr-x 25 root root 4096 Dec 1 16:04 bin/</span></div><div><span style="background-color:rgb(204,204,204)">drwxr-xr-x 23 503 503 4096 Aug 24 2011 VTK/</span></div>
<div><span style="background-color:rgb(204,204,204)">-rw-r--r-- 1 root root 23745803 Sep 7 20:32 vtk-5.8.0.tar.gz</span></div><div><span style="background-color:rgb(204,204,204)">drwxr-xr-x 4 503 503 4096 Aug 24 2011 VTKData/</span></div>
<div><span style="background-color:rgb(204,204,204)">-rw-r--r-- 1 root root 79709318 Sep 7 21:23 vtkdata-5.8.0.tar.gz</span></div><div><br></div><div> I installed VTK in /opt/vtk/bin.</div><div> 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:</div>
<div><span style="background-color:rgb(204,204,204)">export LD_LIBRARY_PATH=$LD_LIBRATY_PATH:/opt/vtk/bin/bin/</span></div><div><span style="background-color:rgb(204,204,204)">export DYLD_FALLBACK_LIBRARY_PATH=/opt/vtk/bin/bin/</span></div>
<div><span style="background-color:rgb(204,204,204)">export PYTHONPATH=/opt/vtk/bin/bin/</span></div><div><span style="background-color:rgb(204,204,204)">export PYTHONPATH=$PYTHONPATH:/opt/vtk/VTK/Wrapping/Python/</span></div>
<div><br></div><div> But I can't run <a href="http://setup.pl.in" target="_blank">setup.pl.in</a> which is in /opt/vtk/VTK/Wrapping/Python</div><div><span style="background-color:rgb(204,204,204)">[root@Redhat Python]# python <a href="http://setup.py.in" target="_blank">setup.py.in</a> install</span></div>
<div><span style="background-color:rgb(204,204,204)"> File "<a href="http://setup.py.in" target="_blank">setup.py.in</a>", line 36</span></div><div><span style="background-color:rgb(204,204,204)"> vtk_use_rendering = @VTK_PYTHON_USE_RENDERING@</span></div>
<div><span style="background-color:rgb(204,204,204)"> ^</span></div><div><span style="background-color:rgb(204,204,204)">SyntaxError: invalid syntax</span></div><div><br></div><div> I tested python scripts in /opt/vtk/VTK/Examples/GUI/Python.</div>
<div><span style="background-color:rgb(204,204,204)">[root@Redhat Python]# ./BoxWidget.py </span></div><div><span style="background-color:rgb(204,204,204)"> Useing Python script to run the examply of the VTK is ok. I can see the pop-up dialog box.</span></div>
<div><span style="background-color:rgb(204,204,204)">[root@Redhat Python]# python</span></div><div><span style="background-color:rgb(204,204,204)">Python 2.7.3 (default, Dec 1 2012, 15:04:54) </span></div><div><span style="background-color:rgb(204,204,204)">[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2</span></div>
<div><span style="background-color:rgb(204,204,204)">Type "help", "copyright", "credits" or "license" for more information.</span></div><div><span style="background-color:rgb(204,204,204)">>>> import vtk</span></div>
<div><span style="background-color:rgb(204,204,204)">>>> </span></div><div> Python looks good with VTK.But I'm not sure that VTK installed properly.</div><div><br></div><div> After that I can not run <a href="http://mesh2vtu.pl" target="_blank">mesh2vtu.pl</a> too, I get the same error.</div>
<div><span style="background-color:rgb(204,204,204)">[root@Redhat mesh2vtu]# ./<a href="http://mesh2vtu.pl" target="_blank">mesh2vtu.pl</a> -i velocity_Z_it000400.mesh -o velocity_Z_it000400.vtu</span></div><div><span style="background-color:rgb(204,204,204)">env: /SPECFEM3D/utils/Visualization/Paraview/mesh2vtu: Permission denied</span></div>
<div><br></div><div> I change files owner to root, and give all competence.</div><div><span style="background-color:rgb(204,204,204)">[root@Redhat mesh2vtu]# chown root:root *</span></div><div><span style="background-color:rgb(204,204,204)">[root@Redhat mesh2vtu]# chmod 777 *</span></div>
<div><span style="background-color:rgb(204,204,204)">[root@Redhat mesh2vtu]# ll</span></div><div><span style="background-color:rgb(204,204,204)">total 1100</span></div><div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 4150 Apr 18 2010 cell2vtu.cxx</span></div>
<div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 1385 Apr 18 2010 <a href="http://cell2vtu.pl" target="_blank">cell2vtu.pl</a></span></div><div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 736 Apr 18 2010 <a href="http://century2xyz.pl" target="_blank">century2xyz.pl</a></span></div>
<div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 943 Dec 2 12:13 Makefile</span></div><div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 943 Dec 2 12:13 Makefile~</span></div>
<div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 1000 Nov 26 11:44 Makefile (copy)</span></div><div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 3988 Apr 18 2010 mesh2vtu.cxx</span></div>
<div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 1330 Nov 18 13:57 <a href="http://mesh2vtu.pl" target="_blank">mesh2vtu.pl</a></span></div><div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 1346 Nov 18 13:44 <a href="http://mesh2vtu.pl" target="_blank">mesh2vtu.pl</a>~</span></div>
<div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 2046 Apr 18 2010 <a href="http://points2vtu.pl" target="_blank">points2vtu.pl</a></span></div><div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 4195 Apr 18 2010 surf2vtu.cxx</span></div>
<div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 1399 Apr 18 2010 <a href="http://surf2vtu.pl" target="_blank">surf2vtu.pl</a></span></div><div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 3001 Apr 18 2010 ugrid.cxx</span></div>
<div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 1967 Apr 18 2010 ugrid_pts.cxx</span></div><div><span style="background-color:rgb(204,204,204)">-rwxrwxrwx 1 root root 1056328 Sep 7 14:43 velocity_Z_it000400.mesh</span></div>
<div> But the error as before.</div><div><br></div><div> I try to 'make' in /SPECFEM3D/utils/Visualization/Paraview/mesh2vtu. Then I get error as blow:</div><div><span style="background-color:rgb(204,204,204)">[root@Redhat mesh2vtu]# make</span></div>
<div><span style="background-color:rgb(204,204,204)"> g++ -O3 -I/opt/seismo-util/include -I/opt/seismo-util/include/vtk -Wno- </span></div><div><span style="background-color:rgb(204,204,204)"> deprecated -c mesh2vtu.cxx -o mesh2vtu.o</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:39:31: error: vtk/vtkFloatArray.h: No such file or directory</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:40:27: error: vtk/vtkPoints.h: No such file or directory</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:41:30: error: vtk/vtkPointData.h: No such file or directory</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:42:37: error: vtk/vtkUnstructuredGrid.h: No such file or directory</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:43:46: error: vtk/vtkXMLUnstructuredGridWriter.h: No such file or directory</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:44:53: error: vtk/vtkUnstructuredGridToPolyDataFilter.h: No such file or directory</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:45:38: error: vtk/vtkXMLPolyDataWriter.h: No such file or directory</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:47:31: error: vtk/vtkDelaunay3D.h: No such file or directory</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:48:30: error: vtk/vtkCellArray.h: No such file or directory</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:49:29: error: vtk/vtkPointSet.h: No such file or directory</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:50:31: error: vtk/vtkHexahedron.h: No such file or directory</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx: In function ‘int main(int, char**)’:</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:81: error: ‘vtkPoints’ was not declared in this scope</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:81: error: ‘newPts’ was not declared in this scope</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:81: error: ‘vtkPoints’ is not a class or namespace</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:82: error: ‘vtkFloatArray’ was not declared in this scope</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:82: error: ‘newScalars’ was not declared in this scope</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:82: error: ‘vtkFloatArray’ is not a class or namespace</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:94: error: ‘vtkCellArray’ was not declared in this scope</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:94: error: ‘cells’ was not declared in this scope</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:94: error: ‘vtkCellArray’ is not a class or namespace</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:102: error: ‘vtkHexahedron’ was not declared in this scope</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:102: error: ‘hex’ was not declared in this scope</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:102: error: ‘vtkHexahedron’ is not a class or namespace</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:118: error: ‘vtkUnstructuredGrid’ was not declared in this scope</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:118: error: ‘dataSet’ was not declared in this scope</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:118: error: ‘vtkUnstructuredGrid’ is not a class or namespace</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:129: error: ‘vtkXMLUnstructuredGridWriter’ was not declared in this scope</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:129: error: ‘writer’ was not declared in this scope</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:129: error: ‘vtkXMLUnstructuredGridWriter’ is not a class or namespace</span></div>
<div><span style="background-color:rgb(204,204,204)"> make: *** [mesh2vtu.o] Error 1</span></div><div><br></div><div> I edit Makefile in /SPECFEM3D/utils/Visualization/Paraview/mesh2vtu as blow:</div><div><span style="background-color:rgb(204,204,204)">#############################################################</span></div>
<div><span style="background-color:rgb(204,204,204)">## modify to match your compiler defaults </span></div><div><span style="background-color:rgb(204,204,204)">CXX=g++</span></div><div><span style="background-color:rgb(204,204,204)"><br>
</span></div><div><span style="background-color:rgb(204,204,204)">## modify to match your library paths</span></div><div><span style="background-color:rgb(204,204,204)"># VTK libraries</span></div><div><span style="background-color:rgb(204,204,204)">VTK=/opt/vtk/bin</span></div>
<div><span style="background-color:rgb(204,204,204)">LIBS=-L/usr/local/lib/vtk-5.8 -lvtkCommon -lvtkIO -lvtkRendering -lvtkFiltering -lvtkGraphics</span></div><div><span style="background-color:rgb(204,204,204)"><br></span></div>
<div><span style="background-color:rgb(204,204,204)">INCLUDES=-I/usr/local/include</span><font style="background-color:rgb(0,0,255)" color="#ffffff">/vtk-5.8</font></div><div><span style="background-color:rgb(204,204,204)">CPPFLAGS= -O3 $(INCLUDES) -Wno-deprecated</span></div>
<div><span style="background-color:rgb(204,204,204)">#############################################################</span></div><div> When I 'make' I get the same error:</div><div><span style="background-color:rgb(204,204,204)">[root@Redhat mesh2vtu]# make</span></div>
<div><span style="background-color:rgb(204,204,204)"> g++ -O3 -I</span><span style="background-color:rgb(204,204,204)">/usr/local/include</span><span style="background-color:rgb(204,204,204)">/vtk-5.8 -Wno- </span><span style="background-color:rgb(204,204,204)"> deprecated -c mesh2vtu.cxx -o mesh2vtu.o</span></div>
<div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:39:31: error: vtk/vtkFloatArray.h: No such file or directory</span></div><div><span style="background-color:rgb(204,204,204)"> mesh2vtu.cxx:40:27: error: vtk/vtkPoints.h: No such file or directory</span></div>
<div><span style="background-color:rgb(204,204,204)">......</span></div><div><br></div><div> I copy /opt/VTK-build/include/vtk-5.8 to /opt/VTK-build/include/vtk</div><div><span style="background-color:rgb(204,204,204)">[root@Redhat mesh2vtu]# cp /opt/VTK-build/include/vtk-5.8 /opt/VTK-build/include/vtk</span></div>
<div><span style="background-color:rgb(204,204,204)">[root@Redhat include]# ll</span></div><div><span style="background-color:rgb(204,204,204)">total 204</span></div><div><span style="background-color:rgb(204,204,204)">drwxr-xr-x 2 root root 4096 Nov 18 12:49 GL</span></div>
<div><span style="background-color:rgb(204,204,204)">drwxr-xr-x 2 root root 4096 Dec 1 15:06 python2.7</span></div><div><span style="background-color:rgb(204,204,204)">drwxr-xr-x 20 root root 73728 Dec 2 09:39 vtk</span></div>
<div><span style="background-color:rgb(204,204,204)">drwxr-xr-x 20 root root 118784 Dec 2 09:39 vtk-5.8</span></div><div><br></div><div> After that I try to edit Makefile again in /SPECFEM3D/utils/Visualization/Paraview/mesh2vtu.</div>
<div><span style="background-color:rgb(204,204,204)">#############################################################</span></div><div><span style="background-color:rgb(204,204,204)">## modify to match your compiler defaults </span></div>
<div><span style="background-color:rgb(204,204,204)">CXX=g++</span></div><div><span style="background-color:rgb(204,204,204)"><br></span></div><div><span style="background-color:rgb(204,204,204)">## modify to match your library paths</span></div>
<div><span style="background-color:rgb(204,204,204)"># VTK libraries</span></div><div><span style="background-color:rgb(204,204,204)">VTK=/opt/vtk/bin</span></div><div><span style="background-color:rgb(204,204,204)">LIBS=-L/usr/local/lib/vtk-5.8 -lvtkCommon -lvtkIO -lvtkRendering -lvtkFiltering -lvtkGraphics</span></div>
<div><span style="background-color:rgb(204,204,204)"><br></span></div><div><span style="background-color:rgb(204,204,204)">INCLUDES=-I/usr/local/include</span><span style="background-color:rgb(0,0,255)"><font color="#ffffff">/</font></span></div>
<div><span style="background-color:rgb(204,204,204)">CPPFLAGS= -O3 $(INCLUDES) -Wno-deprecated</span></div><div><span style="background-color:rgb(204,204,204)">#############################################################</span></div>
<div> When I 'make', I get new error as blow:</div><div><span style="background-color:rgb(204,204,204)">[root@Redhat mesh2vtu]# make</span></div><div><span style="background-color:rgb(204,204,204)">c++ -O3 -I/usr/local/include/ -Wno-deprecated -c mesh2vtu.cxx -o mesh2vtu.o</span></div>
<div><span style="background-color:rgb(204,204,204)">In file included from /usr/local/include/vtk/vtkVariant.h:35,</span></div><div><span style="background-color:rgb(204,204,204)"> from /usr/local/include/vtk/vtkAbstractArray.h:45,</span></div>
<div><span style="background-color:rgb(204,204,204)"> from /usr/local/include/vtk/vtkDataArray.h:37,</span></div><div><span style="background-color:rgb(204,204,204)"> from /usr/local/include/vtk/vtkFloatArray.h:29,</span></div>
<div><span style="background-color:rgb(204,204,204)"> from mesh2vtu.cxx:39:</span></div><div><span style="background-color:rgb(204,204,204)">/usr/local/include/vtk/vtkStdString.h:25:54: error: vtkstd/string: No such file or directory</span></div>
<div><span style="background-color:rgb(204,204,204)">In file included from /usr/local/include/vtk/vtkVariant.h:36,</span></div><div><span style="background-color:rgb(204,204,204)"> from /usr/local/include/vtk/vtkAbstractArray.h:45,</span></div>
<div><span style="background-color:rgb(204,204,204)"> from /usr/local/include/vtk/vtkDataArray.h:37,</span></div><div><span style="background-color:rgb(204,204,204)"> from /usr/local/include/vtk/vtkFloatArray.h:29,</span></div>
<div><span style="background-color:rgb(204,204,204)"> from mesh2vtu.cxx:39:</span></div><div><span style="background-color:rgb(204,204,204)">/usr/local/include/vtk/vtkUnicodeString.h:47:31: error: vtkSystemIncludes.h: No such file or directory</span></div>
<div><span style="background-color:rgb(204,204,204)">/usr/local/include/vtk/vtkUnicodeString.h:49:25: error: vtkstd/vector: No such file or directory</span></div><div><span style="background-color:rgb(204,204,204)">/usr/local/include/vtk/vtkUnicodeString.h:156: error: invalid use of ‘::’</span></div>
<div><span style="background-color:rgb(204,204,204)">/usr/local/include/vtk/vtkUnicodeString.h:156: error: expected ‘;’ before ‘<’ token</span></div><div><span style="background-color:rgb(204,204,204)">/usr/local/include/vtk/vtkUnicodeString.h:160: error: ‘std::vector’ has not been declared</span></div>
<div><span style="background-color:rgb(204,204,204)">/usr/local/include/vtk/vtkUnicodeString.h:160: error: expected ‘,’ or ‘...’ before ‘<’ token</span></div><div><span style="background-color:rgb(204,204,204)">make: *** [mesh2vtu.o] Error 1</span></div>
<div><br></div><div> All of *.h file is in /usr/local/include/vtk/.</div><div> What should I do for this? </div>---------------------------------------------<div>Steven Hu</div><div><br></div><br>
</div>