-
Notifications
You must be signed in to change notification settings - Fork 272
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
atexit.unregister function speeds up computation sometimes #258
Comments
Are you able to reproduce this? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have two (almost) identical simulations of a circuit in two different Ipython notebook. In one Ipython notebook the simulation is way faster than in the other. It is independent from the notebook because I know both cases happened in both notebooks. I appended a snippet of the logs of %prun at the end of the post. I checked in both cases the C++ compiler should be used (I assume this because of the usage of the _simulator.py:55(init) file in the log). I assume I did some initialization differently, but I do not know what. In the faster case the atexit.unregister function is used way longer, but I do not quite understand the effect of this function on the simulation.
I initialize the engine and circuit and do the measurement within the scipy.optimize.minimize function. So the broad code structure is
But I also tried to put all code in one function and initialize the engine at different spots, but it seems to not change the result.
Here a snapshot of the log of the fast computation
and here from the slow computation
The text was updated successfully, but these errors were encountered: