sopalin_thread.h

Structures, function declarations and macros used for thread management.

Summary
sopalin_thread.hStructures, function declarations and macros used for thread management.
sopthread_dataStructure conotaining the thread number and a pointer to data given to thread in parameters.
Variables
meThread number
dataData given to thread as argument
sopalin_launch_threadLaunch all PaStiX threads on wanted functions.
sopalin_launch_commLaunch communication threads
sopalin_bindthreadBind threads onto processors.
sopthread_barrierComputing threads synchronisation barrier.
Variables
instanceID of the barrier
blocked_threadsNumber of threads in the barrier
sync_lockmutex for the barrier
sync_condcond for the barrier
Macros
SYNCHRO_X_THREADSynchronize nbthread threads.

sopthread_data

Structure conotaining the thread number and a pointer to data given to thread in parameters.

Summary
Variables
meThread number
dataData given to thread as argument

Variables

me

int me

Thread number

data

sopthread_data_t

Data given to thread as argument

sopalin_launch_thread

void sopalin_launch_thread(INT procnum,
INT procnbr,
void *ptr,
INT calc_thrdnbr,
void *(*calc_routine)(void *),
void *calc_data,
INT comm_thrdnbr,
void *(*comm_routine)(void *),
void *comm_data,
INT ooc_thrdnbr,
void * (*ooc_routine) (void *),
void *ooc_data)

Launch all PaStiX threads on wanted functions.

Parameters

procnumMPI process rank
procnbrNumber of MPI process
ptrPointer the the bubble structure to use (if MARCEL version)
calc_thrdnbrNumber of computing threads.
calc_routineComputing function.
calc_dataParameters for computing function.
comm_thrdnbrNumber of communicating threads.
comm_routinecommunication function.
comm_dataParameters for communication function.
ooc_thrdnbrNumber of out-of-core threads.
ooc_routineOut-of-core function.
ooc_dataParameters for ooc_routine.

sopalin_launch_comm

void sopalin_launch_comm(int nbthrdcomm,
void *(*comm_routine)(void *),
void *data)

Launch communication threads

Parameters nbthrdcomm - Number of threads to launch. comm_routine - Communication function. data - Data for communication function.

sopalin_bindthread

INT sopalin_bindthread(INT)

Bind threads onto processors.

Parameters

cpuProcessor to bind to.

sopthread_barrier

Computing threads synchronisation barrier.

Summary
Variables
instanceID of the barrier
blocked_threadsNumber of threads in the barrier
sync_lockmutex for the barrier
sync_condcond for the barrier
Macros
SYNCHRO_X_THREADSynchronize nbthread threads.

Variables

instance

ID of the barrier

blocked_threads

Number of threads in the barrier

sync_lock

pthread_mutex_t sync_lock

mutex for the barrier

sync_cond

pthread_cond_t sync_cond

cond for the barrier

Macros

SYNCHRO_X_THREAD

Synchronize nbthread threads.

Parameters

nbthreadNumber of threads to synchronize.
barriersopthread_barrier structure associated with the synchronisation.
int me
Thread number
sopthread_data_t
Data given to thread as argument
void sopalin_launch_thread(INT procnum,
INT procnbr,
void *ptr,
INT calc_thrdnbr,
void *(*calc_routine)(void *),
void *calc_data,
INT comm_thrdnbr,
void *(*comm_routine)(void *),
void *comm_data,
INT ooc_thrdnbr,
void * (*ooc_routine) (void *),
void *ooc_data)
Launch all PaStiX threads on wanted functions.
void sopalin_launch_comm(int nbthrdcomm,
void *(*comm_routine)(void *),
void *data)
Launch communication threads
INT sopalin_bindthread(INT)
Bind threads onto processors.
pthread_mutex_t sync_lock
mutex for the barrier
pthread_cond_t sync_cond
cond for the barrier
Close