next up previous
Up: The Panda 4.0 Interface Document Previous: Utility functions

Subsections

   
Communication utility functions

#ifndef __PAN_COMM_UTIL_H__
#define __PAN_COMM_UTIL_H__

#include "pan_sys.h"

Utility functions that depend on the communication subsystem.

void pan_comm_util_init(int *argc, char *argv[]);
void pan_comm_util_end(void);

Initialise or exit this module.


Clock synchronization

int         pan_clock_sync(int n_syncs, pan_time_p shift, pan_time_p std);

Global synchronization. All processes must call this function at the same time.

void        pan_clock_set_timeout(pan_time_p timeout, pan_time_p uc_delay);
void        pan_clock_get_timeout(pan_time_p timeout, pan_time_p uc_delay);
int         pan_clock_get_shift(pan_time_p timeout, pan_time_p d_timeout);

Handles for operation/enquiry.


Barrier

Barrier that is implemented on top of the Panda interface modules.

int     pan_barrier_create(int n_partners);
void    pan_barrier_clear(int b);

void    pan_barrier_sync(int b);

Synchronize all threads that have called pan_barrier_sync(b). Only one thread per process can call pan_barrier_sync(). The calling thread is blocked, other threads in the same process may continue.

void    pan_barrier(void);

Synchronize using the predefined barrier, which is initialised to n_partners = pan_nr_processes(). Typically used to synchronize all processes in a Panda run.


Statistics reset/print

Reset/print the statistics of the following modules:

1.
pan_system
2.
pan_mp
3.
pan_rpc
4.
pan_group
5.
pan_barrier
These are collective operations. Each processor that wants to reset/print its statistics must call pan_stats_(print_)reset().

void pan_stats_print_reset(void);

Atomically print and reset statistics

void pan_stats_reset(void);

Reset statistics

#endif


next up previous
Up: The Panda 4.0 Interface Document Previous: Utility functions
Rutger Hofman
2003-11-06