Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed demo ic_type. * Removed unused function * Made workgroup size and nborhood size into parameters. Call Redistribute() after moving agents (particles). Print current infections and deaths counts when running and showing the current day. Added UrbanPop ic_type and urbanpop_filename parameters. * Moved the Redistribute call to within the agentMove functions. Added workgroup_size parameter to read_workerflow * Moved function definitions from AgentContainer.H to the .cpp file, for all not setter/getter methods. * Prefixed all AgentContainer variables with m_, as per coding standards * Moved all functions and data structures that are specific to the census data ic_type into a separate CensusData class, in a separate file. All of the functions previously in Initialization.H/cpp were specific to census data and have thus been moved into the CensusData class. * Removed geom from CensusData - not needed. * Added python script for processing UrbanPop feather files. Added header file for UrbanPop data. * Fixed missing variable in auto-generated UrbanPop header file * Added UrbanPop data processing files * Added an option to produce a fixed set of initial infections to try minimize variation between runs. * Changed work interaction model to bin by workgroup as well as community, which really speeds up CPUs-only runs * Moved functionality for work interaction model into separate function to conform to same code structure as other interaction models * Added updated AgentDefinitions file for isAtWork function. Removed unused variables. * Updated InteractionModel makeBins to always make bins since agents could have been redistributed * Go through infectious first for home interactions * For the work interaction model, bin by workgroup plus community. This results in large speedups, especially for CPU only code. Also, when doing interactions, iterate through the infectious agents first, which is also faster, since most agents will be susceptible and fewer will be infectious. This requires atomic multiply for the prob_ptr for GPUs. * Updated assert calls to avoid unused variables when not in debug mode. * Changed code to use PTDType for work bins instead of PType, and removed extra AOS attribute from agents * Use particle tile data for all binning * Bin home interactions by nborhood and family cluster * Enable daytime interactions * Restructured nborhood binning - because of community interactions can't bin smaller than a community, but doing infectious then susceptible still helps performance * Cleaned up interaction models * Switched to GPU policy for building bins. Much faster on GPUs * Implemented new binner for school interactions * Trying to fix school interactions - should they be in the same nborhood? Work or home? * Better matching of school interaction model with development branch * Restructured interaction model to use a common templated function for work, home, school and nborhood. Much simpler code now. * Always rebuild the bins - needed since redistribute changes the particle locations * Fixed indentation * Removed some unused variables, and fixed reference to SOA index for non-group in nborhood interactions. * Renamed shadowed variables to avoid PR checks complaints. * Simplified interaction model template by removing the ACT typename. Switched binning policy from GPU to Serial, in order to preserve reproducibility for a given random seed. Commented out the generic interaction model, which is never used. * Moved makeBins from InteractionModel to InteractionModRandom because that is the only place it is used and it will be replaced soon. * Added a parameter for the probability of an agent going on random travel * Removed InteractionModRandom - random travel is now handled in nborhood interactions * For the interaction models, compute the max group using a parallel reduction, and only do it once. * Split nborhood interactions into separate models for work and home. Save the DenseBins for interactions to member of the interaction model. Have an option to reuse without rebuilding. This is disabled at the moment because Redistribute changes the ordering of particles. * Added command line option agent.fast to switch between fast implementation and slow. Currently this only switches between a serial and a GPU binning policy. * Removed unused variable * Fixed issue with double to Real conversion * Remove managed memory from read_workerflow * Fixed overflow when computing number of workgroups for teachers * run assignTeachersAndWorkgroup on the host for now * Added option for GPU policy binning to CensusData binning * Removed some unused code and changed a checking loop to not use managed memory. * Added a timer to the main loop output to track how long each time step takes * Fixes to prevent triggering compiler warnings. * Simplified binary interactions implementations with shared inline function. * Further cleaned up interaction probabilities. * Fixed issue where memory had to be managed * Ensure that the display of number infected currently agrees with the actual number calculated after updating agents. * Removed unused variables * Use ParticleReal to overcome atomic multiply failure in commit check. * Converted nborhood interaction models to use counting with exponents. * Modified fast interactions for nborhoods to work on GPUs * Added a function for getting the community number to reduce code duplication. Added fast interactions for work. * Added fast interactions for home * Implemented alternative fast interactions for neighborhoods, work and home (school is not yet done). These implemenations count the number of infected in each category, and so avoid the n-squared computation. * Added some comments to the fast work interactions to better explain the computation * Implemented fast interactions for schools. * Removed code for slow interactions - that is still available in the interactions-bin-by-workgroup branch. * Removed unnecessary assert. * Changed profile function names to differentiate various interaction models. * Working implementation of urbanpop init agents * Added workgroups to working agents * Only do the urbanpop agent debug output when using managed memory * Set the nborhood groups for all the urbanpop agents * Ensure that families have the same neighborhood * Added names for profiling functions in UrbanPop initialization. Allow loading of case data for UrbanPop. * Added vectors and multifabs needed for initial infections to urbanpop class. * Split infection initialization functions into separate file. Will reuse them for initial infections from urbanpop as well as census data. * Initialize all components for urbanpop agents init. Got initial infections working for UrbanPop data, although not perfectly because of community to mesh mismatch. * Added educators to schools * Removed need for unit mf from case initialization * Include NAICS field in agent data and use it to define workgroups * Removed assert that called a collective but was only called by one rank * Added some comments to better understand the columns corresponding to the counts in the output file. * Subdivide by NAICS for work interactions * For UrbanPop, use population school grades, not nt_dt_grades. Set no school to be 0, instead of -1 * Split IntIdx::school into school_grade and school_id, so that in UrbanPop students can be grouped by grade. Added another attribute, IntIdx::school_closed to represent schools that are closed. The school_id cannot just be set to -1 to indicate closure because the school id needs to be saved for when the school reopens * Separated the school transmission probabilities from the census-specific definition of school types by school id. * Allocate teachers to schools by grade. Use grades from worker data. * Add college interactions for separate transmission * Assign educators to schools * Make childcare grouping based on school id, not neighborhood. Create school transmission groups by grade (no impact on Census) * Setup educators workgroup and nborhood to be determined by school id * School grade 0 defines daycare/childcare, not the school_id. Use the neighborhood + 1 for school id, because 0 is no school. Don't do work interactions for agents at schools. * Fixed bug for work nborhood interactions where age group 0 was using home nborhoods, even if they had been moved to the work nborhoods * Use new NAICS codes from updated UrbanPop data. Draw missing educators from the county level. * Fixed bugs with new more detailed NAICS. Made family and school indexes unique only to geoid, to avoid large arrays in interaction models. * Get global max groups for home interactions to deal with CUDA effectively. Set max_grid_size to 10 for urbanpop. * Set correct pos values for x,y locations for urbanopop * Enabled daytime interactions. * Restructured urbanpop extract script and changed school ids to be unique to each geoid only, to limit max school id * Fixed problems with tiling. Now it will set tiling by default if running on CPUs, and not set it if running on GPUs. This works without requiring TilingIfNotGPU() calls to every MFI iteration. Fixed issue with UrbanPop initialization requiring managed memory - not longer required. More efficient tracking of communities in interaction models - skip empty grid points to reduce count of communities. * Fixed school allocations for census. School id of 0 means no school, and workgroups are not set for teachers because they don't interact at work as well as at school. * Allow workgroup interactions for educators - the workgroup is the school. Ensure UrbanPop work nborhood is the same as nborhood for non-workers so they can still interact during the day. * Fix unused variable * Fixed teacher allocations and some bugs. Added a print out of educator student ratios. * Moved vector allocation for infected counts in interaction models out of loop to reduce overhead of allocation. * Removed obsolete timing. * Merged in changes to terms (latent, incubation) * Cleaner implementation of lng/lat conversions to and from grid, and also use the correct lng/lat when moving to hospital locations * Added NM census data and cases * Added NM UrbanPop data * Fixed NM inputs.nm paths for data files. * Correctly initialize air travel for UrbanPop * Replace integers with AgeGroup enums where possible. * Added an additional age bracket. Restructured hospital treatment and checking for death. * Got the additional 50-64 age bracket working properly. For census data, assume 57% of previous age group 30to64 are under 50. * Remove TilingIfNotGPU calls in loops - tiling is set globally once when not using GPUs. Setting it globally ensures there are no bugs caused by tiling in some loops and not others. * Removed some commented debugging code * Fixed disease parameters to make it so that the age effect can be an explicit option * Removed redefinition of variable * Add print out of age group counts * Cleaned up options. * Cleaned up some entries in the documentation * if -> else if so that an agent doesn't enter more than one if-block * renamed isHospitalized() and flag_hosp, etc for clarity * Moved initial case settings into DiseaseParm structure since they are specific to diseases. * Renamed enum value of 'random' which was triggering a compilation error * Updated outputs: fixed switched Ventilator/ICU label and changed running program stdout details. * making sure latent, incubation, & infection periods are never negative; also ensuring latent period is not greater than the incubation+infection period * simplified the condition for latent period being smaller than incubation+infectious periods * not using std::max since Clang complains! * Removed unnecessary check for infected in hospital model * incubation period should be less than the latent+infectious periods! * Should be incubation period, not latent period. Check if agent is in hospital before assigning hospital. This can happen in multiple diseases. * Fixed error in debug build with Real check * fixed the if condition for when hospitalization starts * Created a function for setting an agent to infected, since that code is used both during updates and when initializing agents to be infected. * Made sure code is robust to having different precisions for ParticleReal and Real. * Added comments explaining every option in inputs.defaults * Formatting and some modified comments * Changed reduced_inf option to asymp_relative_inf - much clearer. Automatically set t_hosp_offset to be 3 more than highest hospitalization days, singe this was not an accessible option on the command line. * Add a stable mode and make it the default. * change default * Removed strains - this functionality is provided by multiple diseases * Changed max_grid_size to max_box_size to make it clearer to those not very familiar with amrex terminology. * Made the school ratio option used for census data into an array of values, one per school type * Fixed new bug in teacher count initialization * Default to using managed memory as that is required for the serial binning, which is required to get consistent results for a given random seed and so is set by default. --------- Co-authored-by: Andrew Myers <[email protected]> Co-authored-by: Debojyoti Ghosh <[email protected]>
- Loading branch information