1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Fixing breakage in the Comms non compile

This commit is contained in:
Peter Boyle 2015-05-10 15:23:09 +01:00
parent 7f04b85368
commit 8299bc39ea

View File

@ -3,15 +3,17 @@ namespace Grid {
CartesianCommunicator::CartesianCommunicator(std::vector<int> &processors)
{
_ndimension = _processors.size();
_processor_coor.resize(_ndimension);
_processors = processors;
_ndimension = processors.size();
_processor_coor.resize(_ndimension);
// Require 1^N processor grid for fake
for(int d=0;d<_ndimension;d++) if(_processors[d]!=1) exit(-1);
_processor = 0;// I am the one. The only one..
for(int d=0;d<_ndimension;d++) _processor_coor[d] = 0;
_Nprocessors=1;
_processor = 0;
for(int d=0;d<_ndimension;d++) {
assert(_processors[d]==1);
_processor_coor[d] = 0;
}
}
void CartesianCommunicator::GlobalSum(float &){}
@ -57,12 +59,12 @@ void CartesianCommunicator::BroadcastWorld(int root,void* data, int bytes)
void CartesianCommunicator::ShiftedRanks(int dim,int shift,int &source,int &dest)
{
source =1;
dest=1;
source =0;
dest=0;
}
int CartesianCommunicator::RankFromProcessorCoor(std::vector<int> &coor)
{
return 1;
return 0;
}
void CartesianCommunicator::ProcessorCoorFromRank(int rank, std::vector<int> &coor)
{