MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
#include <mpi.h>
#include <omp.h>
#include <string.h>
#include "exchange.h"
#include "slotsmanager.h"
#include "partmanager.h"
#include "walltime.h"
#include "drift.h"
#include "timefac.h"
#include "utils.h"
#include "utils/mpsort.h"
Go to the source code of this file.
Classes | |
struct | ExchangePlanEntry |
struct | ExchangePartCache |
struct | ExchangePlan |
Functions | |
static int | domain_exchange_once (ExchangePlan *plan, int do_gc, struct part_manager_type *pman, struct slots_manager_type *sman, MPI_Comm Comm) |
static void | domain_build_plan (int iter, ExchangeLayoutFunc layoutfunc, const void *layout_userdata, ExchangePlan *plan, struct part_manager_type *pman, MPI_Comm Comm) |
static size_t | domain_find_iter_space (ExchangePlan *plan, const struct part_manager_type *pman, const struct slots_manager_type *sman) |
static void | domain_build_exchange_list (ExchangeLayoutFunc layoutfunc, const void *layout_userdata, ExchangePlan *plan, struct DriftData *drift, struct part_manager_type *pman, struct slots_manager_type *sman, MPI_Comm Comm) |
static void | _transpose_plan_entries (ExchangePlanEntry *entries, int *count, int ptype, int NTask) |
static ExchangePlan | domain_init_exchangeplan (MPI_Comm Comm) |
static void | domain_free_exchangeplan (ExchangePlan *plan) |
int | domain_exchange (ExchangeLayoutFunc layoutfunc, const void *layout_userdata, int do_gc, struct DriftData *drift, struct part_manager_type *pman, struct slots_manager_type *sman, int maxiter, MPI_Comm Comm) |
static void | shall_we_compact_slots (int *compact, ExchangePlan *plan, const struct slots_manager_type *sman, MPI_Comm Comm) |
static void | mp_order_by_id (const void *data, void *radix, void *arg) |
void | domain_test_id_uniqueness (struct part_manager_type *pman) |
Variables | |
static MPI_Datatype | MPI_TYPE_PLAN_ENTRY = 0 |
|
static |
Definition at line 65 of file exchange.c.
References ExchangePlanEntry::base, NTask, ptype, and ExchangePlanEntry::slots.
Referenced by domain_exchange_once().
|
static |
Definition at line 386 of file exchange.c.
References part_manager_type::Base, part_manager_type::BoxSize, DriftData::CP, ExchangePlan::ExchangeList, gadget_compact_thread_arrays(), gadget_setup_thread_arrays(), get_exact_drift_factor(), particle_data::IsGarbage, mymalloc2, myrealloc, ExchangePlan::nexchange, ExchangePlan::ngarbage, part_manager_type::NumPart, real_drift_particle(), ta_free, ta_malloc, ThisTask, DriftData::ti0, DriftData::ti1, and particle_data::Ti_drift.
Referenced by domain_exchange().
|
static |
Definition at line 502 of file exchange.c.
References ExchangePlanEntry::base, part_manager_type::Base, endrun(), ExchangePlan::ExchangeList, ExchangePlan::last, ExchangePlan::layouts, message(), MPI_INT64, MPI_TYPE_PLAN_ENTRY, mymalloc, ExchangePlan::NTask, ExchangePartCache::ptype, ptype, ExchangePlanEntry::slots, ExchangePartCache::target, ExchangePlan::toGet, ExchangePlan::toGetOffset, ExchangePlan::toGetSum, ExchangePlan::toGo, ExchangePlan::toGoOffset, ExchangePlan::toGoSum, and particle_data::Type.
Referenced by domain_exchange().
int domain_exchange | ( | ExchangeLayoutFunc | layoutfunc, |
const void * | layout_userdata, | ||
int | do_gc, | ||
struct DriftData * | drift, | ||
struct part_manager_type * | pman, | ||
struct slots_manager_type * | sman, | ||
int | maxiter, | ||
MPI_Comm | Comm | ||
) |
Definition at line 103 of file exchange.c.
References domain_build_exchange_list(), domain_build_plan(), domain_exchange_once(), domain_find_iter_space(), domain_free_exchangeplan(), domain_init_exchangeplan(), endrun(), ExchangePlan::ExchangeList, ExchangePlan::last, MPI_TYPE_PLAN_ENTRY, MPIU_Any(), myfree, ExchangePlan::nexchange, and walltime_measure.
Referenced by domain_decompose_full(), domain_maintain(), fof_try_particle_exchange(), test_exchange(), test_exchange_uneven(), test_exchange_with_garbage(), and test_exchange_zero_slots().
|
static |
Definition at line 191 of file exchange.c.
References _transpose_plan_entries(), ExchangePlanEntry::base, part_manager_type::Base, BASESLOT_PI, domain_test_id_uniqueness(), slot_info::elsize, slot_info::enabled, endrun(), ExchangePlan::ExchangeList, particle_data::ID, slots_manager_type::info, particle_data::IsGarbage, ExchangePlan::last, ExchangePlan::layouts, part_manager_type::MaxPart, message(), MPI_Alltoallv_sparse(), MPI_TYPE_PARTICLE, MPI_TYPE_SLOT, MPIU_Any(), myfree, mymalloc2, ExchangePlan::ngarbage, ExchangePlan::NTask, part_manager_type::NumPart, particle_data::PI, slot_info::ptr, ExchangePartCache::ptype, ptype, shall_we_compact_slots(), slot_info::size, ExchangePlanEntry::slots, slots_check_id_consistency(), slots_gc(), slots_mark_garbage(), slots_reserve(), ta_free, ta_malloc, ExchangePartCache::target, ExchangePlan::toGet, ExchangePlan::toGetOffset, ExchangePlan::toGetSum, ExchangePlan::toGo, ExchangePlan::toGoOffset, ExchangePlan::toGoSum, particle_data::Type, and walltime_measure.
Referenced by domain_exchange().
|
static |
Definition at line 443 of file exchange.c.
References part_manager_type::Base, slot_info::elsize, slot_info::enabled, endrun(), ExchangePlan::ExchangeList, slots_manager_type::info, message(), mymalloc_freebytes, ExchangePlan::nexchange, ExchangePlan::NTask, NTask, ptype, and particle_data::Type.
Referenced by domain_exchange().
|
static |
Definition at line 94 of file exchange.c.
References myfree, ExchangePlan::toGet, ExchangePlan::toGetOffset, ExchangePlan::toGo, and ExchangePlan::toGoOffset.
Referenced by domain_exchange().
|
static |
toGo[0][task*NTask + partner] gives the number of particles in task 'task' that have to go to task 'partner' toGo[1] is SPH, toGo[2] is BH and toGo[3] is stars
Definition at line 78 of file exchange.c.
References mymalloc2, ExchangePlan::NTask, ExchangePlan::toGet, ExchangePlan::toGetOffset, ExchangePlan::toGo, and ExchangePlan::toGoOffset.
Referenced by domain_exchange().
void domain_test_id_uniqueness | ( | struct part_manager_type * | pman | ) |
Definition at line 570 of file exchange.c.
References part_manager_type::Base, endrun(), particle_data::ID, particle_data::IsGarbage, message(), mp_order_by_id(), mpsort_mpi, myfree, mymalloc, NTask, part_manager_type::NumPart, ta_malloc, and ThisTask.
Referenced by domain_decompose_full(), domain_exchange_once(), init(), test_exchange(), test_exchange_uneven(), test_exchange_with_garbage(), and test_exchange_zero_slots().
|
static |
Definition at line 565 of file exchange.c.
Referenced by domain_test_id_uniqueness().
|
static |
Definition at line 175 of file exchange.c.
References slots_manager_type::info, slot_info::maxsize, ptype, slot_info::size, ExchangePlanEntry::slots, ExchangePlan::toGetSum, and ExchangePlan::toGoSum.
Referenced by domain_exchange_once().
|
static |
Definition at line 20 of file exchange.c.
Referenced by domain_build_plan(), and domain_exchange().