|
MulticoreBSP for C
Version 2.0.4
|
Initialisation struct. More...
#include <mcbsp.h>

Data Fields | |
| size_t | P |
| Number of processors involved in this run. More... | |
| size_t | sync_entry_counter |
| Barrier counter for this BSP execution. More... | |
| size_t | sync_exit_counter |
| Barrier counter for this BSP program. More... | |
| size_t | tagSize |
| Currently active tag size. More... | |
| size_t | top_pid |
| ID of the top-level run, if available. More... | |
| size_t | cp_f |
| Currently active checkpointing frequency. More... | |
| size_t | safe_cp_f |
| Currently active safe checkpointing frequency. More... | |
| size_t | skipped_checkpoints |
| Current number of skipped checkpoints. More... | |
| size_t | current_superstep |
| Current superstep of the SPMD program. More... | |
| pthread_t * | threads |
| Threads corresponding to this BSP program. More... | |
| struct mcbsp_thread_data ** | threadData |
| Pointers to all thread-local data, as needed for communication. More... | |
| unsigned char * | sl_condition |
| Condition used for critical sections. More... | |
| unsigned char * | sl_mid_condition |
| Condition used for critical sections. More... | |
| unsigned char * | sl_end_condition |
| Condition used for critical section. More... | |
| struct mcbsp_thread_data * | prev_data |
| Stores any previous thread-local data. More... | |
| void(* | spmd )(void) |
| User-definied SPMD entry-point. More... | |
| void * | bsp_program |
| In case of a call from the C++ wrapper, pointer to the user-defined BSP_program. More... | |
| char ** | argv |
| Passed argv from bsp_init. More... | |
| struct mcbsp_util_address_table | global2local |
| Address table used for inter-thread communication. More... | |
| pthread_mutex_t | mutex |
| Mutex used for critical sections (such as synchronisation). More... | |
| pthread_cond_t | condition |
| Condition used for critical sections. More... | |
| pthread_cond_t | mid_condition |
| Condition used for critical sections. More... | |
| pthread_cond_t | end_condition |
| Condition used for critical sections. More... | |
| int | argc |
| Passed argc from bsp_init. More... | |
| volatile bool | abort |
| Whether the BSP program should be aborted. More... | |
| bool | ended |
| Whether the BSP program has ended. More... | |
| bool | no_cp |
| Whether checkpointing has been explicitly disallowed. More... | |
| bool | safe_cp |
| Whether hardware failures were detected, or were detected to be imminent. More... | |
Initialisation struct.
Contains information necessary to start an SPMD section, and contains fields necessary for global actions during the corresponding SPMD section.
Can be stored at two locations: 1: at the initialising thread of an SPMD section, when the SPMD section has not yet been started; 2: as a pointer through thread-local data once the SPMD section has started.
The field ordering of the struct are that alignable fields are placed first (pointers, size_ts), followed by arbitrary structs / typedef (unpredictable size), and finally smaller-sized fields (ints, bools). Within levels, the ordering is semantic (arbitrary).
| volatile bool mcbsp_init_data::abort |
Whether the BSP program should be aborted.
| int mcbsp_init_data::argc |
Passed argc from bsp_init.
| char** mcbsp_init_data::argv |
Passed argv from bsp_init.
| void* mcbsp_init_data::bsp_program |
In case of a call from the C++ wrapper, pointer to the user-defined BSP_program.
| pthread_cond_t mcbsp_init_data::condition |
Condition used for critical sections.
This is the default POSIX threads synchronisation mechanism, which may not be used in case compilitaion opted for alternative mechanisms (e.g., spinlocking via MCBSP_USE_SPINLOCK). This field is always included for binary compatibility, however!
| size_t mcbsp_init_data::cp_f |
Currently active checkpointing frequency.
| size_t mcbsp_init_data::current_superstep |
Current superstep of the SPMD program.
| pthread_cond_t mcbsp_init_data::end_condition |
Condition used for critical sections.
See also condition and mid_condition.
| bool mcbsp_init_data::ended |
Whether the BSP program has ended.
| struct mcbsp_util_address_table mcbsp_init_data::global2local |
Address table used for inter-thread communication.
| pthread_cond_t mcbsp_init_data::mid_condition |
Condition used for critical sections.
This is the default POSIX threads synchronisation mechanism, which may not be used in case compilitaion opted for alternative mechanisms (e.g., spinlocking via MCBSP_USE_SPINLOCK). This field is always included for binary compatibility, however!
| pthread_mutex_t mcbsp_init_data::mutex |
Mutex used for critical sections (such as synchronisation).
| bool mcbsp_init_data::no_cp |
Whether checkpointing has been explicitly disallowed.
| size_t mcbsp_init_data::P |
Number of processors involved in this run.
| struct mcbsp_thread_data* mcbsp_init_data::prev_data |
Stores any previous thread-local data.
Used for nested runs.
| bool mcbsp_init_data::safe_cp |
Whether hardware failures were detected, or were detected to be imminent.
| size_t mcbsp_init_data::safe_cp_f |
Currently active safe checkpointing frequency.
| size_t mcbsp_init_data::skipped_checkpoints |
Current number of skipped checkpoints.
I.e., when doing automatic checkpointing, we checkpoint whenever skipped_checkpoints == cp_f in normal automatic checkpointing mode (if cp_f > 0, and no checkpointing otherwise), or whenever skipped_checkpoints == safe_cp_f when in safe checkpointing mode (i.e., in the case of imminent hardware failures).
| unsigned char* mcbsp_init_data::sl_condition |
Condition used for critical sections.
Only used if compiled with MCBSP_USE_SPINLOCK, but always included for binary compatibility!
| unsigned char* mcbsp_init_data::sl_end_condition |
Condition used for critical section.
See also sl_condition and sl_mid_condition.
| unsigned char* mcbsp_init_data::sl_mid_condition |
Condition used for critical sections.
Only used if compiled with MCBSP_USE_SPINLOCK, but always included for binary compatibility!
| void(* mcbsp_init_data::spmd)(void) |
User-definied SPMD entry-point.
| size_t mcbsp_init_data::sync_entry_counter |
Barrier counter for this BSP execution.
Synchronises synchronisation entry.
| size_t mcbsp_init_data::sync_exit_counter |
Barrier counter for this BSP program.
Synchronises synchronisation exit.
| size_t mcbsp_init_data::tagSize |
Currently active tag size.
| struct mcbsp_thread_data* * mcbsp_init_data::threadData |
Pointers to all thread-local data, as needed for communication.
| pthread_t* mcbsp_init_data::threads |
Threads corresponding to this BSP program.
| size_t mcbsp_init_data::top_pid |
ID of the top-level run, if available.
This value is SIZE_MAX if this is the top-level run. This value is kept separate from prev_data as the top-level run need not be a MulticoreBSP for C run (we may have been offloaded or called recursively from a distributed-memory SPMD setting, both of which may not even have anything to do with BSP).
1.8.5