![]() |
ESPResSo 3.2.0-11-g9950804-git
Extensible Simulation Package for Soft Matter Research
|
This file contains the asynchronous MPI communication. More...
#include "global.h"#include "particle_data.h"#include "random.h"#include "topology.h"#include <mpi.h>
Go to the source code of this file.
Defines | |
Event codes for \ref mpi_bcast_event | |
These codes are used by mpi_bcast_event to notify certain changes of doing something now. | |
| #define | P3M_COUNT_CHARGES 0 |
| #define | INVALIDATE_SYSTEM 1 |
| #define | CHECK_PARTICLES 2 |
| #define | MAGGS_COUNT_CHARGES 3 |
| #define | P3M_COUNT_DIPOLES 5 |
Functions | |
Exported Functions | |
| void | mpi_init (int *argc, char ***argv) |
| Initialize MPI and determine n_nodes and this_node. | |
| void | mpi_loop () |
| Process requests from master node. | |
| void | mpi_stop () |
| Issue REQ_TERM: stop Espresso, all slave nodes exit. | |
| void | mpi_finalize () |
| Finalize MPI. | |
| int | mpi_bcast_parameter (int i) |
| Issue REQ_BCAST_PAR: broadcast a parameter from datafield. | |
| void | mpi_who_has () |
| Issue REQ_WHO_HAS: ask nodes for their attached particles. | |
| void | mpi_bcast_event (int event) |
| Issue REQ_EVENT: tells all clients of some system change. | |
| void | mpi_place_particle (int node, int id, double pos[3]) |
| Issue REQ_PLACE: move particle to a position on a node. | |
| void | mpi_place_new_particle (int node, int id, double pos[3]) |
| Issue REQ_PLACE: create particle at a position on a node. | |
| void | mpi_send_v (int node, int part, double v[3]) |
| Issue REQ_SET_V: send particle velocity. | |
| void | mpi_send_f (int node, int part, double F[3]) |
| Issue REQ_SET_F: send particle force. | |
| void | mpi_send_mass (int node, int part, double mass) |
| Issue REQ_SET_M: send particle mass. | |
| void | mpi_send_q (int node, int part, double q) |
| Issue REQ_SET_Q: send particle charge. | |
| void | mpi_send_mu_E (int node, int part, double mu_E[3]) |
| Issue REQ_SET_MU_E: send particle electrophoretic mobility. | |
| void | mpi_send_rotational_inertia (int node, int part, double rinertia[3]) |
| Issue REQ_SET_ROTATIONAL_INERTIA: send particle rotational inertia. | |
| void | mpi_send_quat (int node, int part, double quat[4]) |
| Issue REQ_SET_QUAT: send particle orientation. | |
| void | mpi_send_rotation (int pnode, int part, int rot) |
| Issue REQ_SET_ROTATION: send particle rotation flag Also calls on_particle_change. | |
| void | mpi_send_omega (int node, int part, double omega[3]) |
| void | mpi_send_torque (int node, int part, double torque[3]) |
| Issue REQ_SET_TORQUE: send particle torque. | |
| void | mpi_send_dip (int node, int part, double dip[3]) |
| Issue REQ_SET_DIP: send particle dipole orientation. | |
| void | mpi_send_dipm (int node, int part, double dipm) |
| Issue REQ_SET_DIPM: send particle dipole moment. | |
| void | mpi_send_virtual (int node, int part, int isVirtual) |
| Issue REQ_SET_DIPM: send particle dipole moment. | |
| void | mpi_send_vs_relative (int node, int part, int vs_relative_to, double vs_distance) |
| void | mpi_send_type (int node, int part, int type) |
| Issue REQ_SET_TYPE: send particle type. | |
| void | mpi_send_mol_id (int node, int part, int mid) |
| Issue REQ_SET_MOL_ID: send molecule id. | |
| int | mpi_send_bond (int pnode, int part, int *bond, int delete) |
| Issue REQ_SET_BOND: send bond. | |
| void | mpi_send_exclusion (int part, int part2, int delete) |
| Issue REQ_SET_EXCLUSION: send exclusions. | |
| void | mpi_remove_particle (int node, int id) |
| Issue REQ_REM_PART: remove a particle. | |
| void | mpi_recv_part (int node, int part, Particle *part_data) |
| Issue REQ_GET_PART: recv particle data. | |
| int | mpi_integrate (int n_steps) |
| Issue REQ_INTEGRATE: start integrator. | |
| void | mpi_bcast_ia_params (int i, int j) |
| Issue REQ_BCAST_IA: send new ia params. | |
| void | mpi_bcast_tf_params (int i) |
| void | mpi_bcast_n_particle_types (int s) |
| Issue REQ_BCAST_IA_SIZE: send new size of ia_params. | |
| void | mpi_gather_stats (int job, void *result, void *result_t, void *result_nb, void *result_t_nb) |
| Issue REQ_GATHER: gather data for analysis in analyze. | |
| void | mpi_local_stress_tensor (DoubleList *TensorInBin, int bins[3], int periodic[3], double range_start[3], double range[3]) |
| Issue GET_LOCAL_STRESS_TENSOR: gather the contribution to the local stress tensors from each node. | |
| void | mpi_get_particles (Particle *result, IntList *il) |
| Issue REQ_GETPARTS: gather all particle informations (except bonds). | |
| void | mpi_set_time_step (double time_step) |
| Issue REQ_SET_TIME_STEP: send new time_step and rescale the velocities accordingly. | |
| void | mpi_bcast_coulomb_params () |
| Issue REQ_BCAST_COULOMB: send new coulomb parameters. | |
| void | mpi_send_ext_force (int pnode, int part, int flag, int mask, double force[3]) |
| Issue REQ_SEND_EXT_FORCE: send nex external flag and external force. | |
| void | mpi_send_ext_torque (int pnode, int part, int flag, int mask, double torque[3]) |
| Issue REQ_SEND_EXT_TORQUE: send nex external flag and external torque. | |
| void | mpi_set_particle_temperature (int pnode, int part, double _T) |
| Issue REQ_SEND_PARTICLE_T: send particle type specific temperature. | |
| void | mpi_set_particle_gamma (int pnode, int part, double gamma) |
| Issue REQ_SEND_PARTICLE_T: send particle type specific frictional coefficient. | |
| void | mpi_bcast_constraint (int del_num) |
| Issue REQ_BCAST_COULOMB: send new coulomb parameters. | |
| void | mpi_bcast_lbboundary (int del_num) |
| Issue REQ_LB_BOUNDARY: set up walls for lb fluid. | |
| void | mpi_random_seed (int cnt, long *seed) |
| Issue REQ_RANDOM_SEED: read/set seed of random number generators on each node. | |
| void | mpi_random_stat (int cnt, RandomStatus *stat) |
| Issue REQ_RANDOM_STAT: read/set status of random number generators on each node. | |
| void | mpi_cap_forces (double force_cap) |
| Issue REQ_BCAST_LJFORCECAP: initialize LJ force capping. | |
| void | mpi_get_constraint_force (int constraint, double force[3]) |
| Issue REQ_BCAST_MORSEFORCECAP: initialize Morse force capping. | |
| void | mpi_bit_random_seed (int cnt, int *seed) |
| Issue REQ_BIT_RANDOM_SEED: read/set seed of the bit random number generators on each node. | |
| void | mpi_bit_random_stat (int cnt, BitRandomStatus *stat) |
| Issue REQ_BIT_RANDOM_STAT: read/set status of the bit random number generators on each node. | |
| void | mpi_rescale_particles (int dir, double scale) |
| Issue REQ_RESCALE_PART: rescales all particle positions in direction 'dir' by a factor 'scale'. | |
| void | mpi_bcast_cell_structure (int cs) |
| Issue REQ_BCAST_CS: change the cell structure on all nodes. | |
| void | mpi_bcast_nptiso_geom (void) |
| Issue REQ_BCAST_NPTISO_GEOM: broadcast nptiso geometry parameter to all nodes. | |
| void | mpi_update_mol_ids (void) |
| Issue REQ_BCAST_LJANGLEFORCECAP: initialize LJANGLE force capping. | |
| int | mpi_sync_topo_part_info (void) |
| Issue REQ_SYNC_TOPO: Update the molecules ids to that they correspond to the topology. | |
| void | mpi_bcast_lb_params (int field) |
| Issue REQ_BCAST_LBPAR: Broadcast a parameter for Lattice Boltzmann. | |
| void | mpi_send_fluid (int node, int index, double rho, double *j, double *pi) |
| Issue REQ_SEND_FLUID: Send a single lattice site to a processor. | |
| void | mpi_recv_fluid (int node, int index, double *rho, double *j, double *pi) |
| Issue REQ_GET_FLUID: Receive a single lattice site from a processor. | |
| void | mpi_recv_fluid_boundary_flag (int node, int index, int *boundary) |
| Issue REQ_LB_GET_BOUNDARY_FLAG: Receive a single lattice sites boundary flag from a processor. | |
| int | mpi_iccp3m_iteration (int dummy) |
| Issue REQ_ICCP3M_ITERATION: performs iccp3m iteration. | |
| int | mpi_iccp3m_init (int dummy) |
| Issue REQ_ICCP3M_INIT: performs iccp3m initialization. | |
| void | mpi_recv_fluid_populations (int node, int index, double *pop) |
| Issue REQ_RECV_FLUID_POPULATIONS: Send a single lattice site to a processor. | |
| void | mpi_send_fluid_populations (int node, int index, double *pop) |
| Issue REQ_SEND_FLUID_POPULATIONS: Send a single lattice site to a processor. | |
| void | mpi_bcast_max_mu () |
| Part of MDLC. | |
| int | mpi_gather_runtime_errors (char **errors) |
| Issue REQ_GET_ERRS: gather all error messages from all nodes and return them. | |
| void | mpi_kill_particle_motion (int rotation) |
| Galilei and other: set all particle velocities and rotational inertias to zero. | |
| void | mpi_kill_particle_forces (int torque) |
| void | mpi_system_CMS () |
| void | mpi_system_CMS_velocity () |
| void | mpi_galilei_transform () |
| void | mpi_setup_reaction () |
| Issue REQ_CATALYTIC_REACTIONS: notify the system of changes to the reaction parameters. | |
Variables | |
| MPI_Comm | comm_cart |
Exported Variables | |
| int | this_node |
| The number of this node. | |
| int | n_nodes |
| The total number of nodes. | |
This file contains the asynchronous MPI communication.
It is the header file for communication.c.
The asynchronous MPI communication is used during the script evaluation. Except for the master node that interpretes the Tcl script, all other nodes wait in mpi_loop() for the master node to issue an action using mpi_call(). mpi_loop immediately executes an MPI_Bcast and therefore waits for the master node to broadcast a command, which is done by mpi_call(). The request consists of three integers, the first one describing the action issued, the second and third an arbitrary parameter depending on the action issued. If applicable, the second parameter is the node number of the slave this request is dedicated to.
To add new actions (e. g. to implement new Tcl commands), do the following:
After this your procedure is free to do anything. However, it has to be in (MPI) sync with what your new mpi_*_slave does. This procedure is called immediately after the broadcast with the arbitrary integer as parameter. To this aim it has also to be added to callbacks. Last but not least for debugging purposes you can add a nice name to names in the same way.
Definition in file communication.h.
| #define CHECK_PARTICLES 2 |
Definition at line 560 of file communication.h.
Referenced by mpi_bcast_event_slave(), and tclcommand_part_parse_cmd().
| #define INVALIDATE_SYSTEM 1 |
Definition at line 559 of file communication.h.
Referenced by mpi_bcast_event_slave(), tclcommand_invalidate_system(), and time_force_calc().
| #define MAGGS_COUNT_CHARGES 3 |
Definition at line 561 of file communication.h.
Referenced by mpi_bcast_event_slave().
| #define P3M_COUNT_CHARGES 0 |
Definition at line 558 of file communication.h.
Referenced by mpi_bcast_event_slave(), and p3m_adaptive_tune().
| #define P3M_COUNT_DIPOLES 5 |
Definition at line 562 of file communication.h.
Referenced by dp3m_adaptive_tune(), and mpi_bcast_event_slave().
| void mpi_bcast_cell_structure | ( | int | cs | ) |
Issue REQ_BCAST_CS: change the cell structure on all nodes.
Definition at line 2233 of file communication.c.
References cells_re_init(), mpi_bcast_cell_structure_slave(), and mpi_call().
Referenced by tclcommand_cellsystem().
| void mpi_bcast_constraint | ( | int | del_num | ) |
Issue REQ_BCAST_COULOMB: send new coulomb parameters.
Definition at line 1919 of file communication.c.
References comm_cart, constraints, MPI_Bcast(), mpi_bcast_constraint_slave(), MPI_BYTE, mpi_call(), n_constraints, on_constraint_change(), and realloc.
Referenced by tclcommand_constraint().
| void mpi_bcast_coulomb_params | ( | ) |
Issue REQ_BCAST_COULOMB: send new coulomb parameters.
Definition at line 1742 of file communication.c.
References mpi_bcast_coulomb_params_slave(), and mpi_call().
Referenced by coulomb_set_bjerrum(), dawaanr_set_params(), dh_set_params(), dipolar_set_Dbjerrum(), dp3m_adaptive_tune(), dp3m_mcr_time(), dp3m_set_eps(), dp3m_set_mesh_offset(), dp3m_set_ninterpol(), dp3m_set_params(), ELC_set_params(), maggs_set_parameters(), mdds_set_params(), mdlc_set_params(), MMM1D_set_params(), mmm1d_tune(), MMM2D_set_params(), p3m_adaptive_tune(), p3m_mcr_time(), p3m_set_eps(), p3m_set_mesh_offset(), p3m_set_ninterpol(), p3m_set_params(), rf_set_params(), tclcommand_inter_parse_coulomb(), and tclcommand_inter_parse_magnetic().
| void mpi_bcast_event | ( | int | event | ) |
Issue REQ_EVENT: tells all clients of some system change.
The events are:
Then all nodes execute the respective on_* procedure from initialize.c Note that not all of these codes are used. Since some actions (like placing a particle) include communication anyways, this is handled by the way.
Definition at line 373 of file communication.c.
References mpi_bcast_event_slave(), and mpi_call().
Referenced by dp3m_adaptive_tune(), p3m_adaptive_tune(), tclcommand_invalidate_system(), tclcommand_part_parse_cmd(), and time_force_calc().
| void mpi_bcast_ia_params | ( | int | i, |
| int | j | ||
| ) |
Issue REQ_BCAST_IA: send new ia params.
Also calls on_short_range_ia_change.
mpi_bcast_ia_params is used for both, bonded and non-bonded interaction parameters. Therefor i and j are used depending on their value:
| i | particle type for non bonded interaction parameters / bonded interaction type number. |
| j | if not negative: particle type for non bonded interaction parameters / if negative: flag for bonded interaction |
Definition at line 1156 of file communication.c.
References BONDED_IA_OVERLAPPED, bonded_ia_params, BONDED_IA_TABULATED, comm_cart, copy_ia_params(), DoubleList::e, get_ia_param(), i, DoubleList::max, MPI_Bcast(), mpi_bcast_ia_params_slave(), MPI_BYTE, mpi_call(), MPI_DOUBLE, MPI_INT, on_short_range_ia_change(), Bonded_ia_parameters::overlap, Bonded_ia_parameters::p, Bonded_ia_parameters::tab, tabulated_energies, and tabulated_forces.
Referenced by angle_cosine_set_params(), angle_cossquare_set_params(), angle_harmonic_set_params(), angle_set_params(), angledist_set_params(), area_force_global_set_params(), area_force_local_set_params(), bending_force_set_params(), BMHTF_set_params(), buckingham_set_params(), comfixed_set_params(), comforce_set_params(), dihedral_set_params(), endangledist_set_params(), fene_set_params(), gaussian_set_params(), gay_berne_set_params(), harmonic_set_params(), hat_set_params(), hertzian_set_params(), inter_dpd_set_params(), interrf_set_params(), lennard_jones_set_params(), lj_cos_set_params(), ljangle_set_params(), ljcos2_set_params(), ljgen_set_params(), local_setup_reaction(), molcut_set_params(), morse_set_params(), overlapped_bonded_set_params(), rigid_bond_set_params(), smooth_step_set_params(), soft_sphere_set_params(), stretching_force_set_params(), subt_lj_set_params(), tabulated_bonded_set_params(), tabulated_set_params(), tunable_slip_set_params(), virtual_set_params(), and volume_force_set_params().
| void mpi_bcast_lb_params | ( | int | field | ) |
Issue REQ_BCAST_LBPAR: Broadcast a parameter for Lattice Boltzmann.
| field | References the parameter field to be broadcasted. The references are defined in lb.h |
Definition at line 2361 of file communication.c.
References mpi_bcast_lb_params_slave(), and mpi_call().
Referenced by lb_lbfluid_load_checkpoint(), lb_lbfluid_set_agrid(), lb_lbfluid_set_bulk_visc(), lb_lbfluid_set_density(), lb_lbfluid_set_ext_force(), lb_lbfluid_set_friction(), lb_lbfluid_set_gamma_even(), lb_lbfluid_set_gamma_odd(), lb_lbfluid_set_tau(), and lb_lbfluid_set_visc().
| void mpi_bcast_lbboundary | ( | int | del_num | ) |
Issue REQ_LB_BOUNDARY: set up walls for lb fluid.
Definition at line 1967 of file communication.c.
References comm_cart, lb_boundaries, MPI_Bcast(), mpi_bcast_lbboundary_slave(), MPI_BYTE, mpi_call(), n_lb_boundaries, on_lbboundary_change(), and realloc.
Referenced by tclcommand_lbboundary().
| void mpi_bcast_max_mu | ( | ) |
Part of MDLC.
Definition at line 2638 of file communication.c.
References calc_mu_max(), mpi_bcast_max_mu_slave(), and mpi_call().
Referenced by mdlc_tune().
| void mpi_bcast_n_particle_types | ( | int | s | ) |
Issue REQ_BCAST_IA_SIZE: send new size of ia_params.
| s | the new size for ia_params. |
Definition at line 1351 of file communication.c.
References mpi_bcast_n_particle_types_slave(), and mpi_call().
Referenced by make_particle_type_exist().
| void mpi_bcast_nptiso_geom | ( | void | ) |
Issue REQ_BCAST_NPTISO_GEOM: broadcast nptiso geometry parameter to all nodes.
Definition at line 2246 of file communication.c.
References mpi_bcast_nptiso_geom_slave(), and mpi_call().
Referenced by tclcommand_integrate_set_npt_isotropic().
| int mpi_bcast_parameter | ( | int | i | ) |
Issue REQ_BCAST_PAR: broadcast a parameter from datafield.
| i | the number from global.h referencing the datafield. |
Definition at line 287 of file communication.c.
References check_runtime_errors(), common_bcast_parameter(), mpi_bcast_parameter_slave(), and mpi_call().
Referenced by dpd_switch_off(), ghmc_mc(), remove_particle(), rescale_boxl(), rigid_bond_set_params(), tclcallback_box_l(), tclcallback_max_num_cells(), tclcallback_min_global_cut(), tclcallback_min_num_cells(), tclcallback_node_grid(), tclcallback_npt_p_diff(), tclcallback_npt_piston(), tclcallback_p_ext(), tclcallback_periodicity(), tclcallback_skin(), tclcallback_time(), tclcommand_adress_parse_set(), tclcommand_cellsystem(), tclcommand_integrate_set_npt_isotropic(), tclcommand_integrate_set_nvt(), tclcommand_lbfluid(), tclcommand_thermostat_parse_dpd(), tclcommand_thermostat_parse_ghmc(), tclcommand_thermostat_parse_inter_dpd(), tclcommand_thermostat_parse_langevin(), tclcommand_thermostat_parse_lb(), tclcommand_thermostat_parse_npt_isotropic(), and tclcommand_thermostat_parse_off().
| void mpi_bcast_tf_params | ( | int | i | ) |
Definition at line 1297 of file communication.c.
References comm_cart, DoubleList::e, get_tf_param(), DoubleList::max, MPI_Barrier(), MPI_Bcast(), mpi_bcast_tf_params_slave(), MPI_BYTE, mpi_call(), MPI_DOUBLE, MPI_INT, thermodynamic_f_energies, and thermodynamic_forces.
Referenced by tf_set_params().
| void mpi_bit_random_seed | ( | int | cnt, |
| int * | seed | ||
| ) |
Issue REQ_BIT_RANDOM_SEED: read/set seed of the bit random number generators on each node.
Definition at line 2152 of file communication.c.
References comm_cart, init_bit_random_generator(), mpi_bit_random_seed_slave(), mpi_call(), MPI_Gather(), MPI_INT, MPI_Scatter(), print_bit_random_seed(), RANDOM_TRACE, and this_node.
Referenced by tclcommand_bit_random().
| void mpi_bit_random_stat | ( | int | cnt, |
| BitRandomStatus * | stat | ||
| ) |
Issue REQ_BIT_RANDOM_STAT: read/set status of the bit random number generators on each node.
Definition at line 2181 of file communication.c.
References comm_cart, init_bit_random_stat(), mpi_bit_random_stat_slave(), MPI_BYTE, mpi_call(), MPI_Gather(), MPI_Scatter(), print_bit_random_stat(), BitRandomStatus::random_pointer_1, BitRandomStatus::random_pointer_2, RANDOM_TRACE, and this_node.
Referenced by tclcommand_bit_random().
| void mpi_cap_forces | ( | double | force_cap | ) |
Issue REQ_BCAST_LJFORCECAP: initialize LJ force capping.
Definition at line 2090 of file communication.c.
References force_cap, mpi_call(), and mpi_cap_forces_slave().
Referenced by buckingham_set_params(), forcecap_set_params(), lennard_jones_set_params(), ljangle_set_params(), ljcos2_set_params(), ljforcecap_set_params(), ljgen_set_params(), morse_set_params(), and tabulated_set_params().
| void mpi_finalize | ( | ) |
Finalize MPI.
Called by all nodes upon exit
| void mpi_galilei_transform | ( | ) |
Definition at line 2835 of file communication.c.
References galilei_struct::cms_vel, comm_cart, gal, local_galilei_transform(), MPI_Bcast(), mpi_call(), MPI_DOUBLE, mpi_galilei_transform_slave(), mpi_system_CMS_velocity(), and on_particle_change().
Referenced by tclcommand_galilei_transform().
| int mpi_gather_runtime_errors | ( | char ** | errors | ) |
Issue REQ_GET_ERRS: gather all error messages from all nodes and return them.
| errors | contains the errors from all nodes. This has to point to an array of character pointers, one for each node. |
Definition at line 2377 of file communication.c.
References check_runtime_errors(), comm_cart, error_msg, ES_ERROR, ES_OK, free, malloc, mpi_call(), MPI_CHAR, MPI_Gather(), mpi_gather_runtime_errors_slave(), MPI_INT, MPI_Recv(), MPI_STATUS_IGNORE, n_error_msg, n_nodes, and realloc.
Referenced by gather_runtime_errors().
| void mpi_gather_stats | ( | int | job, |
| void * | result, | ||
| void * | result_t, | ||
| void * | result_nb, | ||
| void * | result_t_nb | ||
| ) |
Issue REQ_GATHER: gather data for analysis in analyze.
| job | what to do:
|
| result | where to store the gathered value(s):
|
| result_t | where to store the gathered value(s):
|
| result_nb | where to store the gathered value(s):
|
| result_t_nb | where to store the gathered value(s):
|
Definition at line 1369 of file communication.c.
References energy_calc(), errexit(), lb_calc_fluid_mass(), lb_calc_fluid_momentum(), lb_calc_fluid_temp(), lb_collect_boundary_forces(), mpi_call(), mpi_gather_stats_slave(), predict_momentum_particles(), pressure_calc(), and this_node.
Referenced by lb_master_calc_densprof(), lb_master_calc_velprof(), lbboundary_get_force(), master_energy_calc(), master_pressure_calc(), momentum_calc(), tclcommand_analyze_fluid_parse_mass(), tclcommand_analyze_fluid_parse_momentum(), tclcommand_analyze_fluid_parse_temp(), and tclcommand_analyze_parse_and_print_momentum().
| void mpi_get_constraint_force | ( | int | constraint, |
| double | force[3] | ||
| ) |
Issue REQ_BCAST_MORSEFORCECAP: initialize Morse force capping.
Issue REQ_BCAST_BUCKFORCECAP: initialize Buckingham force capping. Issue REQ_BCAST_TABFORCECAP: initialize tabulated force capping. Issue REQ_GET_CONSFOR: get force acting on constraint
Definition at line 2136 of file communication.c.
References comm_cart, constraints, mpi_call(), MPI_DOUBLE, mpi_get_constraint_force_slave(), MPI_Reduce(), and MPI_SUM.
Referenced by tclprint_to_result_ConstraintForce().
Issue REQ_GETPARTS: gather all particle informations (except bonds).
This is slow and may use huge amounts of memory. If il is non-NULL, also the bonding information is also fetched and stored in a single intlist pointed to by il. The particles bonding information references this array, which is the only data you have to free later (besides the result array you allocated). YOU MUST NOT CALL free_particle on any of these particles!
| result | where to store the gathered particles |
| il | if non-NULL, the integerlist where to store the bonding info |
Definition at line 1530 of file communication.c.
References Particle::bl, CellPList::cell, cells_get_n_particles(), comm_cart, COMM_TRACE, ParticlePosition::dip, IntList::e, errexit(), i, init_intlist(), local_cells, malloc, MPI_BYTE, mpi_call(), MPI_Gather(), mpi_get_particles_slave(), MPI_INT, MPI_Recv(), MPI_STATUS_IGNORE, IntList::n, CellPList::n, ParticleList::n, n_nodes, n_total_particles, ParticlePosition::p, Particle::p, part, ParticleList::part, ParticleProperties::q, Particle::r, realloc_intlist(), SOME_TAG, this_node, and ParticleProperties::type.
Referenced by collectBonds(), mindist3(), mindist4(), and updatePartCfg().
| int mpi_iccp3m_init | ( | int | dummy | ) |
Issue REQ_ICCP3M_INIT: performs iccp3m initialization.
Definition at line 2556 of file communication.c.
References bcast_iccp3m_cfg(), check_runtime_errors(), COMM_TRACE, mpi_call(), mpi_iccp3m_init_slave(), and this_node.
Referenced by tclcommand_iccp3m().
| int mpi_iccp3m_iteration | ( | int | dummy | ) |
Issue REQ_ICCP3M_ITERATION: performs iccp3m iteration.
Definition at line 2529 of file communication.c.
References check_runtime_errors(), COMM_TRACE, iccp3m_iteration(), mpi_call(), mpi_iccp3m_iteration_slave(), and this_node.
Referenced by tclcommand_iccp3m().
| void mpi_init | ( | int * | argc, |
| char *** | argv | ||
| ) |
Initialize MPI and determine n_nodes and this_node.
Definition at line 188 of file communication.c.
References comm_cart, MPI_Cart_coords(), MPI_Cart_create(), MPI_Comm_rank(), MPI_Comm_size(), MPI_COMM_WORLD, mpi_core(), MPI_Dims_create(), MPI_Errhandler_create(), MPI_Errhandler_set(), MPI_Init(), n_nodes, node_grid, node_pos, periodic, and this_node.
Referenced by main().
| int mpi_integrate | ( | int | n_steps | ) |
Issue REQ_INTEGRATE: start integrator.
| n_steps | how many steps to do. |
Definition at line 1136 of file communication.c.
References check_runtime_errors(), COMM_TRACE, integrate_vv(), mpi_call(), mpi_integrate_slave(), and this_node.
Referenced by tclcommand_integrate(), and time_force_calc().
| void mpi_kill_particle_forces | ( | int | torque | ) |
Definition at line 2740 of file communication.c.
References local_kill_particle_forces(), mpi_call(), mpi_kill_particle_forces_slave(), and on_particle_change().
Referenced by tclcommand_kill_particle_forces().
| void mpi_kill_particle_motion | ( | int | rotation | ) |
Galilei and other: set all particle velocities and rotational inertias to zero.
set all forces and torques on the particles to zero calculate the centre of mass (CMS) calculate the velocity of the CMS remove the CMS velocity from the system
Definition at line 2727 of file communication.c.
References local_kill_particle_motion(), mpi_call(), mpi_kill_particle_motion_slave(), and on_particle_change().
Referenced by tclcommand_kill_particle_motion().
| void mpi_local_stress_tensor | ( | DoubleList * | TensorInBin, |
| int | bins[3], | ||
| int | periodic[3], | ||
| double | range_start[3], | ||
| double | range[3] | ||
| ) |
Issue GET_LOCAL_STRESS_TENSOR: gather the contribution to the local stress tensors from each node.
Definition at line 1456 of file communication.c.
References alloc_doublelist(), comm_cart, DoubleList::e, i, init_doublelist(), local_stress_tensor_calc(), malloc, MPI_Bcast(), mpi_call(), MPI_DOUBLE, MPI_INT, mpi_local_stress_tensor_slave(), MPI_Reduce(), MPI_SUM, PTENSOR_TRACE, and this_node.
Referenced by tclcommand_analyze_parse_local_stress_tensor().
| void mpi_loop | ( | ) |
Process requests from master node.
Slave nodes main loop.
Definition at line 2878 of file communication.c.
References comm_cart, COMM_TRACE, errexit(), MPI_Barrier(), MPI_Bcast(), MPI_INT, N_CALLBACKS, slave_callbacks, and this_node.
Referenced by main().
| void mpi_place_new_particle | ( | int | node, |
| int | id, | ||
| double | pos[3] | ||
| ) |
Issue REQ_PLACE: create particle at a position on a node.
Also calls on_particle_change.
| id | the particle to create. |
| node | the node to attach it to. |
| pos | the particles position. |
Definition at line 437 of file communication.c.
References added_particle(), comm_cart, local_place_particle(), mpi_call(), MPI_DOUBLE, mpi_place_new_particle_slave(), MPI_Send(), on_particle_change(), SOME_TAG, and this_node.
Referenced by place_particle().
| void mpi_place_particle | ( | int | node, |
| int | id, | ||
| double | pos[3] | ||
| ) |
Issue REQ_PLACE: move particle to a position on a node.
Also calls on_particle_change.
| id | the particle to move. |
| node | the node to attach it to. |
| pos | the particles position. |
Definition at line 413 of file communication.c.
References comm_cart, local_place_particle(), mpi_call(), MPI_DOUBLE, mpi_place_particle_slave(), MPI_Send(), on_particle_change(), SOME_TAG, and this_node.
Referenced by place_particle().
| void mpi_random_seed | ( | int | cnt, |
| long * | seed | ||
| ) |
Issue REQ_RANDOM_SEED: read/set seed of random number generators on each node.
Definition at line 2028 of file communication.c.
References comm_cart, init_random_seed(), mpi_call(), MPI_Gather(), MPI_LONG, mpi_random_seed_slave(), MPI_Scatter(), print_random_seed(), RANDOM_TRACE, and this_node.
Referenced by tclcommand_t_random().
| void mpi_random_stat | ( | int | cnt, |
| RandomStatus * | stat | ||
| ) |
Issue REQ_RANDOM_STAT: read/set status of random number generators on each node.
Definition at line 2057 of file communication.c.
References comm_cart, RandomStatus::idum, init_random_stat(), RandomStatus::iy, MPI_BYTE, mpi_call(), MPI_Gather(), mpi_random_stat_slave(), MPI_Scatter(), print_random_stat(), RANDOM_TRACE, and this_node.
Referenced by tclcommand_t_random().
| void mpi_recv_fluid | ( | int | node, |
| int | index, | ||
| double * | rho, | ||
| double * | j, | ||
| double * | pi | ||
| ) |
Issue REQ_GET_FLUID: Receive a single lattice site from a processor.
| node | processor to send to |
| index | index of the lattice site |
| rho | local fluid density |
| j | local fluid velocity |
| pi | local fluid pressure |
Definition at line 2471 of file communication.c.
References comm_cart, lb_calc_local_fields(), mpi_call(), MPI_DOUBLE, MPI_Recv(), mpi_recv_fluid_slave(), MPI_STATUS_IGNORE, SOME_TAG, and this_node.
Referenced by lb_lbnode_get_pi_neq(), lb_lbnode_get_rho(), lb_lbnode_get_u(), lb_lbnode_set_rho(), and lb_lbnode_set_u().
| void mpi_recv_fluid_boundary_flag | ( | int | node, |
| int | index, | ||
| int * | boundary | ||
| ) |
Issue REQ_LB_GET_BOUNDARY_FLAG: Receive a single lattice sites boundary flag from a processor.
| node | processor to send to |
| index | index of the lattice site |
| boundary | local boundary flag |
Definition at line 2505 of file communication.c.
References comm_cart, lb_local_fields_get_boundary_flag(), mpi_call(), MPI_INT, MPI_Recv(), mpi_recv_fluid_boundary_flag_slave(), MPI_STATUS_IGNORE, SOME_TAG, and this_node.
Referenced by lb_lbnode_get_boundary().
| void mpi_recv_fluid_populations | ( | int | node, |
| int | index, | ||
| double * | pop | ||
| ) |
Issue REQ_RECV_FLUID_POPULATIONS: Send a single lattice site to a processor.
| node | processor to send to |
| index | index of the lattice site |
| pop | local fluid population |
Definition at line 2592 of file communication.c.
References comm_cart, lb_get_populations(), lbpar, mpi_call(), MPI_DOUBLE, MPI_Recv(), mpi_recv_fluid_populations_slave(), MPI_STATUS_IGNORE, LB_Parameters::resend_halo, SOME_TAG, and this_node.
Referenced by lb_lbnode_get_pop().
| void mpi_recv_part | ( | int | node, |
| int | part, | ||
| Particle * | part_data | ||
| ) |
Issue REQ_GET_PART: recv particle data.
The data has to be freed later using free_particle, otherwise the dynamically allocated parts, bonds and exclusions are left over.
| part | the particle. |
| node | the node it is attached to. |
| part_data | where to store the received data. |
Definition at line 1046 of file communication.c.
References alloc_intlist(), Particle::bl, comm_cart, IntList::e, Particle::el, local_particles, IntList::max, MPI_BYTE, mpi_call(), MPI_INT, MPI_Recv(), mpi_recv_part_slave(), MPI_STATUS_IGNORE, IntList::n, SOME_TAG, and this_node.
Referenced by get_particle_data().
| void mpi_remove_particle | ( | int | node, |
| int | id | ||
| ) |
Issue REQ_REM_PART: remove a particle.
Also calls on_particle_change.
| id | the particle to remove. |
| node | the node it is attached to. |
Definition at line 1113 of file communication.c.
References mpi_call(), and mpi_remove_particle_slave().
Referenced by remove_all_particles(), and remove_particle().
| void mpi_rescale_particles | ( | int | dir, |
| double | scale | ||
| ) |
Issue REQ_RESCALE_PART: rescales all particle positions in direction 'dir' by a factor 'scale'.
Definition at line 2211 of file communication.c.
References comm_cart, local_rescale_particles(), mpi_call(), MPI_DOUBLE, mpi_rescale_particles_slave(), MPI_Send(), n_nodes, on_particle_change(), SOME_TAG, and this_node.
Referenced by rescale_boxl().
| int mpi_send_bond | ( | int | pnode, |
| int | part, | ||
| int * | bond, | ||
| int | delete | ||
| ) |
Issue REQ_SET_BOND: send bond.
Also calls on_particle_change.
| pnode | node it is attached to. |
| part | identity of principal atom of the bond. |
| bond | field containing the bond type number and the identity of all bond partners (secundary atoms of the bond). |
| delete | if true, do not add the bond, rather delete it if found |
Definition at line 1000 of file communication.c.
References bonded_ia_params, comm_cart, local_change_bond(), mpi_call(), MPI_INT, MPI_Recv(), MPI_Send(), mpi_send_bond_slave(), MPI_STATUS_IGNORE, on_particle_change(), SOME_TAG, and this_node.
Referenced by change_particle_bond().
| void mpi_send_dip | ( | int | node, |
| int | part, | ||
| double | dip[3] | ||
| ) |
Issue REQ_SET_DIP: send particle dipole orientation.
Also calls on_particle_change.
| part | the particle. |
| node | the node it is attached to. |
| dip | its new dipole orientation. |
Definition at line 812 of file communication.c.
References comm_cart, convert_dip_to_quat(), convert_quat_to_quatu(), ParticlePosition::dip, ParticleProperties::dipm, local_particles, mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_send_dip_slave(), on_particle_change(), Particle::p, part, ParticlePosition::quat, ParticlePosition::quatu, Particle::r, SOME_TAG, and this_node.
Referenced by set_particle_dip().
| void mpi_send_dipm | ( | int | node, |
| int | part, | ||
| double | dipm | ||
| ) |
Issue REQ_SET_DIPM: send particle dipole moment.
Also calls on_particle_change.
| part | the particle. |
| node | the node it is attached to. |
| dipm | its new dipole moment (absolut value). |
Definition at line 858 of file communication.c.
References comm_cart, convert_quatu_to_dip(), ParticlePosition::dip, ParticleProperties::dipm, local_particles, mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_send_dipm_slave(), on_particle_change(), Particle::p, part, ParticlePosition::quatu, Particle::r, SOME_TAG, and this_node.
Referenced by set_particle_dipm().
| void mpi_send_exclusion | ( | int | part, |
| int | part2, | ||
| int | delete | ||
| ) |
Issue REQ_SET_EXCLUSION: send exclusions.
Also calls on_particle_change.
| part | identity of first particle of the exclusion. |
| part2 | identity of secnd particle of the exclusion. |
| delete | if true, do not add the exclusion, rather delete it if found |
Definition at line 2425 of file communication.c.
References comm_cart, local_change_exclusion(), MPI_Bcast(), mpi_call(), MPI_INT, mpi_send_exclusion_slave(), and on_particle_change().
Referenced by change_exclusion(), and remove_all_exclusions().
| void mpi_send_ext_force | ( | int | pnode, |
| int | part, | ||
| int | flag, | ||
| int | mask, | ||
| double | force[3] | ||
| ) |
Issue REQ_SEND_EXT_FORCE: send nex external flag and external force.
Definition at line 1872 of file communication.c.
References comm_cart, ParticleLocal::ext_flag, ParticleLocal::ext_force, Particle::l, local_particles, mpi_call(), MPI_DOUBLE, MPI_INT, MPI_Send(), mpi_send_ext_force_slave(), on_particle_change(), part, PARTICLE_EXT_FORCE, SOME_TAG, and this_node.
Referenced by set_particle_ext_force(), and set_particle_fix().
| void mpi_send_ext_torque | ( | int | pnode, |
| int | part, | ||
| int | flag, | ||
| int | mask, | ||
| double | torque[3] | ||
| ) |
Issue REQ_SEND_EXT_TORQUE: send nex external flag and external torque.
Definition at line 1821 of file communication.c.
References comm_cart, ParticleLocal::ext_flag, ParticleLocal::ext_torque, Particle::l, local_particles, mpi_call(), MPI_DOUBLE, MPI_INT, MPI_Send(), mpi_send_ext_torque_slave(), on_particle_change(), part, PARTICLE_EXT_TORQUE, SOME_TAG, and this_node.
Referenced by set_particle_ext_torque().
| void mpi_send_f | ( | int | node, |
| int | part, | ||
| double | F[3] | ||
| ) |
Issue REQ_SET_F: send particle force.
Also calls on_particle_change.
| part | the particle. |
| node | the node it is attached to. |
| F | its new force. |
Definition at line 492 of file communication.c.
References comm_cart, ParticleForce::f, Particle::f, local_particles, mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_send_f_slave(), on_particle_change(), part, SOME_TAG, and this_node.
Referenced by set_particle_f().
| void mpi_send_fluid | ( | int | node, |
| int | index, | ||
| double | rho, | ||
| double * | j, | ||
| double * | pi | ||
| ) |
Issue REQ_SEND_FLUID: Send a single lattice site to a processor.
| node | processor to send to |
| index | index of the lattice site |
| rho | local fluid density |
| j | local fluid velocity |
| pi | local fluid pressure |
Definition at line 2447 of file communication.c.
References comm_cart, lb_calc_n_equilibrium(), mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_send_fluid_slave(), SOME_TAG, and this_node.
Referenced by lb_lbnode_set_rho(), and lb_lbnode_set_u().
| void mpi_send_fluid_populations | ( | int | node, |
| int | index, | ||
| double * | pop | ||
| ) |
Issue REQ_SEND_FLUID_POPULATIONS: Send a single lattice site to a processor.
| node | processor to send to |
| index | index of the lattice site |
| pop | local fluid population |
Definition at line 2615 of file communication.c.
References comm_cart, lb_set_populations(), mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_send_fluid_populations_slave(), SOME_TAG, and this_node.
Referenced by lb_lbnode_set_pop().
| void mpi_send_mass | ( | int | node, |
| int | part, | ||
| double | mass | ||
| ) |
Issue REQ_SET_M: send particle mass.
Also calls on_particle_change.
| part | the particle. |
| node | the node it is attached to. |
| mass | its new mass. |
Definition at line 582 of file communication.c.
References comm_cart, local_particles, ParticleProperties::mass, mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_send_mass_slave(), on_particle_change(), Particle::p, part, SOME_TAG, and this_node.
Referenced by set_particle_mass().
| void mpi_send_mol_id | ( | int | node, |
| int | part, | ||
| int | mid | ||
| ) |
Issue REQ_SET_MOL_ID: send molecule id.
Also calls on_particle_change.
| part | the particle. |
| node | the node it is attached to. |
| mid | its new mol_id. |
Definition at line 673 of file communication.c.
References comm_cart, local_particles, ParticleProperties::mol_id, mpi_call(), MPI_INT, MPI_Send(), mpi_send_mol_id_slave(), on_particle_change(), Particle::p, part, SOME_TAG, and this_node.
Referenced by set_particle_mol_id().
| void mpi_send_mu_E | ( | int | node, |
| int | part, | ||
| double | mu_E[3] | ||
| ) |
Issue REQ_SET_MU_E: send particle electrophoretic mobility.
Also calls on_particle_change.
| part | the particle. |
| node | the node it is attached to. |
| mu_E | its new mobility. |
Definition at line 549 of file communication.c.
References comm_cart, local_particles, mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_send_mu_E_slave(), ParticleProperties::mu_E, on_particle_change(), Particle::p, part, SOME_TAG, and this_node.
Referenced by set_particle_mu_E().
| void mpi_send_omega | ( | int | node, |
| int | part, | ||
| double | omega[3] | ||
| ) |
Definition at line 743 of file communication.c.
References comm_cart, local_particles, Particle::m, mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_send_omega_slave(), ParticleMomentum::omega, on_particle_change(), part, SOME_TAG, and this_node.
Referenced by set_particle_omega_body(), and set_particle_omega_lab().
| void mpi_send_q | ( | int | node, |
| int | part, | ||
| double | q | ||
| ) |
Issue REQ_SET_Q: send particle charge.
Also calls on_particle_change.
| part | the particle. |
| node | the node it is attached to. |
| q | its new charge. |
Definition at line 518 of file communication.c.
References comm_cart, local_particles, mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_send_q_slave(), on_particle_change(), Particle::p, part, ParticleProperties::q, SOME_TAG, and this_node.
Referenced by set_particle_q().
| void mpi_send_quat | ( | int | node, |
| int | part, | ||
| double | quat[4] | ||
| ) |
Issue REQ_SET_QUAT: send particle orientation.
Also calls on_particle_change.
| part | the particle. |
| node | the node it is attached to. |
| quat | its new quaternions. |
Definition at line 700 of file communication.c.
References comm_cart, convert_quat_to_quatu(), convert_quatu_to_dip(), ParticlePosition::dip, ParticleProperties::dipm, local_particles, mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_send_quat_slave(), on_particle_change(), Particle::p, part, ParticlePosition::quat, ParticlePosition::quatu, Particle::r, SOME_TAG, and this_node.
Referenced by set_particle_quat().
| void mpi_send_rotation | ( | int | pnode, |
| int | part, | ||
| int | rot | ||
| ) |
Issue REQ_SET_ROTATION: send particle rotation flag Also calls on_particle_change.
| part | the particle. |
| pnode | the node it is attached to. |
| rot | the rotation flag |
Definition at line 966 of file communication.c.
References local_particles, mpi_call(), MPI_COMM_WORLD, MPI_INT, MPI_Send(), mpi_send_rotation_slave(), on_particle_change(), Particle::p, part, ParticleProperties::rotation, SOME_TAG, and this_node.
Referenced by set_particle_rotation().
| void mpi_send_rotational_inertia | ( | int | node, |
| int | part, | ||
| double | rinertia[3] | ||
| ) |
Issue REQ_SET_ROTATIONAL_INERTIA: send particle rotational inertia.
Also calls on_particle_change.
| part | the particle. |
| node | the node it is attached to. |
| rinertia | its new rotational inertia. |
Definition at line 614 of file communication.c.
References comm_cart, local_particles, mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_send_rotational_inertia_slave(), on_particle_change(), Particle::p, part, ParticleProperties::rinertia, SOME_TAG, and this_node.
Referenced by set_particle_rotational_inertia().
| void mpi_send_torque | ( | int | node, |
| int | part, | ||
| double | torque[3] | ||
| ) |
Issue REQ_SET_TORQUE: send particle torque.
Also calls on_particle_change.
| part | the particle. |
| node | the node it is attached to. |
| torque | its new torque. |
Definition at line 778 of file communication.c.
References comm_cart, Particle::f, local_particles, mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_send_torque_slave(), on_particle_change(), part, SOME_TAG, this_node, and ParticleForce::torque.
Referenced by set_particle_torque_body(), and set_particle_torque_lab().
| void mpi_send_type | ( | int | node, |
| int | part, | ||
| int | type | ||
| ) |
Issue REQ_SET_TYPE: send particle type.
Also calls on_particle_change.
| part | the particle. |
| node | the node it is attached to. |
| type | its new type. |
Definition at line 647 of file communication.c.
References comm_cart, local_particles, mpi_call(), MPI_INT, MPI_Send(), mpi_send_type_slave(), on_particle_change(), Particle::p, part, SOME_TAG, this_node, and ParticleProperties::type.
Referenced by set_particle_type().
| void mpi_send_v | ( | int | node, |
| int | part, | ||
| double | v[3] | ||
| ) |
Issue REQ_SET_V: send particle velocity.
Also calls on_particle_change.
| part | the particle. |
| node | the node it is attached to. |
| v | its new velocity. |
Definition at line 466 of file communication.c.
References comm_cart, local_particles, Particle::m, mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_send_v_slave(), on_particle_change(), part, SOME_TAG, this_node, and ParticleMomentum::v.
Referenced by set_particle_v().
| void mpi_send_virtual | ( | int | node, |
| int | part, | ||
| int | isVirtual | ||
| ) |
Issue REQ_SET_DIPM: send particle dipole moment.
Also calls on_particle_change.
| part | the particle. |
| node | the node it is attached to. |
| isVirtual | its new isVirtual. |
Definition at line 896 of file communication.c.
References comm_cart, ParticleProperties::isVirtual, local_particles, mpi_call(), MPI_INT, MPI_Send(), mpi_send_virtual_slave(), on_particle_change(), Particle::p, part, SOME_TAG, and this_node.
Referenced by set_particle_virtual().
| void mpi_send_vs_relative | ( | int | node, |
| int | part, | ||
| int | vs_relative_to, | ||
| double | vs_distance | ||
| ) |
Definition at line 928 of file communication.c.
References comm_cart, local_particles, mpi_call(), MPI_DOUBLE, MPI_INT, MPI_Send(), mpi_send_vs_relative_slave(), on_particle_change(), Particle::p, part, SOME_TAG, this_node, ParticleProperties::vs_relative_distance, and ParticleProperties::vs_relative_to_particle_id.
Referenced by set_particle_vs_relative().
| void mpi_set_particle_gamma | ( | int | pnode, |
| int | part, | ||
| double | gamma | ||
| ) |
Issue REQ_SEND_PARTICLE_T: send particle type specific frictional coefficient.
Definition at line 2692 of file communication.c.
References comm_cart, ParticleProperties::gamma, local_particles, mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_set_particle_gamma_slave(), on_particle_change(), Particle::p, part, SOME_TAG, and this_node.
Referenced by set_particle_gamma().
| void mpi_set_particle_temperature | ( | int | pnode, |
| int | part, | ||
| double | _T | ||
| ) |
Issue REQ_SEND_PARTICLE_T: send particle type specific temperature.
Definition at line 2658 of file communication.c.
References comm_cart, local_particles, mpi_call(), MPI_DOUBLE, MPI_Send(), mpi_set_particle_temperature_slave(), on_particle_change(), Particle::p, part, SOME_TAG, ParticleProperties::T, and this_node.
Referenced by set_particle_temperature().
| void mpi_set_time_step | ( | double | time_step | ) |
Issue REQ_SET_TIME_STEP: send new time_step and rescale the velocities accordingly.
Definition at line 1711 of file communication.c.
References comm_cart, FIELD_TIMESTEP, MPI_Bcast(), mpi_call(), MPI_DOUBLE, mpi_set_time_step_slave(), on_parameter_change(), rescale_velocities(), time_step, time_step_half, time_step_squared, and time_step_squared_half.
Referenced by tclcallback_time_step().
| void mpi_setup_reaction | ( | ) |
Issue REQ_CATALYTIC_REACTIONS: notify the system of changes to the reaction parameters.
Definition at line 2861 of file communication.c.
References local_setup_reaction(), mpi_call(), and mpi_setup_reaction_slave().
Referenced by tclcommand_reaction().
| void mpi_stop | ( | ) |
Issue REQ_TERM: stop Espresso, all slave nodes exit.
Definition at line 242 of file communication.c.
References comm_cart, MPI_Barrier(), mpi_call(), MPI_Finalize(), mpi_stop_slave(), and regular_exit.
Referenced by on_program_start().
| int mpi_sync_topo_part_info | ( | void | ) |
Issue REQ_SYNC_TOPO: Update the molecules ids to that they correspond to the topology.
Definition at line 2276 of file communication.c.
References comm_cart, i, IsTrapped, MPI_Bcast(), mpi_call(), MPI_DOUBLE, MPI_INT, mpi_sync_topo_part_info_slave(), IntList::n, n_molecules, Molecule::part, part, sync_topo_part_info(), topology, and Molecule::type.
Referenced by tclcommand_analyze_set_parse_topo_part_sync().
| void mpi_system_CMS | ( | ) |
Definition at line 2753 of file communication.c.
References galilei_struct::cms, comm_cart, gal, local_system_CMS(), MPI_ANY_SOURCE, mpi_call(), MPI_DOUBLE, MPI_Recv(), MPI_STATUS_IGNORE, mpi_system_CMS_slave(), n_nodes, SOME_TAG, and this_node.
Referenced by tclcommand_system_CMS().
| void mpi_system_CMS_velocity | ( | ) |
Definition at line 2794 of file communication.c.
References galilei_struct::cms_vel, comm_cart, gal, local_system_CMS_velocity(), MPI_ANY_SOURCE, mpi_call(), MPI_DOUBLE, MPI_Recv(), MPI_STATUS_IGNORE, mpi_system_CMS_velocity_slave(), n_nodes, SOME_TAG, and this_node.
Referenced by mpi_galilei_transform(), and tclcommand_system_CMS_velocity().
| void mpi_update_mol_ids | ( | void | ) |
Issue REQ_BCAST_LJANGLEFORCECAP: initialize LJANGLE force capping.
Issue REQ_UPDATE_MOL_IDS: Update the molecule ids so that they are in sync with the topology. Note that this only makes sense if you have a simple topology such that each particle can only belong to a single molecule
Definition at line 2264 of file communication.c.
References mpi_call(), and mpi_update_mol_ids_slave().
| void mpi_who_has | ( | ) |
Issue REQ_WHO_HAS: ask nodes for their attached particles.
Definition at line 304 of file communication.c.
References CellPList::cell, cells_get_n_particles(), comm_cart, COMM_TRACE, free, i, ParticleProperties::identity, local_cells, malloc, max_seen_particle, mpi_call(), MPI_Gather(), MPI_INT, MPI_Recv(), MPI_STATUS_IGNORE, mpi_who_has_slave(), CellPList::n, ParticleList::n, n_nodes, Particle::p, ParticleList::part, particle_node, realloc, SOME_TAG, and this_node.
Referenced by build_particle_node().
Definition at line 68 of file communication.c.
Referenced by announce_resort_particles(), bcast_iccp3m_cfg(), calc_kinetic(), calc_mu_max(), calc_node_neighbors(), calc_surface_term(), check_particles(), check_runtime_errors(), common_bcast_parameter(), correct_pos_shake(), correct_vel_shake(), dd_exchange_and_sort_particles(), dd_topology_init(), dfft_back_grid_comm(), dfft_forw_grid_comm(), distribute(), dp3m_average_dipolar_self_energy(), dp3m_calc_kspace_forces(), dp3m_calc_send_mesh(), dp3m_count_magnetic_particles(), dp3m_gather_fft_grid(), dp3m_spread_force_grid(), ELC_P3M_modify_p3m_sums_both(), ELC_P3M_modify_p3m_sums_image(), ELC_P3M_restore_p3m_sums(), energy_calc(), fft_back_grid_comm(), fft_forw_grid_comm(), fft_print_global_fft_mesh(), finalize_p_inst_npt(), gather_image_contributions(), get_DLC_dipolar(), get_DLC_energy_dipolar(), ghost_communicator(), grid_changed_n_nodes(), halo_communication(), halo_push_communication(), iccp3m_iteration(), integrate_vv(), layered_exchange_and_sort_particles(), layered_prepare_comm(), layered_topology_init(), lb_calc_average_rho(), lb_calc_densprof(), lb_calc_fluid_mass(), lb_calc_fluid_momentum(), lb_calc_fluid_temp(), lb_calc_velprof(), lb_check_halo_regions(), lb_collect_boundary_forces(), local_setup_reaction(), maggs_calc_init_e_field(), maggs_check_curl_E(), maggs_compute_dipole_correction(), maggs_count_charged_particles(), maggs_electric_energy(), maggs_exchange_surface_patch(), map_array_node(), map_node_array(), mpi_bcast_constraint(), mpi_bcast_constraint_slave(), mpi_bcast_coulomb_params_slave(), mpi_bcast_ia_params(), mpi_bcast_ia_params_slave(), mpi_bcast_lb_params_slave(), mpi_bcast_lbboundary(), mpi_bcast_lbboundary_slave(), mpi_bcast_nptiso_geom_slave(), mpi_bcast_tf_params(), mpi_bcast_tf_params_slave(), mpi_bit_random_seed(), mpi_bit_random_seed_slave(), mpi_bit_random_stat(), mpi_bit_random_stat_slave(), mpi_call(), mpi_cap_forces_slave(), mpi_comm_mol_info(), mpi_comm_mol_info_slave(), mpi_galilei_transform(), mpi_galilei_transform_slave(), mpi_gather_runtime_errors(), mpi_gather_runtime_errors_slave(), mpi_get_constraint_force(), mpi_get_constraint_force_slave(), mpi_get_particles(), mpi_get_particles_lb(), mpi_get_particles_slave(), mpi_get_particles_slave_lb(), mpi_init(), mpi_local_stress_tensor(), mpi_local_stress_tensor_slave(), mpi_loop(), mpi_place_new_particle(), mpi_place_new_particle_slave(), mpi_place_particle(), mpi_place_particle_slave(), mpi_random_seed(), mpi_random_seed_slave(), mpi_random_stat(), mpi_random_stat_slave(), mpi_recv_fluid(), mpi_recv_fluid_boundary_flag(), mpi_recv_fluid_boundary_flag_slave(), mpi_recv_fluid_populations(), mpi_recv_fluid_populations_slave(), mpi_recv_fluid_slave(), mpi_recv_part(), mpi_recv_part_slave(), mpi_rescale_particles(), mpi_rescale_particles_slave(), mpi_send_bond(), mpi_send_bond_slave(), mpi_send_dip(), mpi_send_dip_slave(), mpi_send_dipm(), mpi_send_dipm_slave(), mpi_send_exclusion(), mpi_send_exclusion_slave(), mpi_send_ext_force(), mpi_send_ext_force_slave(), mpi_send_ext_torque(), mpi_send_ext_torque_slave(), mpi_send_f(), mpi_send_f_slave(), mpi_send_fluid(), mpi_send_fluid_populations(), mpi_send_fluid_populations_slave(), mpi_send_fluid_slave(), mpi_send_forces_lb(), mpi_send_forces_slave_lb(), mpi_send_mass(), mpi_send_mass_slave(), mpi_send_mol_id(), mpi_send_mol_id_slave(), mpi_send_mu_E(), mpi_send_mu_E_slave(), mpi_send_omega(), mpi_send_omega_slave(), mpi_send_q(), mpi_send_q_slave(), mpi_send_quat(), mpi_send_quat_slave(), mpi_send_rotational_inertia(), mpi_send_rotational_inertia_slave(), mpi_send_torque(), mpi_send_torque_slave(), mpi_send_type(), mpi_send_type_slave(), mpi_send_v(), mpi_send_v_slave(), mpi_send_virtual(), mpi_send_virtual_slave(), mpi_send_vs_relative(), mpi_send_vs_relative_slave(), mpi_set_particle_gamma(), mpi_set_particle_gamma_slave(), mpi_set_particle_temperature(), mpi_set_particle_temperature_slave(), mpi_set_time_step(), mpi_set_time_step_slave(), mpi_stop(), mpi_stop_slave(), mpi_sync_topo_part_info(), mpi_sync_topo_part_info_slave(), mpi_system_CMS(), mpi_system_CMS_slave(), mpi_system_CMS_velocity(), mpi_system_CMS_velocity_slave(), mpi_who_has(), mpi_who_has_slave(), nsq_balance_particles(), nsq_prepare_comm(), p3m_calc_dipole_term(), p3m_calc_kspace_forces(), p3m_calc_kspace_stress(), p3m_calc_send_mesh(), p3m_count_charged_particles(), p3m_gather_fft_grid(), p3m_spread_force_grid(), predict_momentum_particles(), pressure_calc(), propagate_press_box_pos_and_rescale_npt(), recv_particles(), send_particles(), and slab_dip_count_mu().
| int n_nodes |
The total number of nodes.
Definition at line 67 of file communication.c.
Referenced by build_verlet_lists(), build_verlet_lists_and_calc_verlet_ia(), build_verlet_lists_and_calc_verlet_ia_iccp3m(), clear_image_contributions(), collision_detection_set_params(), comfixed_set_params(), comforce_set_params(), dawaanr_calculations(), dawaanr_set_params(), dd_exchange_and_sort_particles(), dfft_init(), distribute(), dp3m_init(), fft_common_pre_init(), fft_init(), fft_print_global_fft_mesh(), gather_image_contributions(), gather_runtime_errors(), layered_exchange_and_sort_particles(), layered_prepare_comm(), layered_topology_init(), lb_calc_fluid_temp(), lb_check_halo_regions(), maggs_calc_init_e_field(), magnetic_dipolar_direct_sum_calculations(), mdds_set_params(), meta_init(), MMM2D_dielectric_layers_energy_contribution(), MMM2D_dielectric_layers_force_contribution(), MMM2D_init(), MMM2D_set_params(), mpi_comm_mol_info(), mpi_gather_runtime_errors(), mpi_get_particles(), mpi_get_particles_lb(), mpi_init(), mpi_rescale_particles(), mpi_send_forces_lb(), mpi_system_CMS(), mpi_system_CMS_velocity(), mpi_who_has(), nemd_init(), nsq_balance_particles(), nsq_prepare_comm(), nsq_topology_init(), setup_P(), setup_PQ(), setup_Q(), setup_z_energy(), setup_z_force(), tclcallback_node_grid(), tclcommand_analyze_parse_aggregation(), tclcommand_bit_random(), tclcommand_cellsystem(), and tclcommand_t_random().
| int this_node |
The number of this node.
Definition at line 66 of file communication.c.
1.7.5.1