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

Add a check to Simulation which confirms that all Modules/Diagnostics have the data they need #10

Open
arichar6 opened this issue Jun 8, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed

Comments

@arichar6
Copy link
Collaborator

arichar6 commented Jun 8, 2020

I've run into times when I changed my Simulation by removing a Module, and then the code crashes on the first call to fundamental_cycle because a Diagnostic couldn't find the data it was trying to output to file.

This type of crash could be easier to debug by inserting a check before the main simulation loop starts. The checking function could raise a more helpful error if all the modules did not find the data they need.

Such a check would have to go through each module/diagnostic and confirm (somehow) that all of the resources that it needs were actually found. This might require a modification to the way that resource sharing works.

Perhaps at the very least something like a resource_found flag could be set in the inspect_resource function.

@ndisner
Copy link
Collaborator

ndisner commented Oct 30, 2020

Is this issue already done? I feel like this is already being preformed because at runtime we have outputs that say "PhysicsModule is sharing ..." That is the check or should it be more detailed?

@arichar6
Copy link
Collaborator Author

So, yes and no. I added those outputs and they help some. But it might be nice to still have some sort of automated check like described in this issue.

@ndisner
Copy link
Collaborator

ndisner commented Oct 30, 2020

Okay I will work on this then!

@ndisner ndisner self-assigned this Oct 30, 2020
@ndisner ndisner mentioned this issue Nov 18, 2020
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants