sopalin3d.c

sopalin 3d main program.

Authors

Mathieu Favergefav.nosp@m.erge@labr.nosp@m.i.fr
Xavier Lacostelac.nosp@m.oste@labr.nosp@m.i.fr
Pierre Rametra.nosp@m.met@labr.nosp@m.i.fr

Date

Version 0.0february 2003
Summary
sopalin3d.csopalin 3d main program.
Global variables
Variables
iunInteger 1
funFloating point 1.0
fun
fzeroFloating point 0.0
Macros
Macros
Printing maccros.
Variables
err_mpi
Prototypes
API_CALL(dump_all)
API_CALL(init_struct_sopalin)
API_CALL(sopalin_launch)
API_CALL(sopalin_thread)
API_CALL(sopalin_updo_thread)
API_CALL(sopalin_updo_gmres_thread)
API_CALL(sopalin_updo_grad_thread)
API_CALL(sopalin_updo_pivot_thread)
API_CALL(up_down)
Global
Debug functions
API_CALL(dump_all)Dumps the matrix and right-hand-side on disk.
API_CALL(compute_diag)
API_CALL(compute_1d)
API_CALL(compute_1dgemm)
API_CALL(compute_e1)
API_CALL(compute_e2)
API_CALL(updo_init)
API_CALL(updo_thread)
API_CALL(pivot_thread)
API_CALL(gmres_thread)
API_CALL(grad_thread)
Global
Sopalin functions
API_CALL(init_struct_sopalin)Initialization routine.
Variables
API_CALL(sopalin_smp)Factorization routine.
c
k
stride
size
inertia
MPI_Barrier
API_CALL(sopalin_updo_comm)Updown function used for the communication thread.
API_CALL(sopalin_thread)Function launching computing, communictating and out of core threads on the factorization step only.
sopalin_updo_smpFunction used for computing thread creation to compute factorisation and resolution.
API_CALL(sopalin_updo_thread)Function launching computing, communicating and out of core threads on the factorization and solve steps.
API_CALL(sopalin_updo_gmres_smp)Function used for computing thread creation to compute factorisation, resolution and gmres.
API_CALL(sopalin_updo_gmres_thread)Function launching computing, communicating and out of core threads on the factorization, solve and reffinement (using GMRES) steps.
API_CALL(sopalin_updo_grad_smp)Function used for computing thread creation to compute factorisation, resolution and conjugate gradient.
API_CALL(sopalin_updo_grad_thread)Function launching computing, communicating and out of core threads on the factorization, solve and reffinement (using conjugate grandient) steps.
API_CALL(sopalin_updo_pivot_smp)Function used for computing thread creation to compute factorisation, resolution and pivoting refinement.
API_CALL(sopalin_updo_pivot_thread)Function launching computing, communicating and out of core threads on the factorization, solve and reffinement (using pivoting refinement) steps.
API_CALL(sopalin_launch)TODO: Comment (unused ?)

Global variables

Summary
Variables
iunInteger 1
funFloating point 1.0
fun
fzeroFloating point 0.0

Variables

iun

static INT iun

Integer 1

fun

static FLOAT fun

Floating point 1.0

fun

static FLOAT fun

fzero

static FLOAT fzero

Floating point 0.0

Macros

Printing maccros.

print_onempi(fmt, ...)Print message by one MPI task.
print_one(fmt, ...)Print message by one thread of one MPI task
print_error(...)Print error messages (ignored).

Variables

err_mpi

int err_mpi

Prototypes

API_CALL(dump_all)

void API_CALL(dump_all) (SolverMatrix *, int)

API_CALL(init_struct_sopalin)

void API_CALL(
   init_struct_sopalin
)(Sopalin_Data_t *sopalin_data, SolverMatrix *m, SopalinParam *sopar)

API_CALL(sopalin_launch)

void API_CALL(
   sopalin_launch
) (SolverMatrix *m, SopalinParam *sopaparam, INT cas)

API_CALL(sopalin_thread)

void API_CALL(sopalin_thread) (SolverMatrix *m, SopalinParam *sopaparam)

API_CALL(sopalin_updo_thread)

void API_CALL(sopalin_updo_thread) (SolverMatrix *m, SopalinParam *sopaparam)

API_CALL(sopalin_updo_gmres_thread)

void API_CALL(
   sopalin_updo_gmres_thread
)(SolverMatrix *m, SopalinParam *sopaparam)

API_CALL(sopalin_updo_grad_thread)

void API_CALL(
   sopalin_updo_grad_thread
) (SolverMatrix *m, SopalinParam *sopaparam)

API_CALL(sopalin_updo_pivot_thread)

void API_CALL(
   sopalin_updo_pivot_thread
)(SolverMatrix *m, SopalinParam *sopaparam)

API_CALL(up_down)

void API_CALL(up_down)(void)

Global

Debug functions

API_CALL(dump_all)

void API_CALL(dump_all)(SolverMatrix *datacode, int x)

Dumps the matrix and right-hand-side on disk.

This function can dump the internal distributed CSC matrix, or the solvermatrix, or the Up-down vector.

This function must be called by only one thread for each MPI process.

The x value can be defined using DUMP_CSC, DUMP_SOLV and DUMP_SMB, combined like DUMP_CSC | DUMP_SOLV | DUMP_SMB

Parameters

datacodeSolverMatrix
xvalue indicating what to dump.

Returns

void

API_CALL(compute_diag)

void API_CALL(compute_diag) (Sopalin_Data_t *sopalin_data, INT me, INT task)

API_CALL(compute_1d)

void API_CALL(compute_1d) (Sopalin_Data_t *sopalin_data, INT me, INT task)

API_CALL(compute_1dgemm)

void API_CALL(
   compute_1dgemm
)(Sopalin_Data_t *sopalin_data, INT me, INT task, INT i, INT b2)

API_CALL(compute_e1)

void API_CALL(compute_e1) (Sopalin_Data_t *sopalin_data, INT me, INT task)

API_CALL(compute_e2)

void API_CALL(compute_e2) (Sopalin_Data_t *sopalin_data, INT me, INT task)

API_CALL(updo_init)

void API_CALL(
   updo_init
)(Sopalin_Data_t *sopalin_data, SolverMatrix *datacode, SopalinParam *sopaparam)

API_CALL(updo_thread)

void API_CALL(updo_thread)(SolverMatrix *datacode, SopalinParam *sopaparam)

API_CALL(pivot_thread)

void API_CALL(pivot_thread)(SolverMatrix *datacode, SopalinParam *sopaparam)

API_CALL(gmres_thread)

void API_CALL(gmres_thread)(SolverMatrix *datacode, SopalinParam *sopaparam)

API_CALL(grad_thread)

void API_CALL(grad_thread) (SolverMatrix *datacode, SopalinParam *sopaparam)

Global

Sopalin functions

API_CALL(init_struct_sopalin)

void API_CALL(
   init_struct_sopalin
)(Sopalin_Data_t *sopalin_data, SolverMatrix *datacode, SopalinParam *sopar)

Initialization routine.

Set the sopalin_data->critere, allocate FANIN_COEFTAB and TASK_BTAGPTR.

Parameters

sopalin_dataStructure used during factorisation and resolution.
datacodeSolverMatrix structure.
soparFactorisation parameters.

Variables

API_CALL(sopalin_smp)

SOPALIN_CLOCK_STOP

Factorization routine.

This function is meant to be used when launching a thread.

Parameters

argPointer to a data structure <sopthread_data_t> with a <Sopalin_Data_t> pointer as data.

c

INT c

k

INT k

stride

INT stride

size

INT size

inertia

INT inertia

MPI_Barrier

CALL_MPI MPI_Barrier(pastix_comm)

API_CALL(sopalin_updo_comm)

void API_CALL(sopalin_thread)(SolverMatrix *m, SopalinParam *sopaparam)

Updown function used for the communication thread.

Parameters

argPointer to a data structure <sopthread_data_t> with a <Sopalin_Data_t> pointer as data.

API_CALL(sopalin_thread)

void API_CALL(sopalin_updo_thread)(SolverMatrix *m, SopalinParam *sopaparam)

Function launching computing, communictating and out of core threads on the factorization step only.

Initiate the <Sopalin_Data_t> structure, launch threads, clean and restore.

Parameters

mThe <SolverMatrix> structure.
sopaparamSopalin parameters in the <SopalinParam> stucture.

sopalin_updo_smp

Function used for computing thread creation to compute factorisation and resolution.

Parameters

argPointer to a data structure <sopthread_data_t> with a <Sopalin_Data_t> pointer as data.

API_CALL(sopalin_updo_thread)

void API_CALL(
   sopalin_updo_gmres_thread
)(SolverMatrix *m, SopalinParam *sopaparam)

Function launching computing, communicating and out of core threads on the factorization and solve steps.

Initiate the <Sopalin_Data_t> structure, launch threads, clean and restore.

Parameters

mThe <SolverMatrix> structure.
sopaparamSopalin parameters in the <SopalinParam> stucture.

API_CALL(sopalin_updo_gmres_smp)

void API_CALL(
   sopalin_updo_grad_thread
)(SolverMatrix *m, SopalinParam *sopaparam)

Function used for computing thread creation to compute factorisation, resolution and gmres.

Parameters

argPointer to a data structure <sopthread_data_t> with a <Sopalin_Data_t> pointer as data.

API_CALL(sopalin_updo_gmres_thread)

void API_CALL(
   sopalin_updo_pivot_thread
)(SolverMatrix *m, SopalinParam *sopaparam)

Function launching computing, communicating and out of core threads on the factorization, solve and reffinement (using GMRES) steps.

Initiate the <Sopalin_Data_t> structure, launch threads, clean and restore.

Parameters

mThe <SolverMatrix> structure.
sopaparamSopalin parameters in the <SopalinParam> stucture.

API_CALL(sopalin_updo_grad_smp)

void API_CALL(sopalin_launch)(SolverMatrix *m, SopalinParam *sopaparam, INT cas)

Function used for computing thread creation to compute factorisation, resolution and conjugate gradient.

Parameters

argPointer to a data structure <sopthread_data_t> with a <Sopalin_Data_t> pointer as data.

API_CALL(sopalin_updo_grad_thread)

Function launching computing, communicating and out of core threads on the factorization, solve and reffinement (using conjugate grandient) steps.

Initiate the <Sopalin_Data_t> structure, launch threads, clean and restore.

Parameters

mThe <SolverMatrix> structure.
sopaparamSopalin parameters in the <SopalinParam> stucture.

API_CALL(sopalin_updo_pivot_smp)

Function used for computing thread creation to compute factorisation, resolution and pivoting refinement.

Parameters

argPointer to a data structure <sopthread_data_t> with a <Sopalin_Data_t> pointer as data.

API_CALL(sopalin_updo_pivot_thread)

Function launching computing, communicating and out of core threads on the factorization, solve and reffinement (using pivoting refinement) steps.

Initiate the <Sopalin_Data_t> structure, launch threads, clean and restore.

Parameters

mThe <SolverMatrix> structure.
sopaparamSopalin parameters in the <SopalinParam> stucture.

API_CALL(sopalin_launch)

TODO: Comment (unused ?)

static INT iun
Integer 1
static FLOAT fun
Floating point 1.0
static FLOAT fzero
Floating point 0.0
int err_mpi
void API_CALL(dump_all) (SolverMatrix *, int)
void API_CALL(
   init_struct_sopalin
)(Sopalin_Data_t *sopalin_data, SolverMatrix *m, SopalinParam *sopar)
void API_CALL(
   sopalin_launch
) (SolverMatrix *m, SopalinParam *sopaparam, INT cas)
void API_CALL(sopalin_thread) (SolverMatrix *m, SopalinParam *sopaparam)
void API_CALL(sopalin_updo_thread) (SolverMatrix *m, SopalinParam *sopaparam)
void API_CALL(
   sopalin_updo_gmres_thread
)(SolverMatrix *m, SopalinParam *sopaparam)
void API_CALL(
   sopalin_updo_grad_thread
) (SolverMatrix *m, SopalinParam *sopaparam)
void API_CALL(
   sopalin_updo_pivot_thread
)(SolverMatrix *m, SopalinParam *sopaparam)
void API_CALL(up_down)(void)
void API_CALL(compute_diag) (Sopalin_Data_t *sopalin_data, INT me, INT task)
void API_CALL(compute_1d) (Sopalin_Data_t *sopalin_data, INT me, INT task)
void API_CALL(
   compute_1dgemm
)(Sopalin_Data_t *sopalin_data, INT me, INT task, INT i, INT b2)
void API_CALL(compute_e1) (Sopalin_Data_t *sopalin_data, INT me, INT task)
void API_CALL(compute_e2) (Sopalin_Data_t *sopalin_data, INT me, INT task)
void API_CALL(
   updo_init
)(Sopalin_Data_t *sopalin_data, SolverMatrix *datacode, SopalinParam *sopaparam)
void API_CALL(updo_thread)(SolverMatrix *datacode, SopalinParam *sopaparam)
void API_CALL(pivot_thread)(SolverMatrix *datacode, SopalinParam *sopaparam)
void API_CALL(gmres_thread)(SolverMatrix *datacode, SopalinParam *sopaparam)
void API_CALL(grad_thread) (SolverMatrix *datacode, SopalinParam *sopaparam)
SOPALIN_CLOCK_STOP
Factorization routine.
INT c
INT k
INT stride
INT size
INT inertia
CALL_MPI MPI_Barrier(pastix_comm)
void API_CALL(sopalin_thread)(SolverMatrix *m, SopalinParam *sopaparam)
Updown function used for the communication thread.
void API_CALL(sopalin_updo_thread)(SolverMatrix *m, SopalinParam *sopaparam)
Function launching computing, communictating and out of core threads on the factorization step only.
void API_CALL(
   sopalin_updo_gmres_thread
)(SolverMatrix *m, SopalinParam *sopaparam)
Function launching computing, communicating and out of core threads on the factorization and solve steps.
void API_CALL(
   sopalin_updo_grad_thread
)(SolverMatrix *m, SopalinParam *sopaparam)
Function used for computing thread creation to compute factorisation, resolution and gmres.
void API_CALL(
   sopalin_updo_pivot_thread
)(SolverMatrix *m, SopalinParam *sopaparam)
Function launching computing, communicating and out of core threads on the factorization, solve and reffinement (using GMRES) steps.
void API_CALL(sopalin_launch)(SolverMatrix *m, SopalinParam *sopaparam, INT cas)
Function used for computing thread creation to compute factorisation, resolution and conjugate gradient.
Close