Jump to content

redundant multicore physics model?!


Recommended Posts

What about a model of physics or plane logic that is split up between multiple threads with multiple instances to check for errors and incorrect timings. Set it to a style where it can set when it needs a certain logic and then obtain it in a streamlined/timed manner. Could multiple variations of the same calculation or instances of the same calculation manage to make up for this to get better parts counts, response times, or newer features? It could have multiple speed calculations with extra instances to make up for errors. And open and detect errors and maintain or add extra with extra cores just to be safe as needed.

Maybe with enough redundancy the single thread aspects could be made multi core reliably. As we get bigger and bigger cpu's this could become more desireable. This game has lots of extra cpu to use. Let alone GPU.

I assume you need something fast to say what the answer should be. Maybe a predictive logic also. By definition there is a set amount of possibilities given the code. Can you use a method to quickly determine what should be there on some level?

I wonder in a general sense is there a way to use predictive logic to make a bit more than a bit. If you know certain guarantees on any level can you make a single variable split into multiple things somehow. This would have to go with fairly simple logic operations though I would think to maximize. Maybe a build able physics where it has base complex low bit calculation or stacking adding together in a way that one bit answer can go to many threads from a base thread and split the calculation in a predictable manner on a more base scale. Or use various operations as stand in logic for an answer in a shorter fashion. Assuming this is not gobbly goop or not already implemented. Instead of calculating stuff just make a complex operations path for known or partial results.

Part of the idea is both improving performance if possible and splitting up ships or to give room for different types of features.

Edited by Arugela
Link to comment
Share on other sites

Can physics calculations be optimized? Yes, probably:

Spoiler

Would the suggestion in the OP achieve that goal? I'm not able to understand the given description well enough to say; maybe you have a coherent idea, maybe not. (The meaning is obscured by vague phrases like, "set when it needs a certain logic" and "extra instances to make up for errors" that probably mean something very specific in your mind but not to a reader of your text.)

But there are red flags such as, "multiple variations of the same calculation or instances of the same calculation" that suggest possible gaps in understanding. When parallelizing an algorithm, performance gains are achieved by not doing the same calculation multiple times, and instead doing it only once on just one thread while other threads are working on different calculations, and only sharing information between threads when it's absolutely necessary (often at the end, when the various threads' results are collected to get the final overall result). Running the same calculation multiple times might even end up with worse performance than with single threading, since now not only are you calculating all the same stuff, but you're also dealing with the overhead of passing data from thread to thread in addition.

Link to comment
Share on other sites

I meant running multiple redundant threads to use a que to keep the physics inline.

If you have normal calcs going parralel and one is not going through, maybe because the calculation is simply that big, there might be a less ideal but usable faster calculation as a redundant one that can pass an answer through or something. They could run parallel themselves to check for correctness and if one fails it could run the other one. If you combine enough of them could you basically do what you do with raids and have parity physics calculations?

I was thinking about how to split up single thread stuff for ships that is keeping the parts count down effectively.

Could you make a more intensive potential calculation in some senses and have it split between threads to increase parts count. If you can split it why not have redundancies to keep stepping of the calculation guaranteed.

The other part was if there was a reason to run a reduntant thread of the same calculation in case of some other hickup. Not sure what is needed. Someone said the reason you don't que physics and plane body logic over multiple threads is that it could miss a calc and go haywire. So, if you add a lot of redundancy I was assuming you could make up for it. Especially as we keep getting massive core counts on cpus. The other idea was to keep track of errors and then add extra threads for redundancy to automatically keep up with problems as they happen.

The checks could also be non attached and be like a statistics formula that keeps up without being critical to the physics implementation.

Could such a thing also help with queing order per cpu core? Maybe if one gets in line a little faster it can get the calculation out faster than the others on other cores and it can flood the CPU trying to get top priority. Or have different priorities and have them be backups.

Edited by Arugela
Link to comment
Share on other sites

9 minutes ago, Arugela said:

I meant running multiple redundant threads to use a que to keep the physics inline.

Oh. In that case, no, this isn't worth pursuing. "one is not going through" and "one fails" aren't things that happen in game physics calculations. You've got a solution in search of a problem here.

Link to comment
Share on other sites

The point was to split up the single core calc from the ships parts that are currently limiting parts count on ships.

I was hoping something could be used to split up the bodies logic so it's not single core and can get extra parts count without the lag. Couldn't you label calculations so the system knows when what needs to go where in a calculation so the split threads can act like a single core calculation? I'm assuming mass redundancy could help get rid of any errors.

Basically, treat multiple threads across multiple cores as one giant thread. Then compensate by making redundant calcs or whatnot to make up for any time critical issues.

Edited by Arugela
Link to comment
Share on other sites

16 minutes ago, Arugela said:

The point was to split up the single core calc from the ships parts that are currently limiting parts count on ships.

I was hoping something could be used to split up the bodies logic so it's not single core and can get extra parts count without the lag.

In that case, the challenge to solve is not how to "get rid of any errors" (again this is just not a factor, but it seems to be the main focus of your idea), but rather how to split up the calculations across multiple threads efficiently without sacrificing accuracy. And the suggestions you've made would be counterproductive with respect to that goal, since they would squander the benefits of parallelism by repeating the same calculation on multiple threads.

16 minutes ago, Arugela said:

Couldn't you label calculations so the system knows when what needs to go where in a calculation so the split threads can act like a single core calculation? I'm assuming mass redundancy could help get rid of any errors.

Basically, treat multiple threads across multiple cores as one giant thread.

No, I don't think this is a coherent idea. Maybe if you explained it differently.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...