mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
fixed MPI issues that resulted from adding Bank struct member
This commit is contained in:
parent
f906e9fffc
commit
c49ce141a7
3 changed files with 6 additions and 16 deletions
|
|
@ -154,7 +154,6 @@ public:
|
|||
int delayed_group;
|
||||
Type particle;
|
||||
int64_t parent_id;
|
||||
|
||||
bool operator < (const Bank & bank) const{ return (parent_id < bank.parent_id); }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -101,18 +101,19 @@ void initialize_mpi(MPI_Comm intracomm)
|
|||
|
||||
// Create bank datatype
|
||||
Particle::Bank b;
|
||||
MPI_Aint disp[6];
|
||||
MPI_Aint disp[7];
|
||||
MPI_Get_address(&b.r, &disp[0]);
|
||||
MPI_Get_address(&b.u, &disp[1]);
|
||||
MPI_Get_address(&b.E, &disp[2]);
|
||||
MPI_Get_address(&b.wgt, &disp[3]);
|
||||
MPI_Get_address(&b.delayed_group, &disp[4]);
|
||||
MPI_Get_address(&b.particle, &disp[5]);
|
||||
for (int i = 5; i >= 0; --i) disp[i] -= disp[0];
|
||||
MPI_Get_address(&b.parent_id, &disp[6]);
|
||||
for (int i = 6; i >= 0; --i) disp[i] -= disp[0];
|
||||
|
||||
int blocks[] {3, 3, 1, 1, 1, 1};
|
||||
MPI_Datatype types[] {MPI_DOUBLE, MPI_DOUBLE, MPI_DOUBLE, MPI_DOUBLE, MPI_INT, MPI_INT};
|
||||
MPI_Type_create_struct(6, blocks, disp, types, &mpi::bank);
|
||||
int blocks[] {3, 3, 1, 1, 1, 1, 1};
|
||||
MPI_Datatype types[] {MPI_DOUBLE, MPI_DOUBLE, MPI_DOUBLE, MPI_DOUBLE, MPI_INT, MPI_INT, MPI_LONG};
|
||||
MPI_Type_create_struct(7, blocks, disp, types, &mpi::bank);
|
||||
MPI_Type_commit(&mpi::bank);
|
||||
}
|
||||
#endif // OPENMC_MPI
|
||||
|
|
|
|||
|
|
@ -1170,16 +1170,6 @@ void initialize_history(Particle* p, int64_t index_source)
|
|||
|
||||
// Every particle starts with no accumulated flux derivative.
|
||||
if (!model::active_tallies.empty()) zero_flux_derivs();
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
/*
|
||||
std::cout << "Initialized particle " << particle_seed << " with E = " << p->E_ << " and Position {" <<
|
||||
p->r().x << ", " <<
|
||||
p->r().y << ", " <<
|
||||
p->r().z << "}" << std::endl;
|
||||
*/
|
||||
>>>>>>> removed print statements
|
||||
}
|
||||
|
||||
int overall_generation()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue