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

add accumulate! function for arbitrary number of dimensions #213

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

alimamdouh212
Copy link

first we can observe that the chucks of the arrays which share the same coordination in the procs array except for the axis along which we accumulate can be processed independently, because every value depend only on the previous values in the axis which we accumulate along, and by construction if two procs share the same coordination on some axis, they will share the same local indices for that axis,
so the procs which different only on the axis along which we accumulate form a maximum independent set,
so we can process them in embarrassingly parallel fashion by calling accumulateindep function on each set.
in accumulateindep we do the following
1- perform accumulate on each process s local copy
2-we gather the last result on each process
3- we accumulate them to know the value that Precedes every process, i made that accumulation always along the first axis , that will make it faster because julia is column-major order
4- we sent to every process the value that Precedes it, and do broadcast.

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

Successfully merging this pull request may close these issues.

1 participant