ooc.c

Out Of core option for PaStiX

author: Xavier Lacoste date: April 2008

Summary
ooc.cOut Of core option for PaStiX
Out-Of-core structures
ooc_count_Structure containing a volatile integer, used for access count in ooc.
Variables
countvolatile int to store shared counter
ooc_thread_ooc structure for each ooc thread
Variables
time_reading
time_writting
ooc_ooc structure
Variables
idid for saving files
stopindicated when the thread should die
threadnbrooc thrdnbr
allocatedOOC allocated memory
mutex_cblkMutex for each cblk
cond_cblkCond for each cblk
max_cblk_sizeMax size of a cblk
tasktabOrdered task tabular
queuequeue of cblk to free
mutex_queuemutex on the queue of cblk to free
cond_queuecon for the queue of cblk to free
toloadQueue of block column not taken into account in loops
mutex_toloadmutex on the queue of cblk to load
cond_toloadcond on the queue of cblk to load
frozenUsed to stop loadings temporatly
mutex_frozenMutex on frozen
cond_frozenCond on frozen
current_stepCurrent computing step for computing threads
current_itercomp
current_taskooc
mutex_current_task
cond_current_task
current_iterooc
threads_waitingNumber of thread waiting for queue to be fill-in
mutex_thrd_wtingmutex corresponding to threads_waiting
blocks_waited_forBlocks computing threads are waiting for
lastloadedLast block loaded
threads_receivingNumber of thread waiting for a contribution
mutex_thrd_rcvingmutex corresponding to threads_receiving
mutex_stepmutex on the current_step variable
cond_stepcond for the current_step variable
cblkloadedNumber of blocks loaded
ftgtloadedNumber of blocks loaded
mutex_allocatedmutex on allocation
fanin_ctrbcntOrdered task tabular
coeftabsizesize of the coeftab
time_waitingtime spent waiting for a block
openednumber of file opened
opened_mutexmutex on opened
Global
Out-Of-core functions
ooc_init_thread
ooc_clock_get
ooc_do_save_coef
ooc_do_load_coef
ooc_allocate
ooc_do_load_ftgt
ooc_remove_ftgt
ooc_allocate_ftgt
ooc_do_save_ftgt
reduceMem
cblkNextAccess
cblkAndContribSize
updo_init_mem
updo_init_smp_mem
sopalin_init_smp_mem
raff_mem
recursive_mkdir
ooc_prefetchPrefetch one column bloc
ooc_prefetch_ftgtPrefetch one column fanin target buffer
ooc_coefMatrixInitFollows the CoefMatrix_Init algorithm to prefetch column blocks in correct order.
ooc_sopalinFollows the sopalin_smp algorithm to prefetch column blocks and fanin target buffers in correct order
ooc_updoFollows the up_down_smp algorithm to prefetch column blocks and fanin target buffers in correct order
ooc_threadooc thread main routine.
ooc_initinit ooc structure
ooc_exitclean ooc structure
ooc_init_threadinit ooc thread structure
ooc_save_coefHad column block to the save queue.
ooc_do_save_coefSave one block column on disk.
ooc_save_ftgtHad fanin target buffer to the save queue.
ooc_remove_ftgtDelete fanin target buffer from disk.
ooc_reset_ftgtSet all fanin target buffer to 0 or delete it from disk.
ooc_do_save_ftgtSave one fanin target buffer on disk.
ooc_do_load_ftgtAllocate fanin target buffer and read it from disk if it exists.
ooc_wait_for_ftgtCheck if fanin target buffer is NULL.
ooc_allocate_ftgtAllocate fanin target buffer.
ooc_do_load_coefAllocate block column and read it from disk if it exists.
ooc_allocateAllocate column block.
ooc_wait_for_cblkCheck if column block is NULL.
ooc_stop_threadStops all ooc thread.
cblkNextAccessCompute the number of the next access to a column block or fanin target.
reduceMemSave some column block or fanin target buffers until more than size_wanted memory is available.
ooc_clock_getAdds time in Clock clk to the total time waiting for OOC to load data.
recursive_mkdirCreate directory and subdirectory indicated by path
ooc_hack_loadAdd a bloc column to priority load queue.
ooc_set_step
ooc_freeze
ooc_defreeze
ooc_receiving
ooc_received
ooc_wait_task

Out-Of-core structures

ooc_count_

Structure containing a volatile integer, used for access count in ooc.

Summary
Variables
countvolatile int to store shared counter

Variables

count

volatile int to store shared counter

ooc_thread_

ooc structure for each ooc thread

Variables

time_reading

double time_reading

time_writting

double time_writting

ooc_

ooc structure

Summary
Variables
idid for saving files
stopindicated when the thread should die
threadnbrooc thrdnbr
allocatedOOC allocated memory
mutex_cblkMutex for each cblk
cond_cblkCond for each cblk
max_cblk_sizeMax size of a cblk
tasktabOrdered task tabular
queuequeue of cblk to free
mutex_queuemutex on the queue of cblk to free
cond_queuecon for the queue of cblk to free
toloadQueue of block column not taken into account in loops
mutex_toloadmutex on the queue of cblk to load
cond_toloadcond on the queue of cblk to load
frozenUsed to stop loadings temporatly
mutex_frozenMutex on frozen
cond_frozenCond on frozen
current_stepCurrent computing step for computing threads
current_itercomp
current_taskooc
mutex_current_task
cond_current_task
current_iterooc
threads_waitingNumber of thread waiting for queue to be fill-in
mutex_thrd_wtingmutex corresponding to threads_waiting
blocks_waited_forBlocks computing threads are waiting for
lastloadedLast block loaded
threads_receivingNumber of thread waiting for a contribution
mutex_thrd_rcvingmutex corresponding to threads_receiving
mutex_stepmutex on the current_step variable
cond_stepcond for the current_step variable
cblkloadedNumber of blocks loaded
ftgtloadedNumber of blocks loaded
mutex_allocatedmutex on allocation
fanin_ctrbcntOrdered task tabular
coeftabsizesize of the coeftab
time_waitingtime spent waiting for a block
openednumber of file opened
opened_mutexmutex on opened

Variables

id

INT id

id for saving files

stop

int stop

indicated when the thread should die

threadnbr

int threadnbr

ooc thrdnbr

allocated

INT allocated

OOC allocated memory

mutex_cblk

Mutex for each cblk

cond_cblk

Cond for each cblk

max_cblk_size

int max_cblk_size

Max size of a cblk

tasktab

Ordered task tabular

queue

Queue queue

queue of cblk to free

mutex_queue

pthread_mutex_t mutex_queue

mutex on the queue of cblk to free

cond_queue

pthread_cond_t cond_queue

con for the queue of cblk to free

toload

Queue toload

Queue of block column not taken into account in loops

mutex_toload

pthread_mutex_t mutex_toload

mutex on the queue of cblk to load

cond_toload

pthread_cond_t cond_toload

cond on the queue of cblk to load

frozen

INT frozen

Used to stop loadings temporatly

mutex_frozen

pthread_mutex_t mutex_frozen

Mutex on frozen

cond_frozen

pthread_cond_t cond_frozen

Cond on frozen

current_step

int current_step

Current computing step for computing threads

current_itercomp

int current_itercomp

current_taskooc

int current_taskooc

mutex_current_task

pthread_mutex_t mutex_current_task

cond_current_task

pthread_cond_t cond_current_task

current_iterooc

int current_iterooc

threads_waiting

volatile int threads_waiting

Number of thread waiting for queue to be fill-in

mutex_thrd_wting

pthread_mutex_t mutex_thrd_wting

mutex corresponding to threads_waiting

blocks_waited_for

Blocks computing threads are waiting for

lastloaded

INT lastloaded

Last block loaded

threads_receiving

int threads_receiving

Number of thread waiting for a contribution

mutex_thrd_rcving

pthread_mutex_t mutex_thrd_rcving

mutex corresponding to threads_receiving

mutex_step

pthread_mutex_t mutex_step

mutex on the current_step variable

cond_step

pthread_cond_t cond_step

cond for the current_step variable

cblkloaded

INT cblkloaded

Number of blocks loaded

ftgtloaded

INT ftgtloaded

Number of blocks loaded

mutex_allocated

pthread_mutex_t mutex_allocated

mutex on allocation

fanin_ctrbcnt

Ordered task tabular

coeftabsize

INT coeftabsize

size of the coeftab

time_waiting

time spent waiting for a block

opened

int opened

number of file opened

opened_mutex

pthread_mutex_t opened_mutex

mutex on opened

Global

Out-Of-core functions

ooc_init_thread

int ooc_init_thread (Sopalin_Data_t *sopalin_data,
int threadnum)

ooc_clock_get

int ooc_clock_get (Sopalin_Data_t *sopalin_data,
Clock *clk,
int computing_thread)

ooc_do_save_coef

int ooc_do_save_coef (Sopalin_Data_t *sopalin_data,
INT cblknum,
int me)

ooc_do_load_coef

int ooc_do_load_coef (Sopalin_Data_t *sopalin_data,
INT cblknum,
int me)

ooc_allocate

int ooc_allocate (Sopalin_Data_t *sopalin_data,
INT cblknum,
int me)

ooc_do_load_ftgt

int ooc_do_load_ftgt (Sopalin_Data_t *sopalin_data,
INT ftgtnum,
int me)

ooc_remove_ftgt

int ooc_remove_ftgt (Sopalin_Data_t *sopalin_data,
INT ftgtnum,
int me)

ooc_allocate_ftgt

int ooc_allocate_ftgt (Sopalin_Data_t *sopalin_data,
INT ftgtnum,
int me)

ooc_do_save_ftgt

int ooc_do_save_ftgt (Sopalin_Data_t *sopalin_data,
INT indbloc,
int me)

reduceMem

void reduceMem (Sopalin_Data_t *sopalin_data,
INT size_wanted,
int me)

cblkNextAccess

void cblkNextAccess (Sopalin_Data_t *sopalin_data,
INT tasknum,
INT cblknum,
int computing_thread,
INT *key1,
INT *key2)

cblkAndContribSize

INT cblkAndContribSize (Sopalin_Data_t *sopalin_data,
INT task)

updo_init_mem

INT updo_init_mem (Sopalin_Data_t *sopalin_data)

updo_init_smp_mem

INT updo_init_smp_mem (Sopalin_Data_t *sopalin_data)

sopalin_init_smp_mem

INT sopalin_init_smp_mem(Sopalin_Data_t *sopalin_data)

raff_mem

INT raff_mem (Sopalin_Data_t *sopalin_data)

recursive_mkdir

int recursive_mkdir (char *path,
mode_t mode)

ooc_prefetch

int ooc_prefetch(Sopalin_Data_t *sopalin_data,
INT cblknum,
int me,
int priority)

Prefetch one column bloc

Parameters

sopalin_datasopalin_data structure (common data)
cblknumcolumn block number
meooc thread number (should be on as only one is possible)
prioritypriority of the load (HIGH or LOW)

Returns

EXIT_SUCCESSif the bloc has been successfully loaded
EXIT_SUCCESSif factorisation and/or solve is finished (depending of what is asked)
Exit programif load wasn’t succesfull.

ooc_prefetch_ftgt

int ooc_prefetch_ftgt(Sopalin_Data_t *sopalin_data,
INT ftgtnum,
int me,
int priority)

Prefetch one column fanin target buffer

Parameters

sopalin_datasopalin_data structure (common data)
ftgtnumfanin target block number
meooc thread number (should be on as only one is possible)

Returns

EXIT_SUCCESSif the bloc has been successfully loaded
EXIT_SUCCESSif factorisation and/or solve is finished (depending of what is asked)
Exit programif load wasn’t succesfull.

ooc_coefMatrixInit

int ooc_coefMatrixInit(Sopalin_Data_t *sopalin_data,
int ooc_threadnum)

Follows the CoefMatrix_Init algorithm to prefetch column blocks in correct order.

Parameters

sopalin_datasopalin_data structure (common data)
ooc_threadnumooc thread number (should be on as only one is possible)

Returns

EXIT_SUCCESS

See Also

CoefMatrix_Init

ooc_sopalin

int ooc_sopalin(Sopalin_Data_t *sopalin_data,
int ooc_threadnum)

Follows the sopalin_smp algorithm to prefetch column blocks and fanin target buffers in correct order

Parameters

sopalin_datasopalin_data structure (common data)
ooc_threadnumooc thread number (should be on as only one is possible)

Returns

EXIT_SUCCESS

See Also

<sopalin_smp>

ooc_updo

int ooc_updo(Sopalin_Data_t *sopalin_data,
int ooc_threadnum)

Follows the up_down_smp algorithm to prefetch column blocks and fanin target buffers in correct order

Parameters

sopalin_datasopalin_data structure (common data)
ooc_threadnumooc thread number (should be on as only one is possible)

Returns

EXIT_SUCCESS

See Also

<up_down_smp>

ooc_thread

ooc thread main routine.  The ooc thread will have to prefetch all column blocks and fanin target buffer in correct order to make computing threads abble to compute.

Parameters

argaddress of one sopthread_data_t containing the thread number and the sopalin_data address.

Returns

EXIT_SUCCESS

ooc_init

int ooc_init(Sopalin_Data_t *sopalin_data,
INT limit)

init ooc structure

Parameters

sopalin_datasopalin_data structure (common data)
limitasked memory limit

Returns

EXIT_SUCCESSif init successfull
EXITif not enough memory.

ooc_exit

int ooc_exit (Sopalin_Data_t *sopalin_data)

clean ooc structure

Parameters

sopalin_datasopalin_data structure (common data)

Returns

EXIT_SUCCESS

ooc_init_thread

int ooc_init_thread (Sopalin_Data_t *sopalin_data,
int me)

init ooc thread structure

Parameters

sopalin_datasopalin_data structure (common data)
meooc thread number (should be on as only one is possible)

Returns

EXIT_SUCCESS

ooc_save_coef

int ooc_save_coef(Sopalin_Data_t *sopalin_data,
INT tasknum,
INT cblknum,
int me)

Had column block to the save queue.  Called by computing thread when work on a cblknum has been done.

Parameters

sopalin_datasopalin_data structure (common data)
cblknumcolumn block number.
tasktask the computing thread is computing.
stepcomputation step (sopalin, up-down...).
mecomputing thread number.  Returns: EXIT_SUCCESS

ooc_do_save_coef

int ooc_do_save_coef (Sopalin_Data_t *sopalin_data,
INT cblknum,
int ooc_threadnum)

Save one block column on disk.  Call to function must be protected by mutex_cblk[cblknum].

Parameters

sopalin_datasopalin_data structure (common data)
cblknumcolumn block number
ooc_threadnumooc thread number (should be on as only one is possible) Returns:
EXIT_SUCCESSsaved
EXIT_FAILURE_SAVING_NULL_BUFFERbuffer is null
EXIT_FAILURE_FILE_OPENINGerror opening file
EXIT_FAILUREerror writing

ooc_save_ftgt

int ooc_save_ftgt(Sopalin_Data_t *sopalin_data,
INT tasknum,
INT ftgtnum,
int me)

Had fanin target buffer to the save queue.  Called by computing thread when work on a fanin target buffer has been done.

Parameters

sopalin_datasopalin_data structure (common data)
ftgtnumfanin target buffer number
mecomputing thread number

Returns

EXIT_SUCCESS

ooc_remove_ftgt

int ooc_remove_ftgt (Sopalin_Data_t *sopalin_data,
INT ftgtnum,
int me)

Delete fanin target buffer from disk.

Parameters

sopalin_datasopalin_data structure (common data)
ftgtnumfanin buffer buffer number
meooc thread number (should be on as only one is possible) Returns:
EXIT_SUCCESSdeleted or file doesn’t exist
EXIT_FAILUREcouldn’t delete

ooc_reset_ftgt

int ooc_reset_ftgt (Sopalin_Data_t *sopalin_data,
INT ftgtnum,
int me)

Set all fanin target buffer to 0 or delete it from disk.

Parameters

sopalin_datasopalin_data structure (common data)
ftgtnumfanin buffer buffer number
meooc thread number (should be on as only one is possible) Returns:
EXIT_SUCCESSdone succesfully

ooc_do_save_ftgt

int ooc_do_save_ftgt (Sopalin_Data_t *sopalin_data,
INT ftgtnum,
int ooc_threadnum)

Save one fanin target buffer on disk.

Parameters

sopalin_datasopalin_data structure (common data)
ftgtnumfanin target buffer number
ooc_threadnumooc thread number (should be on as only one is possible) Returns:
EXIT_SUCCESSsaved
EXIT_FAILURE_SAVING_NULL_BUFFERbuffer is null
EXIT_FAILURE_FILE_OPENINGerror opening file
EXIT_FAILUREerror writing

ooc_do_load_ftgt

int ooc_do_load_ftgt (Sopalin_Data_t *sopalin_data,
INT ftgtnum,
int me)

Allocate fanin target buffer and read it from disk if it exists.

Parameters

sopalin_datasopalin_data structure (common data)
ftgtnumfanin target buffer number
meooc thread number (should be on as only one is possible) Returns:
EXIT_SUCCESSloaded
EXIT_FAILURE_OUT_OF_MEMORYNo more memory
EXIT_FAILURE_CBLK_NOT_NULLblock column not NULL
EXIT_FAILURE_FILE_OPENINGerror opening file
EXIT_FAILUREerror writing

ooc_wait_for_ftgt

int ooc_wait_for_ftgt(Sopalin_Data_t *sopalin_data,
INT ftgt,
int me)

Check if fanin target buffer is NULL.  If yes wait untill it is loaded.  If not continue

Parameters

sopalin_datasopalin_data structure (common data)
cblkfanin target number
mecomputing thread

Returns

EXIT_SUCCESS

ooc_allocate_ftgt

int ooc_allocate_ftgt(Sopalin_Data_t *sopalin_data,
INT ftgtnum,
int me)

Allocate fanin target buffer.

Parameters

sopalin_datasopalin_data structure (common data)
ftgtnumfanin target buffer number
meooc thread number (should be on as only one is possible)

Returns

EXIT_SUCCESSAllocated
EXIT_FAILURE_OUT_OF_MEMORYNo more memory
EXIT_FAILURE_CBLK_NOT_NULLfanin target buffer not NULL

ooc_do_load_coef

int ooc_do_load_coef (Sopalin_Data_t *sopalin_data,
INT cblknum,
int me)

Allocate block column and read it from disk if it exists.

Parameters

sopalin_datasopalin_data structure (common data)
cblknumcolumn block number
meooc thread number (should be on as only one is possible) Returns:
EXIT_SUCCESSloaded
EXIT_FAILURE_OUT_OF_MEMORYNo more memory
EXIT_FAILURE_CBLK_NOT_NULLblock column not NULL
EXIT_FAILURE_FILE_OPENINGerror opening file
EXIT_FAILUREerror writing

ooc_allocate

int ooc_allocate(Sopalin_Data_t *sopalin_data,
INT cblknum,
int me)

Allocate column block.

Parameters

sopalin_datasopalin_data structure (common data)
cblknumcolumn block number
meooc thread number (should be on as only one is possible)

Returns

EXIT_SUCCESSAllocated
EXIT_FAILURE_OUT_OF_MEMORYNo more memory
EXIT_FAILURE_CBLK_NOT_NULLColumn block not NULL

ooc_wait_for_cblk

int ooc_wait_for_cblk(Sopalin_Data_t *sopalin_data,
INT cblk,
int me)

Check if column block is NULL.  If yes wait untill it is loaded.  If not continue

Parameters

sopalin_datasopalin_data structure (common data)
cblkcolumn block number
mecomputing thread

Returns

EXIT_SUCCESS

ooc_stop_thread

int ooc_stop_thread(Sopalin_Data_t *sopalin_data)

Stops all ooc thread.

Parameters

sopalin_datasopalin_data structure (common data)

Returns

EXIT_SUCCESS

cblkNextAccess

void cblkNextAccess(Sopalin_Data_t *sopalin_data,
INT task,
INT cblk,
int comp_thread,
INT *key1,
INT *key2)

Compute the number of the next access to a column block or fanin target.

Parameters

sopalin_datasopalin_data structure (common data)
cblkcolumn block or fanin target number
comp_threadcomputing thread saving cblk.

Returns

Next access number.

reduceMem

void reduceMem(Sopalin_Data_t *sopalin_data,
INT size_wanted,
int me)

Save some column block or fanin target buffers until more than size_wanted memory is available.

Parameters

sopalin_datasopalin_data structure (common data)
size_wantedminimal memory needed
meooc thread number (should be on as only one is possible)

Returns

void

ooc_clock_get

int ooc_clock_get(Sopalin_Data_t *sopalin_data,
Clock *clk,
int computing_thread)

Adds time in Clock clk to the total time waiting for OOC to load data.  Defined only if OOC_CLOCK is defined.

Parameters

sopalin_datasopalin_data structure (common data)
clkclock from wich we get time
computing_threadComputing thread waitiing Returns: EXIT_SUCCESS

recursive_mkdir

int recursive_mkdir(char *path,
mode_t mode)

Create directory and subdirectory indicated by path

Parameters

pathpath to the directory to create
modemode for the created directory (Ex: S_IRUSR | S_IWUSR | S_IRGRP | S_IXUSR | S_IWGRP | S_IROTH | S_IWOTH) Returns: EXIT_SUCCESS

ooc_hack_load

int ooc_hack_load(Sopalin_Data_t *sopalin_data,
INT cblknum,
int me)

Add a bloc column to priority load queue.

Parameters

sopalin_dataGlobal PaStiX structure.
cblknumcolumn bloc to load.
meComputing thread asking for cblk to be loaded.

ooc_set_step

int ooc_set_step(Sopalin_Data_t *sopalin_data,
int step)

ooc_freeze

int ooc_freeze(Sopalin_Data_t *sopalin_data)

ooc_defreeze

int ooc_defreeze(Sopalin_Data_t *sopalin_data)

ooc_receiving

void ooc_receiving(Sopalin_Data_t *sopalin_data)

ooc_received

void ooc_received(Sopalin_Data_t *sopalin_data)

ooc_wait_task

void ooc_wait_task(Sopalin_Data_t *sopalin_data,
INT task,
int me)
double time_reading
double time_writting
INT id
id for saving files
int stop
indicated when the thread should die
int threadnbr
ooc thrdnbr
INT allocated
OOC allocated memory
int max_cblk_size
Max size of a cblk
Queue queue
queue of cblk to free
pthread_mutex_t mutex_queue
mutex on the queue of cblk to free
pthread_cond_t cond_queue
con for the queue of cblk to free
Queue toload
Queue of block column not taken into account in loops
pthread_mutex_t mutex_toload
mutex on the queue of cblk to load
pthread_cond_t cond_toload
cond on the queue of cblk to load
INT frozen
Used to stop loadings temporatly
pthread_mutex_t mutex_frozen
Mutex on frozen
pthread_cond_t cond_frozen
Cond on frozen
int current_step
Current computing step for computing threads
int current_itercomp
int current_taskooc
pthread_mutex_t mutex_current_task
pthread_cond_t cond_current_task
int current_iterooc
volatile int threads_waiting
Number of thread waiting for queue to be fill-in
pthread_mutex_t mutex_thrd_wting
mutex corresponding to threads_waiting
INT lastloaded
Last block loaded
int threads_receiving
Number of thread waiting for a contribution
pthread_mutex_t mutex_thrd_rcving
mutex corresponding to threads_receiving
pthread_mutex_t mutex_step
mutex on the current_step variable
pthread_cond_t cond_step
cond for the current_step variable
INT cblkloaded
Number of blocks loaded
INT ftgtloaded
Number of blocks loaded
pthread_mutex_t mutex_allocated
mutex on allocation
INT coeftabsize
size of the coeftab
int opened
number of file opened
pthread_mutex_t opened_mutex
mutex on opened
int ooc_init_thread (Sopalin_Data_t *sopalin_data,
int threadnum)
int ooc_clock_get (Sopalin_Data_t *sopalin_data,
Clock *clk,
int computing_thread)
int ooc_do_save_coef (Sopalin_Data_t *sopalin_data,
INT cblknum,
int me)
int ooc_do_load_coef (Sopalin_Data_t *sopalin_data,
INT cblknum,
int me)
int ooc_allocate (Sopalin_Data_t *sopalin_data,
INT cblknum,
int me)
int ooc_do_load_ftgt (Sopalin_Data_t *sopalin_data,
INT ftgtnum,
int me)
int ooc_remove_ftgt (Sopalin_Data_t *sopalin_data,
INT ftgtnum,
int me)
int ooc_allocate_ftgt (Sopalin_Data_t *sopalin_data,
INT ftgtnum,
int me)
int ooc_do_save_ftgt (Sopalin_Data_t *sopalin_data,
INT indbloc,
int me)
void reduceMem (Sopalin_Data_t *sopalin_data,
INT size_wanted,
int me)
void cblkNextAccess (Sopalin_Data_t *sopalin_data,
INT tasknum,
INT cblknum,
int computing_thread,
INT *key1,
INT *key2)
INT cblkAndContribSize (Sopalin_Data_t *sopalin_data,
INT task)
INT updo_init_mem (Sopalin_Data_t *sopalin_data)
INT updo_init_smp_mem (Sopalin_Data_t *sopalin_data)
INT sopalin_init_smp_mem(Sopalin_Data_t *sopalin_data)
INT raff_mem (Sopalin_Data_t *sopalin_data)
int recursive_mkdir (char *path,
mode_t mode)
int ooc_prefetch(Sopalin_Data_t *sopalin_data,
INT cblknum,
int me,
int priority)
Prefetch one column bloc
int ooc_prefetch_ftgt(Sopalin_Data_t *sopalin_data,
INT ftgtnum,
int me,
int priority)
Prefetch one column fanin target buffer
int ooc_coefMatrixInit(Sopalin_Data_t *sopalin_data,
int ooc_threadnum)
Follows the CoefMatrix_Init algorithm to prefetch column blocks in correct order.
int ooc_sopalin(Sopalin_Data_t *sopalin_data,
int ooc_threadnum)
Follows the sopalin_smp algorithm to prefetch column blocks and fanin target buffers in correct order
int ooc_updo(Sopalin_Data_t *sopalin_data,
int ooc_threadnum)
Follows the up_down_smp algorithm to prefetch column blocks and fanin target buffers in correct order
int ooc_init(Sopalin_Data_t *sopalin_data,
INT limit)
init ooc structure
int ooc_exit (Sopalin_Data_t *sopalin_data)
clean ooc structure
int ooc_save_coef(Sopalin_Data_t *sopalin_data,
INT tasknum,
INT cblknum,
int me)
Had column block to the save queue.
int ooc_save_ftgt(Sopalin_Data_t *sopalin_data,
INT tasknum,
INT ftgtnum,
int me)
Had fanin target buffer to the save queue.
int ooc_reset_ftgt (Sopalin_Data_t *sopalin_data,
INT ftgtnum,
int me)
Set all fanin target buffer to 0 or delete it from disk.
int ooc_wait_for_ftgt(Sopalin_Data_t *sopalin_data,
INT ftgt,
int me)
Check if fanin target buffer is NULL.
int ooc_wait_for_cblk(Sopalin_Data_t *sopalin_data,
INT cblk,
int me)
Check if column block is NULL.
int ooc_stop_thread(Sopalin_Data_t *sopalin_data)
Stops all ooc thread.
int ooc_hack_load(Sopalin_Data_t *sopalin_data,
INT cblknum,
int me)
Add a bloc column to priority load queue.
int ooc_set_step(Sopalin_Data_t *sopalin_data,
int step)
int ooc_freeze(Sopalin_Data_t *sopalin_data)
int ooc_defreeze(Sopalin_Data_t *sopalin_data)
void ooc_receiving(Sopalin_Data_t *sopalin_data)
void ooc_received(Sopalin_Data_t *sopalin_data)
void ooc_wait_task(Sopalin_Data_t *sopalin_data,
INT task,
int me)
void CoefMatrix_Init(SolverMatrix *datacode,
sopthread_barrier_t *barrier,
INT me,
INT *iparm,
FLOAT **transcsc,
Sopalin_Data_t *sopalin_data)
Init coeftab and ucoeftab coefficients.
Close