Message: G4SmartVoxelHeader::BuildNodes(...) Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question G4SmartVoxelHeader::BuildNodes(...) 

Forum: Geometry
Date: 05 Dec, 2009
From: Valery Taranenko <Valery Taranenko>

i have 50M voxels of same size (some times, voxel matrix has two blocks of voxels of same size). i use MGH voxel tracking implementation, which is supposed to be the one of the fastest and most efficient (we patch g4 global:
from the patched file names, i think, i am using parametrized blah-blahh volumes.

now. for just(!) 50M voxels the program cannot fit in 1.8 GB of RAM--pretty sad result.

in debugger i see that the bottleneck is in
G4ProxyVector* G4SmartVoxelHeader::BuildNodes(...)

that subroutine allocates two arrays:
with voxel extents (as i understand). voxels are always the same size... if the voxels have diff size, their must be, presumably, assigned as different voxel bodies.
anyways, the arrays are double. because my voxels are mm-size, i made them G4float. it helped, but only for a short time. later in the body of that function, as I understand, for each voxel(!!!! omg!) the list of neighboring or something voxels is created. pretty crazy to me. :) well, the memory consumption is over the top, and the code breaks. (no bad allocation catches, btw!)

should i forget about parametrized volumes for voxels?

i suggest at the end of that function to clean: delete minExtents, maxExtents; since the arrays are not used later and the auto cleaner will take a while.
also suggest to catch bad mem allocation. i though it is a std programming habit. it is pretty hard to guess why the program crashes...

 Add Message Add Message
to: "G4SmartVoxelHeader::BuildNodes(...)"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]