mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
Add more debug information to jozov2 output
This commit is contained in:
parent
01e72e599b
commit
54aa135ac6
1 changed files with 3 additions and 1 deletions
|
@ -84,17 +84,19 @@ void buildZoneAdjacencies(PARTICLE *p, pid_t np,
|
||||||
zt[zonenum[jumped[i]]].nadj++;
|
zt[zonenum[jumped[i]]].nadj++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t nadjAlloced = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
for (int h = 0; h < numZones; h++) {
|
for (int h = 0; h < numZones; h++) {
|
||||||
zt[h].adj = new pid_t[zt[h].nadj];
|
zt[h].adj = new pid_t[zt[h].nadj];
|
||||||
zt[h].slv = new float[zt[h].nadj];
|
zt[h].slv = new float[zt[h].nadj];
|
||||||
|
nadjAlloced += zt[h].nadj;
|
||||||
zt[h].nadj = 0;
|
zt[h].nadj = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(const std::bad_alloc& a)
|
catch(const std::bad_alloc& a)
|
||||||
{
|
{
|
||||||
cout << "Could not allocate memory for zone adjacencies." << endl;
|
cout << "Could not allocate memory for zone adjacencies (nadj so far: " << nadjAlloced << ", memory needed: " << (nadjAlloced*(sizeof(pid_t)+sizeof(float))) << ")" << endl;
|
||||||
throw a;
|
throw a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue