MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
#include <stdint.h>
#include <mpi.h>
#include <stdarg.h>
Go to the source code of this file.
Macros | |
#define | MPI_UINT64 MPI_UNSIGNED_LONG |
#define | MPI_INT64 MPI_LONG |
#define | MPIU_Barrier(comm) _MPIU_Barrier(__FILE__, __LINE__, comm) |
Functions | |
int | cluster_get_num_hosts (void) |
double | get_physmem_bytes (void) |
double | get_random_number (uint64_t id) |
void | set_random_numbers (int seed) |
void | sumup_large_ints (int n, int *src, int64_t *res) |
void | sumup_longs (int n, int64_t *src, int64_t *res) |
int64_t | count_sum (int64_t countLocal) |
int | MPIU_Any (int condition, MPI_Comm comm) |
void | MPIU_write_pids (char *filename) |
size_t | gadget_compact_thread_arrays (int *dest, int *srcs[], size_t sizes[], int narrays) |
void | gadget_setup_thread_arrays (int *dest, int *srcs[], size_t sizes[], size_t total_size, int narrays) |
int | MPI_Alltoallv_smart (void *sendbuf, int *sendcnts, int *sdispls, MPI_Datatype sendtype, void *recvbuf, int *recvcnts, int *rdispls, MPI_Datatype recvtype, MPI_Comm comm) |
int | MPI_Alltoallv_sparse (void *sendbuf, int *sendcnts, int *sdispls, MPI_Datatype sendtype, void *recvbuf, int *recvcnts, int *rdispls, MPI_Datatype recvtype, MPI_Comm comm) |
double | timediff (double t0, double t1) |
double | second (void) |
size_t | sizemax (size_t a, size_t b) |
static int64_t | atomic_fetch_and_add_64 (int64_t *ptr, int64_t value) |
static int | atomic_fetch_and_add (int *ptr, int value) |
static int | atomic_add_and_fetch (int *ptr, int value) |
void | MPIU_Trace (MPI_Comm comm, int where, const char *fmt,...) |
void | MPIU_Tracev (MPI_Comm comm, int where, int error, const char *fmt, va_list va) |
int | _MPIU_Barrier (const char *fn, const int ln, MPI_Comm comm) |
#define MPIU_Barrier | ( | comm | ) | _MPIU_Barrier(__FILE__, __LINE__, comm) |
int _MPIU_Barrier | ( | const char * | fn, |
const int | line, | ||
MPI_Comm | comm | ||
) |
A fancy MPI barrier (use MPIU_Barrier macro)
Definition at line 500 of file system.c.
References MPIU_Trace(), NTask, ta_free, ta_malloc, and ThisTask.
|
inlinestatic |
|
inlinestatic |
Definition at line 78 of file system.h.
Referenced by get_freenode(), and real_ev().
|
inlinestatic |
Definition at line 68 of file system.h.
Referenced by sfr_wind_feedback_ngbiter(), slots_convert(), slots_split_particle(), and timestep_eh_slots_fork().
int cluster_get_num_hosts | ( | void | ) |
int64_t count_sum | ( | int64_t | countLocal | ) |
Definition at line 264 of file system.c.
References MPI_INT64.
Referenced by get_long_range_timestep_dloga(), and petaio_save_block().
size_t gadget_compact_thread_arrays | ( | int * | dest, |
int * | srcs[], | ||
size_t | sizes[], | ||
int | narrays | ||
) |
Definition at line 587 of file system.c.
Referenced by cooling_and_starformation(), domain_build_exchange_list(), rebuild_activelist(), treewalk_build_queue(), and treewalk_do_hsml_loop().
void gadget_setup_thread_arrays | ( | int * | dest, |
int * | srcs[], | ||
size_t | sizes[], | ||
size_t | total_size, | ||
int | narrays | ||
) |
Definition at line 600 of file system.c.
Referenced by cooling_and_starformation(), domain_build_exchange_list(), rebuild_activelist(), treewalk_build_queue(), and treewalk_do_hsml_loop().
double get_physmem_bytes | ( | void | ) |
Definition at line 467 of file system.c.
Referenced by read_parameter_file(), and read_parameterfile().
double get_random_number | ( | uint64_t | id | ) |
Definition at line 60 of file system.c.
References RNDTABLE, and RndTable.
Referenced by bh_powerlaw_seed_mass(), blackhole_accretion_ngbiter(), choose_QSO_halo(), gaussian_rng(), get_random_dir(), get_sfr_eeqos(), get_wind_dir(), lightcone_cross(), quicklyastarformation(), sfr_wind_feedback_ngbiter(), and update_random_offset().
int MPI_Alltoallv_smart | ( | void * | sendbuf, |
int * | sendcnts, | ||
int * | sdispls, | ||
MPI_Datatype | sendtype, | ||
void * | recvbuf, | ||
int * | recvcnts, | ||
int * | rdispls, | ||
MPI_Datatype | recvtype, | ||
MPI_Comm | comm | ||
) |
Definition at line 278 of file system.c.
References MPI_Alltoallv_sparse(), NTask, ta_free, ta_malloc, and ThisTask.
Referenced by fof_reduce_groups(), fof_seed(), and mpsort_mpi_histogram_sort().
int MPI_Alltoallv_sparse | ( | void * | sendbuf, |
int * | sendcnts, | ||
int * | sdispls, | ||
MPI_Datatype | sendtype, | ||
void * | recvbuf, | ||
int * | recvcnts, | ||
int * | rdispls, | ||
MPI_Datatype | recvtype, | ||
MPI_Comm | comm | ||
) |
Definition at line 353 of file system.c.
References myfree, mymalloc, NTask, and ThisTask.
Referenced by domain_exchange_once(), ev_communicate(), and MPI_Alltoallv_smart().
int MPIU_Any | ( | int | condition, |
MPI_Comm | comm | ||
) |
Definition at line 545 of file system.c.
Referenced by domain_decompose_full(), domain_determine_global_toptree(), domain_exchange(), domain_exchange_once(), domain_nonrecursively_combine_topTree(), force_tree_build(), mymalloc_init(), tamalloc_init(), winds_and_feedback(), and winds_subgrid().
void MPIU_Trace | ( | MPI_Comm | comm, |
int | where, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 182 of file system.c.
References MPIU_Tracev().
Referenced by _MPIU_Barrier().
void MPIU_Tracev | ( | MPI_Comm | comm, |
int | where, | ||
int | error, | ||
const char * | fmt, | ||
va_list | va | ||
) |
Definition at line 149 of file system.c.
References _timestart, prefix, putline(), and ThisTask.
Referenced by endrun(), message(), and MPIU_Trace().
void MPIU_write_pids | ( | char * | filename | ) |
double second | ( | void | ) |
Definition at line 83 of file system.c.
Referenced by ev_ndone(), ev_primary(), ev_reduce_result(), ev_secondary(), fof_label_primary(), and treewalk_run().
void set_random_numbers | ( | int | seed | ) |
size_t sizemax | ( | size_t | a, |
size_t | b | ||
) |
void sumup_large_ints | ( | int | n, |
int * | src, | ||
int64_t * | res | ||
) |
Definition at line 192 of file system.c.
References myfree, mymalloc, NTask, and ThisTask.
Referenced by check_omega(), collect_BH_info(), cooling_and_starformation(), fof_compile_catalogue(), fof_label_secondary(), gas_ionization_fraction(), get_long_range_timestep_dloga(), petaio_save_snapshot(), print_timebin_statistics(), turn_on_quasars(), winds_and_feedback(), and winds_find_weights().
double timediff | ( | double | t0, |
double | t1 | ||
) |
Definition at line 92 of file system.c.
Referenced by ev_ndone(), ev_primary(), ev_reduce_result(), ev_secondary(), and treewalk_run().