Skip to content

Gather and Scatter for FabArrays? #4284

Answered by WeiqunZhang
uschille asked this question in Q&A
Discussion options

You must be logged in to vote

I assume only one process needs to do the work. Right? You could do something like this.

BoxArray ba(domain);
DistributionMapping dm{Vector<int>{0}}
FabArray<BaseFab<GpuComplex<Real>>> fa_whole(ba, dm, ndof, 0);
fa_whole.ParallelCopy(kspace_noise);
// Work on fa_whole
kspace_noise.ParallelCopy(fa_whole);

You will need to use managed memory.

I am also curious. What kind of data dependencies do you have?

(Re: the error. copy to template copy<RunOn::Device> or RunOn::Host should be able to fix the error. When compiling with CUDA, we force the user to make a choice on where to run Fab level functions, which helps to eliminate a lot of bugs due to synchronization issues.)

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by uschille
Comment options

You must be logged in to vote
6 replies
@WeiqunZhang
Comment options

@uschille
Comment options

@uschille
Comment options

@WeiqunZhang
Comment options

@uschille
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants