Context switching for Qbox objects
Posted: Wed Feb 04, 2015 4:53 pm
Hi Everyone,
I have several embarrassingly parallel routines I could call on separate pools of processors for code on which I'm working, but it's not clear that there's a trivial way to duplicate any matrix/wavefunction objects on subsets of the main context.
One can certainly code something up to do synchronized broadcasts and receives of data (a la Matrix::getsub), but I thought this might be a common enough problem that someone has a clever solution that's more elegant than I'll come up with at first glance, especially since I'd ideally want to be able to adjust the context during runtime as the number of trivially parallelizable routines grows.
Please feel free to suggest optimal ways you've found or to encourage a different method of code organization. I'll hack through this once I have everything working in serial for my code, so if no one has any bright ideas, I'll post my solution here.
Matthew
I have several embarrassingly parallel routines I could call on separate pools of processors for code on which I'm working, but it's not clear that there's a trivial way to duplicate any matrix/wavefunction objects on subsets of the main context.
One can certainly code something up to do synchronized broadcasts and receives of data (a la Matrix::getsub), but I thought this might be a common enough problem that someone has a clever solution that's more elegant than I'll come up with at first glance, especially since I'd ideally want to be able to adjust the context during runtime as the number of trivially parallelizable routines grows.
Please feel free to suggest optimal ways you've found or to encourage a different method of code organization. I'll hack through this once I have everything working in serial for my code, so if no one has any bright ideas, I'll post my solution here.
Matthew