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

Running simualtions via step() #34

Open
ptheywood opened this issue Jul 15, 2021 · 0 comments
Open

Running simualtions via step() #34

ptheywood opened this issue Jul 15, 2021 · 0 comments

Comments

@ptheywood
Copy link
Member

ptheywood commented Jul 15, 2021

Most users are expected to run simulations via simulate().

Alternatively, users can use step() manually, to run simulations step by step themselves, however they must then also handle other parts of the typical simulation themselves:

  • Init functions will not be executed for them. They must call CUDASimulation::initFunctions() themselves.
  • Any Logging from a previous Simulate() will exist, unless they call CUDASimulation::resetLog()
  • step() returns a boolean, set to true if the simulation loop is expected to continue, and false if any Exit Condition returned flamegpu::EXIT. It is up to the user to deal with this.
  • The user will/may need to call processStepLog after the last step they intend to run.
  • Exit functions will not be exectued for them, they must call CUDASimulation::exitFunctions().
    • Exit function logging will also need to be explicitly processed, via processExitLog
  • If they wish export logs to disk, they need to call exportLog as appropriate.

I.e. they need to handle anything in simulate().

There are also several things that will not work.

  • The Simulation time will not be recorded, and timing from any previous calls to simulate() on the same instance may be present / accessible.
  • There is potential for bugs if anything is too strongly assuming that simulate is the only option (per step allocations perhaps)

As this is not the intended / typical way users are expected to run simulations, it should be marked as such in some way.

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

No branches or pull requests

1 participant