Skip to content
Snippets Groups Projects
Commit c84e1f27 authored by Benjamin Lindner2's avatar Benjamin Lindner2
Browse files

bundled frames in all-to-all communication

parent 98fdd9fd
No related branches found
No related tags found
No related merge requests found
......@@ -104,10 +104,10 @@ DecompositionPlan::DecompositionPlan(size_t nn,size_t nq,size_t naf,size_t elbyt
Err::Inst()->write("Either change the partition size manually or change the number of nodes.");
Err::Inst()->write("Beware that size of a partition <= frames / atoms (depends)");
Err::Inst()->write("Limits:");
Err::Inst()->write(string("limits.memory.data=")+boost::lexical_cast<string>(nmaxbytesize));
Err::Inst()->write(string("limits.stage.memory.data=")+boost::lexical_cast<string>(nmaxbytesize));
Err::Inst()->write("Minimal Requirements:");
DecompositionParameters dp(nn,nq,naf,npmax,elbytesize);
Err::Inst()->write(string("limits.memory.data=")+boost::lexical_cast<string>(dp.nbytesize()));
Err::Inst()->write(string("limits.stage.memory.data=")+boost::lexical_cast<string>(dp.nbytesize()));
throw;
}
......
......@@ -486,20 +486,25 @@ void DataStagerByAtom::distribute_coordinates(coor_t* p_coordinates_buffer,std::
DivAssignment zero_node_assignment(NNPP,0,NA);
size_t maxatoms = zero_node_assignment.size();
coor_t* p_alignedframe = (coor_t*) malloc((maxatoms*NNPP)*3*sizeof(coor_t));
coor_t* p_alignedframeOUT = (coor_t*) malloc((maxatoms*NNPP)*3*sizeof(coor_t));
coor_t* p_alignedframe = (coor_t*) malloc(LNF*(maxatoms*NNPP)*3*sizeof(coor_t));
coor_t* p_alignedframeOUT = (coor_t*) malloc(LNF*(maxatoms*NNPP)*3*sizeof(coor_t));
for(size_t f = 0; f < LNF; ++f)
{
// first frame = frameoffset
size_t firstframe = framesbuffer[0][f];
coor_t* p_from = &(p_coordinates_buffer[f*NA*3]);
copyalign_frame(p_alignedframe,p_from,maxatoms);
boost::mpi::all_to_all(partitioncomm_,p_alignedframe,3*maxatoms,p_alignedframeOUT);
fill_alignedframe(p_alignedframeOUT,maxatoms,firstframe);
coor_t* p_to = &(p_alignedframe[i*(maxatoms*NNPP)*3]);
copyalign_frame(p_to,p_from,maxatoms);
}
boost::mpi::all_to_all(partitioncomm_,p_alignedframe,3*maxatoms*LNF,p_alignedframeOUT);
for(size_t f = 0; f < LNF; ++f)
{
size_t firstframe = framesbuffer[0][f];
fill_alignedframe(p_alignedframeOUT,maxatoms,firstframe);
}
free(p_alignedframe);
free(p_alignedframeOUT);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment