Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing MOAB file opened in source.F90? #51

Open
erelson opened this issue Mar 15, 2013 · 2 comments
Open

Closing MOAB file opened in source.F90? #51

erelson opened this issue Mar 15, 2013 · 2 comments
Labels

Comments

@erelson
Copy link
Contributor

erelson commented Mar 15, 2013

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?

  • Would we reduce the memory footprint by storing vertices information (only mesh info we need after setup) ourselves?
    • If DagMCNP is using the same mesh for geometry/meshtal purposes, would accessing the same opened mesh object make sense?
  • Should I find a way to make sure the mesh is closed once the last history has sampled its starting point? (From experience it doesn't seem like problems arise from not closing the file...)
@gonuke
Copy link
Member

gonuke commented Apr 2, 2013

  • 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.
  • Accessing it from the same mesh is probably more efficient computationally, but offers its own challenges in writing the code to accomplish that - it can be a future work issue.
  • 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.

@erelson
Copy link
Contributor Author

erelson commented Apr 3, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants