Conversation
…on. Scaled up some comm, others down.
…-implemented translation flags, not bug-free yet (hangs after a while)
…ired for loger unidirectional searches (up to VLASOV_STENCIL_WIDTH+1 neighbours). This version crashes with a std::out_of_range on a map. Making the main Vlasov neighbourhood huge (pm6 in every direction) did not fix that...
…d dt, calculations and datareducers implemented.
…ing to fix small discrepancies in acceleration, but this might be floating-point precision issues with dt
… anymore to begin with
…in blocks adjustment
…mented pencil threading with tc
…erformance for a long time. Rule of five additions; not sure if const copy constructors are actually good here
…erformance for a long time. Rule of five additions; not sure if const copy constructors are actually good here
…erence issue, dt issue is still and it was not the uint cast
alhom
left a comment
There was a problem hiding this comment.
A bunch of notes from going through the timeclasses codebase, down to grid.cpp.
There was a problem hiding this comment.
Mostly for diagnostics. Depends on having some new CellParams available.
| continue; | ||
| } | ||
| } | ||
| if(P::systemWriteAllDROs || lowercase == "timeclass_rank" || lowercase == "vg_timeclass_rank") { |
There was a problem hiding this comment.
_rank things we can dispense with - these were an earlier development iteration that was surpassed by new halo definitions.
| continue; | ||
| } | ||
| } | ||
| if(P::diagnosticWriteAllDROs || lowercase == "perturbedvolb" || lowercase == "vg_b_perturbed_vol") { |
| continue; | ||
| } | ||
| } | ||
| if(P::diagnosticWriteAllDROs || lowercase == "vg_p" || lowercase == "p") { |
There was a problem hiding this comment.
Adding diagnostics for timeghost block counting (re: memory footprint)
| // "\n"; | ||
| // for(auto tc:timeclasses_handled){ | ||
| for (int tc = 0; tc <= P::maxTimeclass; tc++){ // Filter to necessary tcs - adjustVelocityBlocks comms need COMM-WORLD yet | ||
| adjustVelocityBlocks(mpiGrid, cells, true, popID, tc); |
There was a problem hiding this comment.
to be squinted at wrt. hashmap troubles
| TIME_V, /*!< Current time of the cell due to timeclass timestepping*/ | ||
| TIMESTEP_V, /*!< Current timestep of the cell due to timeclass timestepping - obs float precision*/ | ||
| TIMESTEP_FRACTIONAL_V, /*!< Current timestep of the cell due to timeclass timestepping*/ | ||
| TIMECLASS_RANK, /*!< timeclass of this rank*/ |
| VLASOV_SOLVER_Z_GHOST, /*!< up to third(PPM+ghost) neighbor in z face directions */ | ||
| VLASOV_SOLVER_GHOST, /*!< all required neighbors for ghost translation */ | ||
| VLASOV_SOLVER_GHOST_REQNEIGH, /*!< all ghost translation neighbors which require own neighbor information */ | ||
| VLASOV_SOLVER_TIMEGHOST_EXACT_HALO, |
There was a problem hiding this comment.
"EXACT", or those ones that have full translation even in ghost regions.
| VLASOV_SOLVER_GHOST, /*!< all required neighbors for ghost translation */ | ||
| VLASOV_SOLVER_GHOST_REQNEIGH, /*!< all ghost translation neighbors which require own neighbor information */ | ||
| VLASOV_SOLVER_TIMEGHOST_EXACT_HALO, | ||
| VLASOV_SOLVER_TIMEGHOST_OUTER_HALO, |
There was a problem hiding this comment.
Outer halo are only translation sources, copied over and accelerated to correct time.
| for (size_t popID=0; popID<getObjectWrapper().particleSpecies.size(); ++popID) { | ||
| // Set active population | ||
| SpatialCell::setCommunicatedSpecies(popID); | ||
| for (int timeclass = 0; timeclass <= P::currentMaxTimeclass; ++timeclass) { |
There was a problem hiding this comment.
This is now communicating everything, see where and how to select only for modified timeclasses.
| mpiGrid.set_initial_length(grid_length) | ||
| .set_load_balancing_method(&P::loadBalanceAlgorithm[0]) | ||
| .set_neighborhood_length(neighborhood_size) | ||
| .set_neighborhood_length(neighborhood_size+4) |
| // if (P::propagateVlasovAcceleration) | ||
| // When using the FS-SPLIT functionality, Jaro Hokkanen reported issues with using the regular | ||
| // CellParams::LBWEIGHTCOUNTER, so use of blockscounts + 1 might be required. | ||
| mpiGrid.set_cell_weight(cells[i], (Real)1 + mpiGrid[cells[i]]->parameters[CellParams::LBWEIGHTCOUNTER] * ((int)pow(P::timeclassLBmantissa, mpiGrid[cells[i]]->parameters[CellParams::TIMECLASS]))); |
There was a problem hiding this comment.
ad-hoc tuning parameter for LB here
| const vector<CellID>& localCells = getLocalCells(); | ||
| prepareGhostTranslationCellLists(mpiGrid,localCells); | ||
|
|
||
| prepareGhostTranslationCellLists(mpiGrid, localCells, ghostTranslate_source, ghostTranslate_active); |
There was a problem hiding this comment.
NB here as well ghostTranslate vs timeghost below
| const vector<CellID>& localCells = getLocalCells(); | ||
| std::cerr << __FILE__<<":" << __LINE__ <<"\n"; | ||
| const vector<CellID> remote_cells = mpiGrid.get_remote_cells_on_process_boundary(Neighborhoods::FULL); | ||
| mpiGrid.really_force_update_cell_neighborhoods(remote_cells); |
| } | ||
| } | ||
|
|
||
| if (timeclass == P::currentMaxTimeclass){ |
| phiprof::Timer timeclassOuter {"Stencils init, timeclass, outer"}; | ||
| std::vector<neigh_t> neighborhood_outer; | ||
|
|
||
| for(auto n : neighborhood){ |
There was a problem hiding this comment.
This is a horrible loop and should just loop over timeclassOuterHaloExtent+timeclassExactHaloExtent.
|
|
||
| // vmesh::VelocityBlockContainer<vmesh::LocalID> emptyvmesh& = vmesh::VelocityBlockContainer<vmesh::LocalID>(); | ||
| // Write velocity block IDs for all timeghosts | ||
| for(int timeclass = 0; timeclass <= P::currentMaxTimeclass; timeclass++){ |
There was a problem hiding this comment.
This loop writes VDFs to population_timeclass for diagnostics.
There was a problem hiding this comment.
To check proper restart handling.
There was a problem hiding this comment.
Needs ghost VDF support for readGrid
| // } | ||
|
|
||
| // } | ||
| if(P::tc_test_type == 1){ |
There was a problem hiding this comment.
The test types here have some archeological layering.
A draft pull request of the quite WIP timeclasses, for poring over and porting code in a controlled manner to a fresh PR (todo).