-
Notifications
You must be signed in to change notification settings - Fork 2
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
NullPointerException #6
Comments
Finally, after a week of trying, I figured out where the problem is. It is the operation: |
I solved the problem with updating the env map, by creating an immutable copy of matrix before putting it to env. Still, there are stage time problems... |
My best guess is that there is a same problem with vector update, so the next step is to work out vector updates. |
It turns out that each part of nbodies works alone, but not as a whole. There exist a set of problems (not really errors, just not the best solutions). Now vector update and matrix diagonal update are resolved. Still, the return function call gives the following staging error: "Violated ordering of effects". I still don't know what does it mean, but I hope I'l figure it out soon. |
Interesting fact here: stanford-ppl/Delite#25 |
So, I solved the vector update issue, now it works fine, but of course this is not the end. It appeared that my approach with function call won't work, because I save the state of env before function body and later I set the env back to that state. That is not good if the function body actually updates some global value. So now, there are two possibilities:
|
fixed by update |
A new problem, hopefully the last thing that prevents running nbody successfully. When called outside of nbody function, the energy function behaves as expected, but when called inside nbody, it gives a NullPointerException.
The text was updated successfully, but these errors were encountered: