10#ifndef COLVARPROXY_REPLICAS_H
11#define COLVARPROXY_REPLICAS_H
16typedef MPI_Comm replicas_mpi_comm_t;
18typedef void * replicas_mpi_comm_t;
Methods for multiple-replica communication.
Definition: colvarproxy_replicas.h:23
virtual void replica_comm_barrier()
Synchronize replica with others.
Definition: colvarproxy_replicas.cpp:65
virtual void set_replicas_mpi_communicator(replicas_mpi_comm_t comm)
Set the multiple replicas communicator.
Definition: colvarproxy_replicas.cpp:26
colvarproxy_replicas()
Constructor.
Definition: colvarproxy_replicas.cpp:15
int replicas_mpi_rank
Index (rank) of this replica in the MPI implementation.
Definition: colvarproxy_replicas.h:60
virtual int replica_comm_recv(char *msg_data, int buf_len, int src_rep)
Receive data from other replica.
Definition: colvarproxy_replicas.cpp:73
virtual ~colvarproxy_replicas()
Destructor.
Definition: colvarproxy_replicas.cpp:23
replicas_mpi_comm_t replicas_mpi_comm
MPI communicator containint 1 root proc from each world.
Definition: colvarproxy_replicas.h:57
virtual int replica_comm_send(char *msg_data, int msg_len, int dest_rep)
Send data to other replica.
Definition: colvarproxy_replicas.cpp:93
virtual int num_replicas()
Total number of replicas.
Definition: colvarproxy_replicas.cpp:59
virtual int check_replicas_enabled()
Indicate if multi-replica support is available and active.
Definition: colvarproxy_replicas.cpp:40
virtual int replica_index()
Index of this replica.
Definition: colvarproxy_replicas.cpp:53
int replicas_mpi_num
Number of replicas in the MPI implementation.
Definition: colvarproxy_replicas.h:63