On 06/11/2015 01:05 PM, Burlen Loring wrote:
you ran out of memory.

You may need more than 1 node, and a parallel file format.

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.

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):


import os
import numpy as np
import steinmesh as mesh
import itertools
import vtk
from vtk.util import numpy_support

in_fname='/nobackupp9/pmoran/stein/mhd48-1/dat/mhd48h1new_670.8.dat'
out_fname='/nobackup/jcbecker/steinBmag.vts'
f = open(in_fname,"rb")
bx = 6
npoints = mesh.MX*mesh.MY*mesh.MZ
f.seek(bx*npoints*np.dtype('f4').itemsize,os.SEEK_SET)

steinbmag = np.square(np.fromfile(f,dtype=np.dtype('f4'),count=npoints))
steinbmag += np.square(np.fromfile(f,dtype=np.dtype('f4'),count=npoints))
steinbmag += np.square(np.fromfile(f,dtype=np.dtype('f4'),count=npoints))
steinbmag = np.sqrt(steinbmag)

f.close()

grid = [x for x in itertools.product(mesh.xcoords, mesh.ycoords, mesh.zcoords)]

pcoords = vtk.vtkDoubleArray()
pcoords.SetNumberOfComponents(3)
pcoords.SetNumberOfTuples(npoints)
for i in range(npoints):
   pcoords.SetTuple3(*((i,) + grid[i]))
pts = vtk.vtkPoints()
pts.SetData(pcoords)

sgrid = vtk.vtkStructuredGrid()
sgrid.SetDimensions(mesh.MX,mesh.MY,mesh.MZ)
sgrid.SetPoints(pts)

bmagV = numpy_support.numpy_to_vtk(steinbmag,deep=True)
bmagV.SetName('B field magnitude')
sgrid.GetPointData().SetScalars(bmagV)

writer = vtk.vtkXMLStructuredGridWriter()
writer.SetFileName(out_fname)
writer.SetInputData(sgrid)
writer.SetDataModeToBinary()
writer.Write()

Can anyone see what's wrong? Thanks.

-jeff


Program received signal SIGSEGV, Segmentation fault.
0x00002aaaafb1c327 in vtkDataArrayTemplate<long long>::GetValue(long long) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkCommonCore-pv4.3.so.1
(gdb) bt
#0 0x00002aaaafb1c327 in vtkDataArrayTemplate<long long>::GetValue(long long)
    ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkCommonCore-pv4.3.so.1
#1  0x00002aaaae991d71 in vtkCellArray::GetMaxCellSize() ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkCommonDataModel-pv4.3.so.1
#2  0x00002aaaac44dde9 in vtkCellCenterDepthSort::ComputeCellCenters() ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1
#3  0x00002aaaac44e593 in vtkCellCenterDepthSort::InitTraversal() ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1 #4 0x00002aaab82fc2dd in vtkOpenGLProjectedTetrahedraMapper::ProjectTetrahedra(vtkRenderer*, vtkVolume*) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingVolumeOpenGL-pv4.3.so.1 #5 0x00002aaab82f7997 in vtkOpenGLProjectedTetrahedraMapper::Render(vtkRenderer*, vtkVolume*) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingVolumeOpenGL-pv4.3.so.1 #6 0x00002aaaac4d0118 in vtkVolume::RenderVolumetricGeometry(vtkViewport*) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1 #7 0x00002aaaac4e1198 in vtkLODProp3D::RenderVolumetricGeometry(vtkViewport*)
    ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1 #8 0x00002aaab4f3a4eb in vtkPVLODVolume::RenderVolumetricGeometry(vtkViewport*) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVVTKExtensionsRendering-pv4.3.so.1
#9  0x00002aaaac4b94ee in vtkRenderer::UpdateGeometry() ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1
#10 0x00002aaab4f2d751 in vtkPVDefaultPass::Render(vtkRenderState const*) ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVVTKExtensionsRendering-pv4.3.so.1
#11 0x00002aaaba0d135b in vtkCameraPass::Render(vtkRenderState const*) ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingOpenGL-pv4.3.so.1
#12 0x00002aaaba1436c0 in vtkOpenGLRenderer::DeviceRender() ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingOpenGL-pv4.3.so.1
#13 0x00002aaaac4bb18d in vtkRenderer::Render() ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1
#14 0x00002aaaac4b8429 in vtkRendererCollection::Render() ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1
#15 0x00002aaaac4c2202 in vtkRenderWindow::DoStereoRender() ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1
#16 0x00002aaaac4c2119 in vtkRenderWindow::DoFDRender() ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1
#17 0x00002aaaac4c31a3 in vtkRenderWindow::DoAARender() ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1
#18 0x00002aaaac4bf7fe in vtkRenderWindow::Render() ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingCore-pv4.3.so.1
#19 0x00002aaaba1d17ae in vtkXOpenGLRenderWindow::Render() ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkRenderingOpenGL-pv4.3.so.1
#20 0x00002aaab3b9897f in vtkPVRenderView::Render(bool, bool) ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVClientServerCoreRendering-pv4.3.so.1
#21 0x00002aaab3b9369c in vtkPVRenderView::StillRender() ()
from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVClientServerCoreRendering-pv4.3.so.1 #22 0x00002aaaab493665 in vtkPVRenderViewCommand(vtkClientServerInterpreter*, vtkObjectBase*, char const*, vtkClientServerStream const&, vtkClientServerStream&, void*) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVServerManagerApplication-pv4.3.so.1 #23 0x00002aaaadb005e0 in vtkClientServerInterpreter::CallCommandFunction(char const*, vtkObjectBase*, char const*, vtkClientServerStream const&, vtkClientServerStream&) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkClientServer-pv4.3.so.1 #24 0x00002aaaadb05393 in vtkClientServerInterpreter::ProcessCommandInvoke(vtkClientServerStream const&, int) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkClientServer-pv4.3.so.1 #25 0x00002aaaadb03832 in vtkClientServerInterpreter::ProcessOneMessage(vtkClientServerStream const&, int) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkClientServer-pv4.3.so.1 #26 0x00002aaaadb03ced in vtkClientServerInterpreter::ProcessStream(vtkClientServerStream const&) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkClientServer-pv4.3.so.1 #27 0x00002aaaabd8dcec in vtkPVSessionCore::ExecuteStreamInternal(vtkClientServerStream const&, bool) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVServerImplementationCore-pv4.3.so.1 #28 0x00002aaaabd8d958 in vtkPVSessionCore::ExecuteStream(unsigned int, vtkClientServerStream const&, bool) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVServerImplementationCore-pv4.3.so.1 #29 0x00002aaaabd8c203 in vtkPVSessionBase::ExecuteStream(unsigned int, vtkClientServerStream const&, bool) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVServerImplementationCore-pv4.3.so.1 #30 0x00002aaaabd98591 in vtkPVSessionServer::OnClientServerMessageRMI(void*, int) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVServerImplementationCore-pv4.3.so.1 #31 0x00002aaaae2cc463 in vtkMultiProcessController::ProcessRMI(int, void*, int, int) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkParallelCore-pv4.3.so.1 #32 0x00002aaaae2cc7df in vtkMultiProcessController::ProcessRMIs(int, int) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkParallelCore-pv4.3.so.1 #33 0x00002aaaabfa5ec6 in vtkTCPNetworkAccessManager::ProcessEventsInternal(unsigned long, bool) () from /home4/jcbecker/ParaView-4.3.1-Linux-64bit/lib/paraview-4.3/libvtkPVClientServerCoreCore-pv4.3.so.1 #34 0x00000000004019f6 in RealMain(int, char**, vtkProcessModule::ProcessTypes)
    ()
#35 0x0000000000401a3e in main ()


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to