![]() |
ESPResSo 3.2.0-167-g2c9ead1-git
Extensible Simulation Package for Soft Matter Research
|
Implements the malloc replacements as described in debug.h. More...
#include <mpi.h>#include <signal.h>#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string.h>#include "utils.h"#include "communication.h"#include "cells.h"#include "grid.h"#include "integrate.h"
Go to the source code of this file.
Functions | |
| void * | __realloc (void *old, unsigned int size, char *where, int line) |
| memory allocation test routine | |
| void * | __malloc (unsigned int size, char *where, int line) |
| memory allocation test routine | |
| void | __free (void *p, char *where, int line) |
| memory allocation test routine | |
| void | core () |
| this functions kills the task with SIGSEGV | |
| void | check_particle_consistency () |
| this performs a lot of tests which will very likely detect corruptions of local_particles and the cell structure. | |
| void | check_particles () |
| check the consistency of the cells and particle_node. | |
| void | print_particle_positions () |
| Print all particle positions contained in cells::cells array. | |
| void | print_particle_forces () |
| Print all particle forces contained in cells::cells array. | |
Variables | |
| int | regular_exit = 0 |
| by setting this variable to 1, a regular exit is indicated. | |
| static int | core_done = 0 |
| int | check_id = ONEPART_DEBUG_ID |
| Identity of the particle to check extensively if ONEPART_DEBUG is defined. | |
| void __free | ( | void * | p, |
| char * | where, | ||
| int | line | ||
| ) |
| void* __malloc | ( | unsigned int | size, |
| char * | where, | ||
| int | line | ||
| ) |
| void* __realloc | ( | void * | old, |
| unsigned int | size, | ||
| char * | where, | ||
| int | line | ||
| ) |
| void check_particle_consistency | ( | ) |
this performs a lot of tests which will very likely detect corruptions of local_particles and the cell structure.
Definition at line 100 of file debug.c.
References box_l, CellPList::cell, CELL_TRACE, errexit(), ghost_cells, ParticleProperties::identity, local_cells, local_particles, max_seen_particle, CellPList::n, ParticleList::n, n_total_particles, ParticlePosition::p, Particle::p, ParticleList::part, PERIODIC, Particle::r, ROUND_ERROR_PREC, and this_node.
Referenced by cells_resort_particles(), dd_exchange_and_sort_particles(), and nsq_balance_particles().
| void check_particles | ( | ) |
check the consistency of the cells and particle_node.
Called from mpi_bcast_event(CHECK_PARTICLES)
Definition at line 187 of file debug.c.
References box_l, CellPList::cell, CELL_TRACE, comm_cart, errexit(), free, ParticleProperties::identity, local_cells, local_particles, malloc, max_seen_particle, MPI_Bcast(), MPI_INT, CellPList::n, ParticleList::n, n_total_particles, Particle::p, ParticleList::part, particle_node, PERIODIC, skin, skin2, and this_node.
Referenced by mpi_bcast_event_slave().
| void core | ( | ) |
this functions kills the task with SIGSEGV
Definition at line 87 of file debug.c.
References core_done, regular_exit, and this_node.
Referenced by errexit(), mpi_core(), and on_program_start().
| void print_particle_forces | ( | ) |
Print all particle forces contained in cells::cells array.
Definition at line 314 of file debug.c.
References cells, ParticleForce::f, Particle::f, ParticleList::n, n_cells, ParticleList::part, and this_node.
| void print_particle_positions | ( | ) |
Print all particle positions contained in cells::cells array.
Definition at line 295 of file debug.c.
References cells, ParticleList::n, n_cells, ParticlePosition::p, ParticleList::part, Particle::r, and this_node.
| int check_id = ONEPART_DEBUG_ID |
Identity of the particle to check extensively if ONEPART_DEBUG is defined.
Definition at line 45 of file debug.c.
Referenced by add_buck_pair_force(), add_dh_coulomb_pair_force(), add_hat_pair_force(), add_interrf_pair_force(), add_lj_pair_force(), add_ljangle_pair_force(), add_ljcos2_pair_force(), add_ljcos_pair_force(), add_ljgen_pair_force(), add_morse_pair_force(), add_rf_coulomb_pair_force_no_cutoff(), add_soft_pair_force(), add_tunable_slip_pair_force(), build_verlet_lists_and_calc_verlet_ia(), build_verlet_lists_and_calc_verlet_ia_iccp3m(), calc_endangledist_pair_force(), calc_fene_pair_force(), calc_harmonic_pair_force(), calc_overlap_bond_force(), calc_particle_lattice_ia(), calc_stretching_force_pair_force(), calc_subt_lj_pair_force(), calc_tab_bond_force(), convert_initial_torques(), convert_torques_propagate_omega(), dp3m_assign_forces_dip(), friction_thermo_langevin(), friction_thermo_langevin_rotation(), lb_viscous_coupling(), P3M_assign_forces(), P3M_assign_torques(), propagate_omega_quat_particle(), propagate_press_box_pos_and_rescale_npt(), propagate_vel(), propagate_vel_pos(), rescale_forces(), and rescale_forces_propagate_vel().
| int regular_exit = 0 |
by setting this variable to 1, a regular exit is indicated.
In that case, no core dump is generated.
Definition at line 38 of file debug.c.
Referenced by core(), mpi_stop(), and mpi_stop_slave().
1.7.5.1