- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello:
I have a computational chemistry code which currently use TBB for multi-threading on CPU. It works very good. Now I am trying to transfer the code to work on Phi coprocessor. My current code is like this:
void TBB_EXRho::operator()(const blocked_range<UInt>& r)
{
// shell pair data memory allocation
UInt maxNP2 = infor.getMaxNP2();
UInt maxNL = infor.getMaxNL();
UInt maxNSP = infor.getMaxNSP();
AtomShellPair sp(maxNSP,maxNP2,maxNL);
// integral array
std::vector<double,tbb::scalable_allocator<double> > esp(infor.getMaxNBasisForShell()*infor.getMaxNBasisForShell()*getNGrids());
// real work begins
for( UInt n=r.begin(); n!=r.end(); ++n ) {
.....................
}
}
This function will be running on Phi coprocessor. During the calculation I need vector such as "esp" to hold the temp result. The object AtomShellPair, also contains vectors to hold the data needed by calculation. I used the scalable memory allocator right now, I am not sure whether these code can be simply reused when running on Phi coprocessor?
Thank you for your advice!!
fenglai
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Intel TBB has full support of Intel Xeon Phi coprocessor. So any functionality (including scalable_allocator) that works fine on usual CPU should work on Intel Xeon Phi coprocessor. If you have some troubles with running Intel TBB based code on Intel Xeon Phi coprocessor, feel free to ask.
Regards, Alex
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page