Commit dacc4709 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Change a big bunch of files, just to extract the parsec initialization, as...

Change a big bunch of files, just to extract the parsec initialization, as well as the descriptor initialization from the factorization
parent b46aa11f
......@@ -593,6 +593,13 @@ set(PASTIX_LIB_SRCS
${generated_files}
)
if(PASTIX_WITH_PARSEC)
set(PASTIX_LIB_SRCS
${PASTIX_LIB_SRCS}
common/parsec.c
)
endif()
if(PASTIX_WITH_CUDA)
set(PASTIX_LIB_SRCS
${PASTIX_LIB_SRCS}
......
......@@ -78,6 +78,10 @@ typedef struct SolverMatrix_ {
SolverCblk * restrict cblktab; /*+ Array of solver column blocks +*/
SolverBlok * restrict bloktab; /*+ Array of solver blocks +*/
#if defined(PASTIX_WITH_PARSEC)
sparse_matrix_desc_t *parsec_desc;
#endif
#ifdef PASTIX_WITH_STARPU
/* All this part concern halo of the local matrix
* ie: column blocks which will:
......
......@@ -13,6 +13,7 @@
#include "common.h"
#include "order.h"
#include "spm.h"
#include "solver.h"
#include "bcsc.h"
#include "z_bcsc.h"
......
......@@ -17,6 +17,7 @@
#include "common.h"
#include "order.h"
#include "spm.h"
#include "solver.h"
#include "bcsc.h"
#include "d_bcsc.h"
......
......@@ -16,6 +16,7 @@
#include "common.h"
#include "order.h"
#include "spm.h"
#include "solver.h"
#include "bcsc.h"
#include "z_bcsc.h"
......
......@@ -101,6 +101,10 @@ typedef struct SolverMatrix_ {
SolverBlok * restrict bloktab; /*< Array of solver blocks */
pastix_int_t * restrict browtab; /*< Array of blocks */
#if defined(PASTIX_WITH_PARSEC)
sparse_matrix_desc_t *parsec_desc;
#endif
#ifdef PASTIX_WITH_STARPU
/* All this part concern halo of the local matrix
* ie: column blocks which will:
......
#include <stdlib.h>
#include <stdio.h>
#include "common.h"
#include "ftgt.h"
#include "queue.h"
......@@ -208,6 +204,17 @@ void solverExit(SolverMatrix *solvmtx)
}
memFree_null(solvmtx->ttsktab);
memFree_null(solvmtx->proc2clust);
#if defined(PASTIX_WITH_PARSEC)
{
if ( solvmtx->parsec_desc != NULL ) {
sparse_matrix_destroy( solvmtx->parsec_desc );
}
solvmtx->parsec_desc = NULL;
}
#endif
/*memFree_null(solvmtx);*/
#if defined(PASTIX_WITH_STARPU)
memFree_null(solvmtx->hcblktab);
......
......@@ -16,6 +16,7 @@
*
**/
#include "common.h"
#include "solver.h"
/**
* @ingroup pastix_solver
......
......@@ -369,9 +369,23 @@ pastixInit( pastix_data_t **pastix_data,
iparm[IPARM_THREAD_NBR] = pastix->intra_node_procnbr;
}
/**
* Start the internal threads
*/
pastix->isched = ischedInit( pastix->iparm[IPARM_THREAD_NBR], NULL );
pastix->iparm[IPARM_THREAD_NBR] = pastix->isched->world_size;
/**
* Start PaRSEC if compiled with it and scheduler set to PaRSEC
*/
#if defined(PASTIX_WITH_PARSEC)
if ( pastix->parsec == NULL &&
iparm[IPARM_SCHEDULER] == 2 ) {
int argc = 0;
pastix_parsec_init( pastix, &argc, NULL );
}
#endif /* defined(PASTIX_WITH_PARSEC) */
pastix->graph = NULL;
pastix->schur_n = 0;
pastix->schur_list = NULL;
......@@ -475,6 +489,12 @@ pastixFinalize( pastix_data_t **pastix_data,
pastix_data_t *pastix = *pastix_data;
(void)pastix_comm; (void)iparm; (void)dparm;
#if defined(PASTIX_WITH_PARSEC)
if (pastix->parsec != NULL) {
pastix_parsec_finalize( pastix );
}
#endif /* defined(PASTIX_WITH_PARSEC) */
ischedFinalize( pastix->isched );
if ( pastix->graph != NULL )
......
......@@ -39,6 +39,10 @@
#include "trace.h"
#include "pastixdata.h"
#if defined(PASTIX_WITH_PARSEC)
#include "sopalin/parsec/pastix_parsec.h"
#endif
/********************************************************************
* Errors functions
*/
......
......@@ -22,7 +22,6 @@
#include "symbol.h"
#include "queue.h"
#include "bulles.h"
#include "solver.h"
/*
* Steps of the pastix solver
......@@ -37,6 +36,9 @@
#define STEP_SOLVE (1 << 7)
#define STEP_REFINE (1 << 8)
struct SolverMatrix_;
typedef struct SolverMatrix_ SolverMatrix;
struct pastix_bcsc_s;
typedef struct pastix_bcsc_s pastix_bcsc_t;
......
......@@ -14,9 +14,9 @@
**/
#include "common.h"
#include "blend/solver.h"
#include "pastix_zcores.h"
#include <cblas.h>
#include "../blend/solver.h"
/**
******************************************************************************
......
......@@ -15,9 +15,9 @@
*
**/
#include "common.h"
#include "pastix_zcores.h"
#include <cblas.h>
#include "../blend/solver.h"
#include "blend/solver.h"
#include "pastix_zcores.h"
static pastix_complex64_t zone = 1.;
static pastix_complex64_t zzero = 0.;
......
......@@ -15,9 +15,9 @@
*
**/
#include "common.h"
#include "pastix_zcores.h"
#include <cblas.h>
#include "../blend/solver.h"
#include "blend/solver.h"
#include "pastix_zcores.h"
static pastix_complex64_t zone = 1.;
static pastix_complex64_t mzone = -1.;
......
......@@ -15,9 +15,9 @@
*
**/
#include "common.h"
#include "pastix_zcores.h"
#include <cblas.h>
#include "../blend/solver.h"
#include "blend/solver.h"
#include "pastix_zcores.h"
static pastix_complex64_t zone = 1.;
static pastix_complex64_t mzone = -1.;
......
......@@ -15,9 +15,9 @@
*
**/
#include "common.h"
#include "pastix_zcores.h"
#include <cblas.h>
#include "../blend/solver.h"
#include "blend/solver.h"
#include "pastix_zcores.h"
static pastix_complex64_t zone = 1.;
static pastix_complex64_t mzone = -1.;
......
......@@ -15,9 +15,9 @@
*
**/
#include "common.h"
#include "pastix_zcores.h"
#include <cblas.h>
#include "../blend/solver.h"
#include "blend/solver.h"
#include "pastix_zcores.h"
static pastix_complex64_t zone = 1.;
static pastix_complex64_t mzone = -1.;
......
......@@ -15,9 +15,9 @@
*
**/
#include "common.h"
#include "pastix_zcores.h"
#include <cblas.h>
#include "../blend/solver.h"
#include "blend/solver.h"
#include "pastix_zcores.h"
/**
*******************************************************************************
......
......@@ -54,7 +54,7 @@
"" "vert=100," \
"" "low=h{pass=10}," \
"" "asc=f{bal=0.2}};," \
"" "ole=f{cmin=0,cmax=100000,frat=0.0}," \
"" "ole=f{cmin=15,cmax=100000,frat=0.08}," \
"" "ose=g}," \
"""unc=n{sep=/(vert>120)?(m{rat=0.8," \
"" "vert=100," \
......
......@@ -16,6 +16,7 @@
#include "common.h"
#include "bcsc.h"
#include "isched.h"
#include "solver.h"
void
coeftab_zinitcblk( const SolverMatrix *solvmtx,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment