Open erelson opened 11 years ago
You don't need to keep the file open once you have read it. MOAB has a copy in memory and you can close and dispense with the file handle.
Perhaps incorrectly, I had thought of those two things as being one and the same. Looking at the API, MOAB presumably opens and closes the file already, so I'm just dealing with the iMesh instance that is in memory. Reducing this memory footprint as per the below would make sense.
How much tag info is on the source.h5m mesh that you read? Does it have all the neutron flux, photon source, data? If so, then you are using a lot of extra memory. You can always delete some of those tags once you have read and closed the file.
I in fact don't need any of the tag info after I've done setup; I just need to be able to grab the voxel/vertices information. Deleting all tags on the mesh thus seems like a potentially good idea.
A question arising from my not having worked with some aspects of MOAB/DagMC before...
Currently, the code in source.F90 opens
source.h5m
and leaves the mesh object open (presumably this means it's stored in RAM?) after initially loading information about the voxels/source strengths/etc. Each particle history has to retrieve the vertices of the sampled voxel, so we keep the mesh open. At present, source.F90 never closes the mesh object.Is this an issue?