<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 06/13/2015 08:12 PM, Burlen Loring
wrote:<br>
</div>
<blockquote cite="mid:557CF108.2080402@gmail.com" type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div class="moz-cite-prefix">It's hard for me to say, I've never
seen the stein mesh package, and googling doesn't turn anything
up. Perhaps you could share the dataset itself? I'm sure someone
here could quickly reproduce the issue and perhaps suggest a
fix.<br>
</div>
</blockquote>
<br>
I'll ask if I can share the data set, but it's half a terabyte in
size! I only read it in a small part of it for this test, so I
suppose I could splice that out. The stein mesh package is some
python that I wrote to import the mesh coordinates. It's simply some
data specified as follows:<br>
<br>
MX=504<br>
MY=500<br>
MZ=504<br>
<br>
xcoords = [<br>
0.0000000000000000e+00, 9.5238097012042999e-02,
1.9047619402408600e-01, <br>
#... list of x coordinates<br>
]<br>
<br>
ycoords = [<br>
-5.5000001192092896e-01, -5.3477758169174194e-01,
-5.1964950561523438e-01, <br>
#... list of y coordinates<br>
]<br>
<br>
zcoords = [<br>
0.0000000000000000e+00, 9.5238097012042999e-02,
1.9047619402408600e-01, <br>
#... list of z coordinates<br>
]<br>
<br>
Hopefully, that is enough to give you the information you need.
Thanks.<br>
<br>
-jeff<br>
<blockquote cite="mid:557CF108.2080402@gmail.com" type="cite">
<div class="moz-cite-prefix"> <br>
On 6/12/2015 3:27 PM, Jeff Becker wrote:<br>
</div>
<blockquote cite="mid:557B5CDC.8090804@nasa.gov" type="cite">
<div class="moz-cite-prefix">On 06/11/2015 01:05 PM, Burlen
Loring wrote:<br>
</div>
<blockquote cite="mid:5579E9F5.4050206@gmail.com" type="cite">
you ran out of memory.<br>
<br>
You may need more than 1 node, and a parallel file format.<br>
<br>
You mentioned that you had a grid of 500 x 500 points. You
could save a lot of memory by using vtkImageData,
vtkRectilinearMesh or vtkStructuredGrid if your data is
amenable to one of those.<br>
</blockquote>
<br>
I switched to using vtkStructuredGrid. However, after reading
the file in ParaView, and attempting to volume render I get the
seg. fault in pvserver below. I am creating my grid in python as
follows (steinmesh contains the grid coordinates):<br>
<br>
<br>
import os<br>
import numpy as np<br>
import steinmesh as mesh<br>
import itertools<br>
import vtk<br>
from vtk.util import numpy_support<br>
<br>
in_fname='/nobackupp9/pmoran/stein/mhd48-1/dat/mhd48h1new_670.8.dat'<br>
out_fname='/nobackup/jcbecker/steinBmag.vts'<br>
f = open(in_fname,"rb")<br>
bx = 6<br>
npoints = mesh.MX*mesh.MY*mesh.MZ<br>
f.seek(bx*npoints*np.dtype('f4').itemsize,os.SEEK_SET)<br>
<br>
steinbmag =
np.square(np.fromfile(f,dtype=np.dtype('f4'),count=npoints))<br>
steinbmag +=
np.square(np.fromfile(f,dtype=np.dtype('f4'),count=npoints))<br>
steinbmag +=
np.square(np.fromfile(f,dtype=np.dtype('f4'),count=npoints))<br>
steinbmag = np.sqrt(steinbmag)<br>
<br>
f.close()<br>
<br>
grid = [x for x in itertools.product(mesh.xcoords, mesh.ycoords,
mesh.zcoords)]<br>
<br>
pcoords = vtk.vtkDoubleArray()<br>
pcoords.SetNumberOfComponents(3)<br>
pcoords.SetNumberOfTuples(npoints)<br>
for i in range(npoints):<br>
pcoords.SetTuple3(*((i,) + grid[i]))<br>
pts = vtk.vtkPoints()<br>
pts.SetData(pcoords)<br>
<br>
sgrid = vtk.vtkStructuredGrid()<br>
sgrid.SetDimensions(mesh.MX,mesh.MY,mesh.MZ)<br>
sgrid.SetPoints(pts)<br>
<br>
bmagV = numpy_support.numpy_to_vtk(steinbmag,deep=True)<br>
bmagV.SetName('B field magnitude')<br>
sgrid.GetPointData().SetScalars(bmagV)<br>
<br>
writer = vtk.vtkXMLStructuredGridWriter()<br>
writer.SetFileName(out_fname)<br>
writer.SetInputData(sgrid)<br>
writer.SetDataModeToBinary()<br>
writer.Write()<br>
<br>
Can anyone see what's wrong? Thanks.<br>
<br>
-jeff<br>
<br>
<br>
Program received signal SIGSEGV, Segmentation fault.<br>
0x00002aaaafb1c327 in vtkDataArrayTemplate<long
long>::GetValue(long long) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkCommonCore-pv4.3.so.1<br>
(gdb) bt<br>
#0 0x00002aaaafb1c327 in vtkDataArrayTemplate<long
long>::GetValue(long long)<br>
()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkCommonCore-pv4.3.so.1<br>
#1 0x00002aaaae991d71 in vtkCellArray::GetMaxCellSize() ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkCommonDataModel-pv4.3.so.1<br>
#2 0x00002aaaac44dde9 in
vtkCellCenterDepthSort::ComputeCellCenters() ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1<br>
#3 0x00002aaaac44e593 in
vtkCellCenterDepthSort::InitTraversal() ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1<br>
#4 0x00002aaab82fc2dd in
vtkOpenGLProjectedTetrahedraMapper::ProjectTetrahedra(vtkRenderer*,
vtkVolume*) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingVolumeOpenGL-pv4.3.so.1<br>
#5 0x00002aaab82f7997 in
vtkOpenGLProjectedTetrahedraMapper::Render(vtkRenderer*,
vtkVolume*) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingVolumeOpenGL-pv4.3.so.1<br>
#6 0x00002aaaac4d0118 in
vtkVolume::RenderVolumetricGeometry(vtkViewport*) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1<br>
#7 0x00002aaaac4e1198 in
vtkLODProp3D::RenderVolumetricGeometry(vtkViewport*)<br>
()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1<br>
#8 0x00002aaab4f3a4eb in
vtkPVLODVolume::RenderVolumetricGeometry(vtkViewport*) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVVTKExtensionsRendering-pv4.3.so.1<br>
#9 0x00002aaaac4b94ee in vtkRenderer::UpdateGeometry() ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1<br>
#10 0x00002aaab4f2d751 in
vtkPVDefaultPass::Render(vtkRenderState const*) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVVTKExtensionsRendering-pv4.3.so.1<br>
#11 0x00002aaaba0d135b in vtkCameraPass::Render(vtkRenderState
const*) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingOpenGL-pv4.3.so.1<br>
#12 0x00002aaaba1436c0 in vtkOpenGLRenderer::DeviceRender() ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingOpenGL-pv4.3.so.1<br>
#13 0x00002aaaac4bb18d in vtkRenderer::Render() ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1<br>
#14 0x00002aaaac4b8429 in vtkRendererCollection::Render() ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1<br>
#15 0x00002aaaac4c2202 in vtkRenderWindow::DoStereoRender() ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1<br>
#16 0x00002aaaac4c2119 in vtkRenderWindow::DoFDRender() ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1<br>
#17 0x00002aaaac4c31a3 in vtkRenderWindow::DoAARender() ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1<br>
#18 0x00002aaaac4bf7fe in vtkRenderWindow::Render() ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1<br>
#19 0x00002aaaba1d17ae in vtkXOpenGLRenderWindow::Render() ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingOpenGL-pv4.3.so.1<br>
#20 0x00002aaab3b9897f in vtkPVRenderView::Render(bool, bool) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVClientServerCoreRendering-pv4.3.so.1<br>
#21 0x00002aaab3b9369c in vtkPVRenderView::StillRender() ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVClientServerCoreRendering-pv4.3.so.1<br>
#22 0x00002aaaab493665 in
vtkPVRenderViewCommand(vtkClientServerInterpreter*,
vtkObjectBase*, char const*, vtkClientServerStream const&,
vtkClientServerStream&, void*) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVServerManagerApplication-pv4.3.so.1<br>
#23 0x00002aaaadb005e0 in
vtkClientServerInterpreter::CallCommandFunction(char const*,
vtkObjectBase*, char const*, vtkClientServerStream const&,
vtkClientServerStream&) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkClientServer-pv4.3.so.1<br>
#24 0x00002aaaadb05393 in
vtkClientServerInterpreter::ProcessCommandInvoke(vtkClientServerStream
const&, int) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkClientServer-pv4.3.so.1<br>
#25 0x00002aaaadb03832 in
vtkClientServerInterpreter::ProcessOneMessage(vtkClientServerStream
const&, int) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkClientServer-pv4.3.so.1<br>
#26 0x00002aaaadb03ced in
vtkClientServerInterpreter::ProcessStream(vtkClientServerStream
const&) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkClientServer-pv4.3.so.1<br>
#27 0x00002aaaabd8dcec in
vtkPVSessionCore::ExecuteStreamInternal(vtkClientServerStream
const&, bool) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVServerImplementationCore-pv4.3.so.1<br>
#28 0x00002aaaabd8d958 in
vtkPVSessionCore::ExecuteStream(unsigned int,
vtkClientServerStream const&, bool) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVServerImplementationCore-pv4.3.so.1<br>
#29 0x00002aaaabd8c203 in
vtkPVSessionBase::ExecuteStream(unsigned int,
vtkClientServerStream const&, bool) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVServerImplementationCore-pv4.3.so.1<br>
#30 0x00002aaaabd98591 in
vtkPVSessionServer::OnClientServerMessageRMI(void*, int) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVServerImplementationCore-pv4.3.so.1<br>
#31 0x00002aaaae2cc463 in
vtkMultiProcessController::ProcessRMI(int, void*, int, int) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkParallelCore-pv4.3.so.1<br>
#32 0x00002aaaae2cc7df in
vtkMultiProcessController::ProcessRMIs(int, int) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkParallelCore-pv4.3.so.1<br>
#33 0x00002aaaabfa5ec6 in
vtkTCPNetworkAccessManager::ProcessEventsInternal(unsigned long,
bool) ()<br>
from
/home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVClientServerCoreCore-pv4.3.so.1<br>
#34 0x00000000004019f6 in RealMain(int, char**,
vtkProcessModule::ProcessTypes)<br>
()<br>
#35 0x0000000000401a3e in main ()<br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>