ESPResSo 3.2.0-167-g2c9ead1-git
Extensible Simulation Package for Soft Matter Research
Defines | Functions | Variables
debug.h File Reference

This file controls debug facilities. More...

#include "config.h"
Include dependency graph for debug.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define realloc(v, s)   __realloc((v),(s), "no line info", 0)
#define malloc(s)   __malloc((s), "no line info", 0)
#define free(v)   __free((v),"no line info", 0)
#define COMM_TRACE(cmd)   { cmd; }
#define EVENT_TRACE(cmd)   { cmd; }
#define PART_TRACE(cmd)   { cmd; }
#define INTEG_TRACE(cmd)   { cmd; }
#define CELL_TRACE(cmd)   { cmd; }
#define GHOST_TRACE(cmd)   { cmd; }
#define HALO_TRACE(cmd)   { cmd; }
#define GRID_TRACE(cmd)   { cmd; }
#define LATTICE_TRACE(cmd)   { cmd; }
#define FORCE_TRACE(cmd)   { cmd; }
#define VERLET_TRACE(cmd)   { cmd; }
#define P3M_TRACE(cmd)   { cmd; }
#define MDLC_TRACE(cmd)
#define MAGGS_TRACE(cmd)   { cmd; }
#define FFT_TRACE(cmd)   { cmd; }
#define RANDOM_TRACE(cmd)   { cmd; }
#define THERMO_TRACE(cmd)   { cmd; }
#define LJ_TRACE(cmd)   { cmd; }
#define MORSE_TRACE(cmd)   { cmd; }
#define BUCK_TRACE(cmd)
#define ESR_TRACE(cmd)   { cmd; }
#define ESK_TRACE(cmd)   { cmd; }
#define FENE_TRACE(cmd)   { cmd; }
#define GHOST_FORCE_TRACE(cmd)   { cmd; }
#define ONEPART_TRACE(cmd)   { cmd; }
#define STAT_TRACE(cmd)   { cmd; }
#define POLY_TRACE(cmd)   { cmd; }
#define MOLFORCES_TRACE(cmd)   { cmd; }
#define PTENSOR_TRACE(cmd)   { cmd; }
#define LB_TRACE(cmd)   { cmd; }
#define NANCHECK(expr)
 Equals { cmd } iff LB_DEBUG is set.

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
 by setting this variable to 1, a regular exit is indicated.
int check_id
 Identity of the particle to check extensively if ONEPART_DEBUG is defined.

Detailed Description

This file controls debug facilities.

The implementation is found in debug.c.

For every define there exists a macro that can be used to encapsulate short lines (like printf("...",...);) of code that should be executed iff the respective *_DEBUG macro is defined.

Definition in file debug.h.


Define Documentation

#define BUCK_TRACE (   cmd)

Definition at line 218 of file debug.h.

Referenced by add_buck_pair_force(), and calc_buck_cap_radii().

#define CELL_TRACE (   cmd)    { cmd; }
#define COMM_TRACE (   cmd)    { cmd; }
#define ESK_TRACE (   cmd)    { cmd; }

Definition at line 228 of file debug.h.

#define ESR_TRACE (   cmd)    { cmd; }

Definition at line 222 of file debug.h.

Referenced by p3m_add_pair_force().

#define EVENT_TRACE (   cmd)    { cmd; }
#define FENE_TRACE (   cmd)    { cmd; }

Definition at line 234 of file debug.h.

Referenced by calc_fene_pair_force().

#define FFT_TRACE (   cmd)    { cmd; }
#define FORCE_TRACE (   cmd)    { cmd; }
#define free (   v)    __free((v),"no line info", 0)

Definition at line 41 of file debug.h.

Referenced by __free(), __realloc(), add_mdlc_force_corrections(), analyze_cwvac(), analyze_formfactor(), analyze_formfactor_av(), analyze_push(), analyze_remove(), auto_exclusion(), bilayer_density_profile(), calc_diffusion_profile(), calc_fluctuations(), calc_radial_density_map(), calc_rdf_adress(), calc_rdf_av(), calc_rdf_intermol_av(), calc_surface_term(), cells_re_init(), check_particles(), cluster_free(), cluster_free_volume_grid(), collectBonds(), correlation_print_average1(), crosslinkC(), cuda_mpi_get_particles(), cuda_mpi_get_particles_slave(), cuda_mpi_send_forces(), cuda_mpi_send_forces_slave(), dfft_init(), distribute_tensors(), double_correlation_finalize(), double_correlation_get_data(), dp3m_free_dipoles(), fft_init(), free_comm(), free_particle_lists(), freePartCfg(), gather_runtime_errors(), get_DLC_dipolar(), get_lipid_orients(), halo_free_fieldtype(), halo_push_communication(), handle_collisions(), imd_send_energies(), imd_send_fcoords(), imd_send_mdcomm(), lb_calc_densprof(), lb_calc_velprof(), lb_check_halo_regions(), lb_collect_boundary_forces(), lb_gpu_get_boundary_forces(), lb_init_boundaries(), lb_init_GPU(), lb_lbfluid_load_checkpoint(), lb_lbfluid_print_boundary(), lb_lbfluid_print_velocity(), lb_lbfluid_print_vtk_boundary(), lb_lbfluid_print_vtk_density(), lb_lbfluid_print_vtk_velocity(), lb_lbfluid_save_checkpoint(), lb_release_fluid(), lb_release_gpu(), lbboundary_get_force(), lu_decompose_matrix(), maggs_exit(), magnetic_dipolar_direct_sum_calculations(), make_bond_type_exist(), mindist3(), mindist4(), MMM2D_add_far(), mpi_comm_mol_info(), mpi_gather_runtime_errors(), mpi_get_particles_slave(), mpi_local_stress_tensor_slave(), mpi_send_bond_slave(), MPI_Type_free(), mpi_who_has(), mpi_who_has_slave(), mpifake_sendrecv(), nemd_free(), nsq_balance_particles(), p3m_calc_kspace_stress(), p3m_free(), particle_invalidate_part_node(), polymerC(), realloc_ia_params(), realloc_tf_params(), release_halo_communication(), remove_particle(), set_particle_type(), sortPartCfg(), tclcommand_analyze_fluid_parse_densprof(), tclcommand_analyze_fluid_parse_velprof(), tclcommand_analyze_parse_aggregation(), tclcommand_analyze_parse_bilayer_density_profile(), tclcommand_analyze_parse_bond_dist(), tclcommand_analyze_parse_bond_l(), tclcommand_analyze_parse_configs(), tclcommand_analyze_parse_cwvac(), tclcommand_analyze_parse_density_profile_av(), tclcommand_analyze_parse_diffusion_profile(), tclcommand_analyze_parse_distribution(), tclcommand_analyze_parse_formfactor(), tclcommand_analyze_parse_g_av(), tclcommand_analyze_parse_gyration_tensor(), tclcommand_analyze_parse_holes(), tclcommand_analyze_parse_internal_dist(), tclcommand_analyze_parse_lipid_orient_order(), tclcommand_analyze_parse_local_stress_tensor(), tclcommand_analyze_parse_modes2d(), tclcommand_analyze_parse_radial_density_map(), tclcommand_analyze_parse_rdf(), tclcommand_analyze_parse_rdfchain(), tclcommand_analyze_parse_re(), tclcommand_analyze_parse_rg(), tclcommand_analyze_parse_rh(), tclcommand_analyze_parse_structurefactor(), tclcommand_analyze_parse_vanhove(), tclcommand_bit_random(), tclcommand_blockfile(), tclcommand_iccp3m_parse_double_list(), tclcommand_iccp3m_parse_normals(), tclcommand_imd_parse_pos(), tclcommand_inter_coulomb_parse_mmm1d(), tclcommand_inter_coulomb_parse_p3m_tune(), tclcommand_inter_magnetic_parse_dp3m_tune_params(), tclcommand_metadynamics_parse_distance(), tclcommand_metadynamics_parse_relative_z(), tclcommand_observable_interacts_with(), tclcommand_observable_print(), tclcommand_part_parse_bond(), tclcommand_part_print_bond_partners(), tclcommand_polymer(), tclcommand_print_average_errorbars(), tclcommand_print_correlation_time(), tclcommand_readmd(), tclcommand_t_random(), tclcommand_uwerr(), tclcommand_writemd(), UWerr(), UWerr_f(), uwerr_free_tcl_vector(), UWerr_proj(), uwerr_read_int_vector(), uwerr_read_matrix(), uwerr_read_tcl_double_vector(), vmdsock_create(), and vmdsock_destroy().

#define GHOST_FORCE_TRACE (   cmd)    { cmd; }

Definition at line 240 of file debug.h.

#define GHOST_TRACE (   cmd)    { cmd; }
#define GRID_TRACE (   cmd)    { cmd; }

Definition at line 137 of file debug.h.

Referenced by calc_node_neighbors(), grid_changed_box_l(), and grid_changed_n_nodes().

#define HALO_TRACE (   cmd)    { cmd; }
#define INTEG_TRACE (   cmd)    { cmd; }
#define LATTICE_TRACE (   cmd)    { cmd; }

Definition at line 144 of file debug.h.

Referenced by init_lattice().

#define LB_TRACE (   cmd)    { cmd; }
#define LJ_TRACE (   cmd)    { cmd; }
#define MAGGS_TRACE (   cmd)    { cmd; }

Definition at line 178 of file debug.h.

Referenced by maggs_calc_forces(), maggs_calc_init_e_field(), and maggs_check_intersect_1D().

#define malloc (   s)    __malloc((s), "no line info", 0)

Definition at line 40 of file debug.h.

Referenced by __malloc(), add_mdlc_force_corrections(), aggregation(), alloc_doublelist(), alloc_grained_doublelist(), alloc_grained_intlist(), alloc_intlist(), analyze_append(), analyze_configs(), analyze_push(), auto_exclusion(), average_init(), averages_add_empty_average(), bilayer_density_profile(), calc_diffusion_profile(), calc_fluctuations(), calc_radial_density_map(), calc_rdf_adress(), calc_rdf_av(), calc_rdf_intermol_av(), calc_surface_term(), check_particles(), cluster_free_volume_grid(), cluster_init(), collectBonds(), correlation_print_average1(), crosslinkC(), cuda_mpi_get_particles(), cuda_mpi_get_particles_slave(), cuda_mpi_send_forces(), cuda_mpi_send_forces_slave(), dd_prepare_comm(), delete_particle_of_type(), dfft_init(), distribute_tensors(), double_correlation_finalize(), double_correlation_get_data(), double_correlation_init(), double_correlation_print_spherically_averaged_sf(), fft_common_pre_init(), fft_init(), gather_runtime_errors(), get_DLC_dipolar(), get_lipid_orients(), halo_create_field_hvector(), halo_create_field_vector(), halo_create_fieldtype(), halo_push_communication(), imd_send_energies(), imd_send_fcoords(), imd_send_mdcomm(), init_gc(), init_type_array(), layered_prepare_comm(), lb_calc_densprof(), lb_calc_velprof(), lb_check_halo_regions(), lb_collect_boundary_forces(), lb_gpu_get_boundary_forces(), lb_init_boundaries(), lb_init_GPU(), lb_lbfluid_load_checkpoint(), lb_lbfluid_print_boundary(), lb_lbfluid_print_velocity(), lb_lbfluid_print_vtk_boundary(), lb_lbfluid_print_vtk_density(), lb_lbfluid_print_vtk_velocity(), lb_lbfluid_save_checkpoint(), lb_lbnode_get_pi_neq(), lb_lbnode_get_rho(), lb_lbnode_get_u(), lb_pre_init(), lbboundary_get_force(), lu_decompose_matrix(), maggs_setup_local_lattice(), magnetic_dipolar_direct_sum_calculations(), malloc_3d_grid(), mindist3(), mindist4(), MMM2D_add_far(), modes2d(), mpi_bcast_ia_params_slave(), mpi_comm_mol_info(), mpi_gather_runtime_errors(), mpi_get_particles(), mpi_get_particles_slave(), mpi_local_stress_tensor(), mpi_local_stress_tensor_slave(), mpi_send_bond_slave(), MPI_Type_contiguous(), MPI_Type_hvector(), MPI_Type_struct(), MPI_Type_vector(), mpi_who_has(), mpi_who_has_slave(), mpifake_sendrecv(), nemd_init(), nsq_balance_particles(), nsq_prepare_comm(), overlapped_bonded_set_params(), p3m_calc_kspace_stress(), p3m_gpu_init(), parse_corr_operation(), parse_id_list(), polymerC(), prepare_collision_queue(), prepare_comm(), realloc_ia_params(), realloc_tf_params(), remove_particle(), set_particle_type(), sortPartCfg(), strcat_alloc(), tabulated_bonded_set_params(), tclcommand_analyze_fluid_parse_densprof(), tclcommand_analyze_fluid_parse_velprof(), tclcommand_analyze_parse_aggregation(), tclcommand_analyze_parse_bilayer_density_profile(), tclcommand_analyze_parse_configs(), tclcommand_analyze_parse_density_profile_av(), tclcommand_analyze_parse_diffusion_profile(), tclcommand_analyze_parse_distribution(), tclcommand_analyze_parse_get_folded_positions(), tclcommand_analyze_parse_holes(), tclcommand_analyze_parse_lipid_orient_order(), tclcommand_analyze_parse_local_stress_tensor(), tclcommand_analyze_parse_modes2d(), tclcommand_analyze_parse_radial_density_map(), tclcommand_analyze_parse_rdf(), tclcommand_analyze_parse_vanhove(), tclcommand_bit_random(), tclcommand_blockfile(), tclcommand_correlation_parse_corr(), tclcommand_iccp3m_parse_double_list(), tclcommand_imd_parse_pos(), tclcommand_observable_interacts_with(), tclcommand_observable_print(), tclcommand_observable_tclcommand(), tclcommand_parse_profile(), tclcommand_parse_radial_profile(), tclcommand_part_parse_bond(), tclcommand_part_print_bond_partners(), tclcommand_polymer(), tclcommand_print_average_errorbars(), tclcommand_print_correlation_time(), tclcommand_readmd(), tclcommand_t_random(), tclcommand_uwerr(), tclcommand_writemd(), updatePartCfg(), UWerr(), uwerr_create_tcl_vector(), UWerr_f(), uwerr_read_int_vector(), uwerr_read_matrix(), uwerr_read_tcl_double_vector(), vmdsock_accept(), and vmdsock_create().

#define MDLC_TRACE (   cmd)
#define MOLFORCES_TRACE (   cmd)    { cmd; }

Definition at line 266 of file debug.h.

#define MORSE_TRACE (   cmd)    { cmd; }

Definition at line 210 of file debug.h.

Referenced by add_morse_pair_force().

#define NANCHECK (   expr)

Equals { cmd } iff LB_DEBUG is set.

Definition at line 289 of file debug.h.

#define ONEPART_TRACE (   cmd)    { cmd; }
#define P3M_TRACE (   cmd)    { cmd; }
#define PART_TRACE (   cmd)    { cmd; }
#define POLY_TRACE (   cmd)    { cmd; }
#define PTENSOR_TRACE (   cmd)    { cmd; }
#define RANDOM_TRACE (   cmd)    { cmd; }
#define realloc (   v,
 
)    __realloc((v),(s), "no line info", 0)

Definition at line 39 of file debug.h.

Referenced by __realloc(), add_pair(), add_pair_iccp3m(), analyze_append(), analyze_configs(), analyze_cwvac(), analyze_formfactor(), analyze_formfactor_av(), analyze_rdfchain(), analyze_remove(), averages_add_empty_average(), bcast_iccp3m_cfg(), calc_bond_dist(), calc_bond_dist_av(), calc_bond_l(), calc_bond_l_av(), calc_g1_av(), calc_g2_av(), calc_g3_av(), calc_gyration_tensor(), calc_internal_dist(), calc_internal_dist_av(), calc_re(), calc_re_av(), calc_rg(), calc_rg_av(), calc_rh(), calc_rh_av(), calc_structurefactor(), collectBonds(), create_mod_psi_up_to(), crosslinkC(), dd_init_cell_interactions(), dd_topology_release(), detect_collision(), dfft_init(), dp3m_calc_differential_operator(), dp3m_calc_influence_function_energy(), dp3m_calc_influence_function_force(), dp3m_calc_meshift(), dp3m_init(), dp3m_interpolate_dipole_assignment_function(), dp3m_realloc_ca_fields(), ELC_on_resort_particles(), fft_init(), free_pairList(), generate_constraint(), generate_lbboundary(), halo_push_communication(), init_g123(), init_type_array(), lb_calc_densprof(), lb_calc_velprof(), lb_init_boundaries(), lb_lbnode_set_extforce_GPU(), lb_prepare_communication(), lb_realloc_fluid(), maggs_calc_forces(), make_bond_type_exist(), MMM2D_on_resort_particles(), mpi_bcast_constraint(), mpi_bcast_constraint_slave(), mpi_bcast_lbboundary(), mpi_bcast_lbboundary_slave(), mpi_gather_runtime_errors(), mpi_gather_runtime_errors_slave(), mpi_who_has(), p3m_calc_differential_operator(), p3m_calc_influence_function_energy(), p3m_calc_influence_function_force(), p3m_calc_meshift(), p3m_init(), p3m_interpolate_charge_assignment_function(), p3m_realloc_ca_fields(), prepare_halo_communication(), prepare_recv_buffer(), prepare_send_buffer(), realloc_cellplist(), realloc_cells(), realloc_doublelist(), realloc_grained_doublelist(), realloc_grained_intlist(), realloc_intlist(), realloc_local_particles(), realloc_particle_node(), realloc_particlelist(), realloc_topology(), reallocate_global_type_list(), reallocate_type_array(), register_global_callback(), resize_verlet_list(), resize_verlet_list_iccp3m(), runtime_error(), strcat_alloc(), tclcommand_correlation_parse_corr(), tclcommand_iccp3m_parse_double_list(), tclcommand_iccp3m_parse_normals(), tclcommand_observable(), and wall_sort_particles().

#define STAT_TRACE (   cmd)    { cmd; }
#define THERMO_TRACE (   cmd)    { cmd; }
#define VERLET_TRACE (   cmd)    { cmd; }

Function Documentation

void __free ( void *  p,
char *  where,
int  line 
)

memory allocation test routine

Definition at line 79 of file debug.c.

References free, and this_node.

void* __malloc ( unsigned int  size,
char *  where,
int  line 
)

memory allocation test routine

Definition at line 68 of file debug.c.

References malloc, and this_node.

void* __realloc ( void *  old,
unsigned int  size,
char *  where,
int  line 
)

memory allocation test routine

Definition at line 54 of file debug.c.

References free, realloc, and this_node.

void check_particle_consistency ( )
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.


Variable Documentation

int check_id

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().