Commit bdb0f365 authored by incardon's avatar incardon

With the latest modules

parent 3099e276
openfpm_io @ fa73ac92
Subproject commit 63f84d6cb412686aa96642b1128e632b17e26bcf
Subproject commit fa73ac920c9f6593245999add78ca5490c797520
......@@ -295,19 +295,8 @@ public:
// fine_s structure contain the processor id for each sub-sub-domain
// with sub-sub-domain we mean the sub-domain decomposition before
// running dec_optimizer (before merging sub-domains)
/* auto it = dist.getGraph().getVertexIterator();
while (it.isNext())
{
size_t key = it.get();
// fill with the fine decomposition
fine_s.get(key) = dist.getGraph().template vertex_p<nm_v::proc_id>(key);
++it;
}*/
grid_key_dx_iterator<dim> git(gr);
while (git.isNext())
......@@ -1008,7 +997,7 @@ public:
for (size_t i = 0 ; i < dim ; i++)
{
if (gr.size(i) % gm.size(i) != 0)
std::cerr << __FILE__ << ":" << __LINE__ << ".Error the distribution grid must be multiple of the decomposition grid" << std::endl;
std::cerr << __FILE__ << ":" << __LINE__ << ".Error the decomposition grid specified as gr.size(" << i << ")=" << gr.size(i) << " is not multiple of the distribution grid gm.size(" << i << ")=" << gm.size(i) << std::endl;
magn[i] = gr.size(i) / gm.size(i);
}
......
......@@ -189,8 +189,10 @@ public:
*/
void getSubSubDomainPosition(size_t id, T (&pos)[dim])
{
#ifdef SE_CLASS1
if (id >= g.getNVertex())
std::cerr << "Position - Such vertex doesn't exist (id = " << id << ", " << "total size = " << g.getNVertex() << ")\n";
std::cerr << __FILE__ << ":" << __LINE__ << " Position - Such vertex doesn't exist (id = " << id << ", " << "total size = " << g.getNVertex() << ")\n";
#endif
pos[0] = g.vertex(id).template get<nm_v::x>()[0];
pos[1] = g.vertex(id).template get<nm_v::x>()[1];
......@@ -207,9 +209,10 @@ public:
inline void setComputationCost(size_t id, size_t weight)
{
verticesGotWeights = true;
#ifdef SE_CLASS1
if (id >= g.getNVertex())
std::cerr << "Weight - Such vertex doesn't exist (id = " << id << ", " << "total size = " << g.getNVertex() << ")\n";
std::cerr << __FILE__ << ":" << __LINE__ << "Weight - Such vertex doesn't exist (id = " << id << ", " << "total size = " << g.getNVertex() << ")\n";
#endif
// If the vertex is inside this processor update the value
g.vertex(id).template get<nm_v::computation>() = weight;
......@@ -232,8 +235,10 @@ public:
*/
size_t getVertexWeight(size_t id)
{
#ifdef SE_CLASS1
if (id >= g.getNVertex())
std::cerr << "Such vertex doesn't exist (id = " << id << ", " << "total size = " << g.getTotNVertex() << ")\n";
std::cerr << __FILE__ << ":" << __LINE__ << "Such vertex doesn't exist (id = " << id << ", " << "total size = " << g.getTotNVertex() << ")\n";
#endif
return g.vertex(id).template get<nm_v::computation>();
}
......@@ -284,8 +289,10 @@ public:
*/
void setMigrationCost(size_t id, size_t migration)
{
#ifdef SE_CLASS1
if (id >= g.getNVertex())
std::cerr << "Migration - Such vertex doesn't exist (id = " << id << ", " << "total size = " << g.getNVertex() << ")\n";
std::cerr << __FILE__ << ":" << __LINE__ << "Migration - Such vertex doesn't exist (id = " << id << ", " << "total size = " << g.getNVertex() << ")\n";
#endif
g.vertex(id).template get<nm_v::migration>() = migration;
}
......
......@@ -446,8 +446,10 @@ public:
*/
void getSubSubDomainPosition(size_t id, T (&pos)[dim])
{
#ifdef SE_CLASS1
if (id >= gp.getNVertex())
std::cerr << "Such vertex doesn't exist (id = " << id << ", " << "total size = " << gp.getNVertex() << ")\n";
std::cerr << __FILE__ << ":" << __LINE__ << "Such vertex doesn't exist (id = " << id << ", " << "total size = " << gp.getNVertex() << ")\n";
#endif
// Copy the geometrical informations inside the pos vector
pos[0] = gp.vertex(id).template get<nm_v::x>()[0];
......@@ -467,8 +469,10 @@ public:
if (!verticesGotWeights)
verticesGotWeights = true;
#ifdef SE_CLASS1
if (id >= gp.getNVertex())
std::cerr << "Such vertex doesn't exist (id = " << id << ", " << "total size = " << gp.getNVertex() << ")\n";
std::cerr << << __FILE__ << ":" << __LINE__ << "Such vertex doesn't exist (id = " << id << ", " << "total size = " << gp.getNVertex() << ")\n";
#endif
// Update vertex in main graph
gp.vertex(id).template get<nm_v::computation>() = weight;
......@@ -490,8 +494,10 @@ public:
*/
size_t getSubSubDomainComputationCost(size_t id)
{
#ifdef SE_CLASS1
if (id >= gp.getNVertex())
std::cerr << "Such vertex doesn't exist (id = " << id << ", " << "total size = " << gp.getNVertex() << ")\n";
std::cerr << __FILE__ << ":" << __LINE__ << "Such vertex doesn't exist (id = " << id << ", " << "total size = " << gp.getNVertex() << ")\n";
#endif
return gp.vertex(id).template get<nm_v::computation>();
}
......@@ -523,8 +529,10 @@ public:
*/
void setMigrationCost(size_t id, size_t migration)
{
#ifdef SE_CLASS1
if (id >= gp.getNVertex())
std::cerr << "Such vertex doesn't exist (id = " << id << ", " << "total size = " << gp.getNVertex() << ")\n";
std::cerr << __FILE__ << ":" << __LINE__ << "Such vertex doesn't exist (id = " << id << ", " << "total size = " << gp.getNVertex() << ")\n";
#endif
gp.vertex(id).template get<nm_v::migration>() = migration;
}
......@@ -559,8 +567,10 @@ public:
*/
size_t getNSubSubDomainNeighbors(size_t id)
{
#ifdef SE_CLASS1
if (id >= gp.getNVertex())
std::cerr << "Such vertex doesn't exist (id = " << id << ", " << "total size = " << gp.getNVertex() << ")\n";
std::cerr << __FILE__ << ":" << __LINE__ << "Such vertex doesn't exist (id = " << id << ", " << "total size = " << gp.getNVertex() << ")\n";
#endif
return gp.getNChilds(id);
}
......
......@@ -245,8 +245,10 @@ public:
*/
void getSubSubDomainPosition(size_t id, T (&pos)[dim])
{
#ifdef SE_CLASS1
if (id >= gp.getNVertex())
std::cerr << "Such vertex doesn't exist (id = " << id << ", " << "total size = " << gp.getNVertex() << ")\n";
std::cerr << __FILE__ << ":" << __LINE__ << "Such vertex doesn't exist (id = " << id << ", " << "total size = " << gp.getNVertex() << ")\n";
#endif
// Copy the geometrical informations inside the pos vector
pos[0] = gp.vertex(id).template get<nm_v::x>()[0];
......
......@@ -1564,7 +1564,7 @@ public:
Decomposition & dec = getDecomposition();
cdsm.setDimensions(dec.getDomain(), dec.getGrid().getSize(), 0);
cdsm.setDimensions(dec.getDomain(), dec.getDistGrid().getSize(), 0);
for (size_t i = 0; i < getDecomposition().getNSubSubDomains(); i++)
dec.setSubSubDomainComputationCost(i, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment