Skip to content

Commit

Permalink
Bug fix for non-mpi runs
Browse files Browse the repository at this point in the history
This fixes a bug that was introduced at some point for non-mpi VR. There was the incorrect addressing of an array using a index i rather than the correct Part[i].GetID() index. This has now been fixed. MPI did not have this error as i=Part[i].GetID() for the mpi runs at this point.

Conflicts:
	src/search.cxx
  • Loading branch information
pelahi authored and rtobar committed Dec 22, 2020
1 parent 31ae376 commit 08595f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/search.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Int_t* SearchFullSet(Options &opt, const Int_t nbodies, vector<Particle> &Part,
// #else
numingroup=BuildNumInGroup(nbodies, numgroups, pfof);
for (i=0;i<nbodies;i++) {
Part[i].SetType((numingroup[pfof[i]]>=MINSUBSIZE));
Part[i].SetType((numingroup[pfof[Part[i].GetID()]]>=MINSUBSIZE));
numlocalden += (Part[i].GetType()>0);
}
if (opt.fofbgtype>FOF6D) {
Expand All @@ -270,6 +270,7 @@ Int_t* SearchFullSet(Options &opt, const Int_t nbodies, vector<Particle> &Part,
}
for (i=0;i<nbodies;i++) {numinstrucs+=(pfof[i]>0);}
LOG(debug) << "Number of particles in large subhalo searchable structures " << numinstrucs;
LOG(debug) << "Number of particles that will have local velocity densitites calculated "<< numlocalden;
if (numlocalden>0) GetVelocityDensity(opt, nbodies, Part.data(), tree);
for (i=0;i<nbodies;i++) Part[i].SetType(storetype[i]);
delete[] storetype;
Expand Down

0 comments on commit 08595f8

Please sign in to comment.