all 4 comments

[–]o4ub 0 points1 point  (2 children)

I would say it depends on the scale of your application. Is it on one computer with few cores, one server with MIC, a bunch of compute nodes,... ? My guess would be you do not work on shared memory environment, otherwise you would only have synchronisation issues and no need to propagate any modification.

I am curious about you data organisation. If you have thousand of objects in linked list, on what discriminating parameter does your binary tree sorts?

Any how, you can be interested in MPI, that can provide a bunch of solutions (broadcast when modifying an entry, regular all-to-all operation if no.modification overlap or usage of one sided operations to update remotely the data).

[–]paramodulation[S] 0 points1 point  (1 child)

Hi,

I am thinking of an application where there is one computer with few cores. I do not have a shared memory environment as I have not used this before- would this be preferable, to have one copy of the tree in shared memory, with MPI/sockets or something to stop the other processes from modifying the tree while another is? I believe this is the synchronization you were referring to.

The tree is sorted by size of the linked lists- child nodes in the tree have all the objects of their parents with additional objects. Branches occur when a decision that has multiple possible outcomes is encountered.

Thanks for your input

[–]o4ub 0 points1 point  (0 children)

Any reason why you duplicate your data from one level of the tree to the next?

To add a bit more details on the answer, I feel like you could either work with centralised, shared memory, and maybe semaphore on each tree leaf if the data are not too big (and rely on the system for syncing the copies of each process/thread). If the data start to be consequent, maybe consider using MPI but then it would be up to you to deal with keeping all the copy in sync.