Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 3d2a0bbf authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Remove unused spm driver and cleanup sm documentation

parent 0cf64102
No related branches found
No related tags found
No related merge requests found
......@@ -466,11 +466,11 @@ spm2Dense( const pastix_spm_t *spm )
********************************************************************************
*
* @return
* \retval the norm described above. Note that for simplicity, even if
* \retval norm The norm described above. Note that for simplicity, even if
* the norm of single real or single complex matrix is computed with
* single precision, the returned norm is stored in double precision
* number.
* \retval -1., if the floating point of the sparse matrix is
* \retval -1 If the floating point of the sparse matrix is
* undefined.
*
*******************************************************************************/
......
......@@ -18,28 +18,28 @@
/**
* @ingroup pastix_spm
*
* @brief The list of matrix driver reader and generators
* @brief The list of matrix driver readers and generators
*
*/
typedef enum pastix_driver_e {
PastixDriverRSA, /* ok */
PastixDriverCCC,//
PastixDriverRCC,//
PastixDriverOlaf,//
PastixDriverPeer,//
PastixDriverHB, /* ok */
PastixDriverIJV, /* ok */
PastixDriverMM, /* ok */
PastixDriverDMM, /* ok */
PastixDriverPetscS, /* ok */
PastixDriverPetscU, /* ok */
PastixDriverPetscH, /* ok */
PastixDriverCSCD,//
PastixDriverLaplacian, /* ok */
PastixDriverXLaplacian, /* ok */
PastixDriverBRGM,//
PastixDriverBRGMD,//
PastixDriverGraph
PastixDriverRSA, /**< RSA driver */
PastixDriverHB, /**< Harwell Boeing driver */
PastixDriverIJV, /**< IJV Coordinate driver */
PastixDriverMM, /**< Matrix Market driver */
PastixDriverLaplacian, /**< 3, 5, or 7 points Lapalacian stencil generator */
PastixDriverXLaplacian, /**< 15-points Laplacian stencil generator */
PastixDriverGraph, /**< Scotch Graph driver */
/* PastixDriverDMM, /\**< Distributed Matrix Market driver *\/ */
/* PastixDriverCSCD, /\**< CSC distributed driver *\/ */
/* PastixDriverPetscS, /\**< Petsc Symmetric driver *\/ */
/* PastixDriverPetscU, /\**< Pestc Unssymmetric driver *\/ */
/* PastixDriverPetscH, /\**< Pestc Hermitian driver *\/ */
/* PastixDriverCCC, /\**< Not supported yet *\/ */
/* PastixDriverRCC, /\**< Not supported yet *\/ */
/* PastixDriverOlaf, /\**< Not supported yet *\/ */
/* PastixDriverPeer, /\**< Not supported yet *\/ */
/* PastixDriverBRGM, /\**< Not supported yet *\/ */
/* PastixDriverBRGMD, /\**< Not supported yet *\/ */
} pastix_driver_t;
/**
......@@ -55,7 +55,7 @@ typedef enum pastix_driver_e {
* It is also possible to describe a matrix with constant or varaibel degrees of freedom.
*
*/
struct pastix_spm_s {
typedef struct pastix_spm_s {
int mtxtype; /**< Matrix structure: PastixGeneral, PastixSymmetric
or PastixHermitian. */
pastix_coeftype_t flttype; /**< avals datatype: PastixPattern, PastixFloat, PastixDouble,
......@@ -83,71 +83,66 @@ struct pastix_spm_s {
pastix_int_t *rowptr; /**< List of edges for each vertex [+baseval] */
pastix_int_t *loc2glob;/**< Corresponding numbering from local to global [+baseval] */
void *values; /**< Values stored in the matrix */
};
} pastix_spm_t;
/**
* Integer arrays subroutines
* SPM subroutines
*/
pastix_int_t *spmIntConvert( pastix_int_t n, int *input );
void spmInit( pastix_spm_t *spm );
void spmExit( pastix_spm_t *spm );
pastix_spm_t *spmCopy( const pastix_spm_t *spm );
void spmBase( pastix_spm_t *spm, int baseval );
void spmUpdateComputedFields( pastix_spm_t *spm );
int spmConvert( int ofmttype, pastix_spm_t *ospm );
void * spm2Dense( const pastix_spm_t *spm );
pastix_int_t spmFindBase( const pastix_spm_t *spm );
double spmNorm( int ntype, const pastix_spm_t *spm );
int spmMatVec(const pastix_trans_t trans, const void *alpha, const pastix_spm_t *spm, const void *x, const void *beta, void *y );
void spmScal( const pastix_complex64_t alpha, pastix_spm_t* spm );
int spmSort( pastix_spm_t *spm );
pastix_int_t spmMergeDuplicate( pastix_spm_t *spm );
pastix_int_t spmSymmetrize( pastix_spm_t *spm );
pastix_spm_t *spmCheckAndCorrect( pastix_spm_t *spm );
/**
*******************************************************************************
*
* @ingroup pastix_spm
*
* @brief Sorts in ascending order array of element composed of one single
* pastix_int_t with a single key value.
*
*******************************************************************************
*
* @param[in,out] pbase TODO
*
*
* @param[in] n
* The number of elements in the array.
*
*******************************************************************************
* SPM IO subroutines
*/
void spmIntSort1Asc1(void * const pbase, const pastix_int_t n);
int spmLoad( pastix_spm_t *spm, FILE *infile );
int spmSave( pastix_spm_t *spm, FILE *outfile );
/**
*******************************************************************************
*
* @ingroup pastix_spm
*
* @brief Sorts in ascending order array of element composed of two
* pastix_int_t by ascending order. The first value is used as key.
*
*******************************************************************************
*
* @param[in,out] pbase TODO
*
*
* @param[in] n
* The number of elements in the array.
*
*******************************************************************************
* SPM subroutines to check factorization/solve
*/
void spmIntSort2Asc1(void * const pbase, const pastix_int_t n);
int spmGenRHS( int type, int nrhs, const pastix_spm_t *spm, void *x, int ldx, void *b, int ldb );
int spmCheckAxb( int nrhs, const pastix_spm_t *spm, void *x0, int ldx0, void *b, int ldb, const void *x, int ldx );
/**
*******************************************************************************
*
* @ingroup pastix_spm
*
* @brief Sorts in ascending order array of element composed of two
* pastix_int_t by ascending order. Both values are used as key.
*
*******************************************************************************
*
* @param[in,out] pbase TODO
*
*
* @param[in] n
* The number of elements in the array.
*
*******************************************************************************
* SPM print output
*/
void spmPrint( FILE *f, const pastix_spm_t *spm );
/**
* SPM multi-dof subroutines
*/
pastix_spm_t *spmExpand(const pastix_spm_t* spm);
pastix_spm_t *spmDofExtend( const int type, const int dof, const pastix_spm_t *spm );
/**
* SPM read driver access
*/
int spmReadDriver( pastix_driver_t driver,
char *filename,
pastix_spm_t *spm,
MPI_Comm pastix_comm );
/**
* SPM subroutines to manipulate integers arrays
*/
pastix_int_t *spmIntConvert( pastix_int_t n, int *input );
void spmIntSort1Asc1(void * const pbase, const pastix_int_t n);
void spmIntSort2Asc1(void * const pbase, const pastix_int_t n);
void spmIntSort2Asc2(void * const pbase, const pastix_int_t n);
/**
......@@ -160,121 +155,28 @@ void spmIntSort2Asc2(void * const pbase, const pastix_int_t n);
*******************************************************************************
* @param[in] f Pointer to the file
*
* @param[in] i TODO
* @param[in] i Row index of the element
*
* @param[in] j TODO
* @param[in] j Column index of the element
*
* @param[in] A TODO
* @param[in] A Value of the element A|i,j]
*******************************************************************************
* @{
*/
static inline void z_spmPrintElt( FILE *f, pastix_int_t i, pastix_int_t j, pastix_complex64_t A ){
fprintf( f, "%ld %ld %e %e\n", (long)i, (long)j, creal(A), cimag(A) );
}
/**
*******************************************************************************
*
* @ingroup pastix_spm_dev
*
* @brief Subroutines to print elements of spm structures
*
*******************************************************************************
* @param[in] f Pointer to the file
*
* @param[in] i TODO
*
* @param[in] j TODO
*
* @param[in] A TODO
*******************************************************************************
*/
static inline void c_spmPrintElt( FILE *f, pastix_int_t i, pastix_int_t j, pastix_complex32_t A ){
fprintf( f, "%ld %ld %e %e\n", (long)i, (long)j, crealf(A), cimagf(A) );
}
/**
*******************************************************************************
*
* @ingroup pastix_spm_dev
*
* @brief Subroutines to print elements of spm structures
*
*******************************************************************************
* @param[in] f Pointer to the file
*
* @param[in] i TODO
*
* @param[in] j TODO
*
* @param[in] A TODO
*******************************************************************************
*/
static inline void d_spmPrintElt( FILE *f, pastix_int_t i, pastix_int_t j, double A ){
fprintf( f, "%ld %ld %e\n", (long)i, (long)j, A );
}
/**
*******************************************************************************
*
* @ingroup pastix_spm_dev
*
* @brief Subroutines to print elements of spm structures
*
*******************************************************************************
* @param[in] f Pointer to the file
*
* @param[in] i TODO
*
* @param[in] j TODO
*
* @param[in] A TODO
*******************************************************************************
*/
static inline void s_spmPrintElt( FILE *f, pastix_int_t i, pastix_int_t j, float A ){
fprintf( f, "%ld %ld %e\n", (long)i, (long)j, A );
}
/**
* SPM subroutines
*/
int spmLoad( pastix_spm_t *spm, FILE *infile );
int spmSave( pastix_spm_t *spm, FILE *outfile );
void spmPrint( FILE *f, const pastix_spm_t *spm );
int spmGenRHS(int type, int nrhs, const pastix_spm_t *spm, void *x, int ldx, void *b, int ldb );
int spmCheckAxb( int nrhs, const pastix_spm_t *spm, void *x0, int ldx0, void *b, int ldb, const void *x, int ldx );
void spmInit( pastix_spm_t *spm );
void spmExit( pastix_spm_t *spm );
pastix_spm_t *spmCopy( const pastix_spm_t *spm );
void spmBase( pastix_spm_t *spm, int baseval );
void spmUpdateComputedFields( pastix_spm_t *spm );
int spmConvert( int ofmttype, pastix_spm_t *ospm );
void * spm2Dense( const pastix_spm_t *spm );
pastix_int_t spmFindBase( const pastix_spm_t *spm );
double spmNorm( int ntype, const pastix_spm_t *spm );
int spmMatVec(const pastix_trans_t trans, const void *alpha, const pastix_spm_t *spm, const void *x, const void *beta, void *y );
void spmScal( const pastix_complex64_t alpha, pastix_spm_t* spm );
int spmSort( pastix_spm_t *spm );
pastix_int_t spmMergeDuplicate( pastix_spm_t *spm );
pastix_int_t spmSymmetrize( pastix_spm_t *spm );
pastix_spm_t *spmCheckAndCorrect( pastix_spm_t *spm );
/**
* SPM multi-dof subroutines
*/
pastix_spm_t *spmExpand(const pastix_spm_t* spm);
pastix_spm_t *spmDofExtend( const int type, const int dof, const pastix_spm_t *spm );
/**
* SPM read driver access
* @}
*/
int spmReadDriver( pastix_driver_t driver,
char *filename,
pastix_spm_t *spm,
MPI_Comm pastix_comm );
#endif /* _SPM_H_ */
......@@ -67,15 +67,24 @@ spmIntConvert( pastix_int_t n, int *input )
/**
*******************************************************************************
*
* @fn void spmIntSort1Asc1(void * const pbase, const pastix_int_t n);
* @ingroup pastix_spm_dev
*
* @brief Sorts in ascending order array of element composed of one single
* Sorts in ascending order array of element composed of one single
* pastix_int_t with a single key value.
*
*******************************************************************************
*
* @param[in,out] pbase
* Pointer to the array of integers to sort.
*
* @param[in] n
* The number of elements in the array.
*
*******************************************************************************
*/
#define INTSORTNAME spmIntSort1Asc1
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define INTSORTNAME spmIntSort1Asc1
#define INTSORTSIZE (sizeof (pastix_int_t))
#define INTSORTSWAP(p,q) do { \
pastix_int_t t; \
......@@ -94,15 +103,24 @@ spmIntConvert( pastix_int_t n, int *input )
/**
*******************************************************************************
*
* @fn void spmIntSort2Asc1(void * const pbase, const pastix_int_t n);
* @ingroup pastix_spm_dev
*
* @brief Sorts in ascending order array of element composed of two
* Sorts in ascending order array of element composed of two
* pastix_int_t by ascending order. The first value is used as key.
*
*******************************************************************************
*
* @param[in,out] pbase
* Pointer to the array of couple of integers to sort.
*
* @param[in] n
* The number of elements in the array.
*
*******************************************************************************
*/
#define INTSORTNAME spmIntSort2Asc1
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define INTSORTNAME spmIntSort2Asc1
#define INTSORTSIZE (2 * sizeof (pastix_int_t))
#define INTSORTSWAP(p,q) do { \
pastix_int_t t, u; \
......@@ -124,15 +142,27 @@ spmIntConvert( pastix_int_t n, int *input )
/**
*******************************************************************************
*
* @fn void spmIntSort3Asc1(void * const pbase, const pastix_int_t n);
* @ingroup pastix_spm_dev
*
* @brief Sorts in ascending order array of element composed of three
* pastix_int_t by ascending order. The first value is used as key.
*
*******************************************************************************
*
* @param[in,out] pbase
* Pointer to the array of triplet of integers to sort.
*
* @param[in] n
* The number of elements in the array.
*
*******************************************************************************
*/
#define INTSORTNAME spmInt_intSort3Asc1
/* Declare here for now, because unused */
void spmIntSort3Asc1(void *const pbase, const pastix_int_t n);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define INTSORTNAME spmIntSort3Asc1
#define INTSORTSIZE (3 * sizeof (pastix_int_t))
#define INTSORTSWAP(p,q) do { \
pastix_int_t t, u, v; \
......@@ -157,15 +187,23 @@ spmIntConvert( pastix_int_t n, int *input )
/**
*******************************************************************************
*
* @fn void spmIntSort2Asc2(void * const pbase, const pastix_int_t n);
* @ingroup pastix_spm_dev
*
* @brief Sorts in ascending order array of element composed of two
* pastix_int_t by ascending order. Both values are used as key.
*
*******************************************************************************
*
* @param[in,out] pbase
* Pointer to the array of couple of integers to sort.
*
* @param[in] n
* The number of elements in the array.
*
*******************************************************************************
*/
#define INTSORTNAME spmIntSort2Asc2
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define INTSORTNAME spmIntSort2Asc2
#define INTSORTSIZE (2 * sizeof (pastix_int_t))
#define INTSORTSWAP(p,q) do { \
pastix_int_t t, u; \
......@@ -187,6 +225,7 @@ spmIntConvert( pastix_int_t n, int *input )
/**
*******************************************************************************
*
* @fn void spmIntMSortIntAsc(void ** const pbase, const pastix_int_t n);
* @ingroup pastix_spm_dev
*
* @brief Sort 2 arrays simultaneously, the first array is an array of
......@@ -194,9 +233,20 @@ spmIntConvert( pastix_int_t n, int *input )
* other array of pastix_int_t used as secondary key.
*
*******************************************************************************
*
* @param[in,out] pbase
* Array of pointers to the arrays of integers to sort.
*
* @param[in] n
* The number of elements in the array.
*
*******************************************************************************
*/
#define INTSORTNAME spmIntMSortIntAsc
/* Declare here for now, because unused */
void spmIntMSortIntAsc(void ** const pbase, const pastix_int_t n);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define INTSORTNAME spmIntMSortIntAsc
#define INTSORTSIZE(x) (sizeof (pastix_int_t))
#define INTSORTNTAB 2
#define INTSORTSWAP(p,q) do { \
......@@ -208,7 +258,7 @@ spmIntConvert( pastix_int_t n, int *input )
t = *((pastix_int_t *) (p)); \
*((pastix_int_t *) (p)) = *((pastix_int_t *) (q)); \
*((pastix_int_t *) (q)) = t; \
/* swap on secont integer array */ \
/* swap on second integer array */ \
t = int2ptr[disp_p]; \
int2ptr[disp_p] = int2ptr[disp_q]; \
int2ptr[disp_q] = t; \
......@@ -228,16 +278,27 @@ spmIntConvert( pastix_int_t n, int *input )
/**
*******************************************************************************
*
* @fn void spmIntMSortSmallIntAsc(void **const pbase, const pastix_int_t n);
* @ingroup pastix_spm_dev
*
* @brief Sort 2 arrays simultaneously, the first array is an array of
* pastix_int_t and used as primary key for sorting. The second array is an
* other array of pastix_int_t used as secondary key.
*
*******************************************************************************
*
* @param[in,out] pbase
* Array of pointers to the arrays of integers to sort.
*
* @param[in] n
* The number of elements in the array.
*
*******************************************************************************
*/
#define INTSORTNAME spmIntMSortSmallIntAsc
/* Declare here for now, because unused */
void spmIntMSortSmallIntAsc(void ** const pbase, const pastix_int_t n);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
#define INTSORTNAME spmIntMSortSmallIntAsc
#define INTSORTSIZE(x) (sizeof (int))
#define INTSORTNTAB 2
#define INTSORTSWAP(p,q) do { \
......
/**
* @file drivers.c
* @file spm_read_driver.c
*
* $COPYRIGHTS$
* PaStiX spm routines
* PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest,
* LaBRI, University of Bordeaux 1 and IPB.
*
* @version 1.0.0
* @author Mathieu Faverge
......@@ -39,6 +41,7 @@
* = PastixDriverMM
* = PastixDriverLaplacian
* = PastixDriverXLaplacian
* = PastixDriverGraph
*
* @param[in] filename
* The name of the file that stores the matrix (see driver)
......@@ -75,19 +78,12 @@ spmReadDriver( pastix_driver_t driver,
MPI_Comm_rank( comm, &mpirank );
}
if ( (mpirank == 0) ||
(driver == PastixDriverLaplacian) ||
(driver == PastixDriverCSCD) ||
(driver == PastixDriverBRGMD) ||
(driver == PastixDriverDMM) )
if ( mpirank == 0 )
{
switch(driver)
{
case PastixDriverCCC:
case PastixDriverRCC:
case PastixDriverOlaf:
case PastixDriverPeer:
fprintf(stderr, "driver: Driver not implemented\n");
case PastixDriverRSA:
readRSA( filename, spm );
break;
case PastixDriverHB:
......@@ -106,25 +102,6 @@ spmReadDriver( pastix_driver_t driver,
readMM( filename, spm );
break;
case PastixDriverDMM:
printf("driver: DistributedMatrixMarket file: %s\n", filename);
//readMMD( filename, spm );
break;
case PastixDriverPetscS:
case PastixDriverPetscU:
case PastixDriverPetscH:
printf("driver: PETSc file: %s\n", filename);
//readPETSC( filename, spm );
if (driver == PastixDriverPetscS) spm->mtxtype = PastixSymmetric;
if (driver == PastixDriverPetscH) spm->mtxtype = PastixHermitian;
break;
case PastixDriverCSCD:
printf("driver CSCd file: %s\n", filename);
//readCSCD( filename, spm, rhs, comm );
break;
case PastixDriverLaplacian:
if (mpirank == 0)
printf("driver Laplacian: %s\n", filename);
......@@ -168,126 +145,11 @@ spmReadDriver( pastix_driver_t driver,
#endif
break;
case PastixDriverRSA:
default:
readRSA( filename, spm );
fprintf(stderr, "driver: Driver not implemented\n");
}
}
/* #ifndef TYPE_COMPLEX */
/* if (*type) */
/* if ((*type)[1] == 'H') */
/* (*type)[1] = 'S'; */
/* #endif */
/* /\* read RHS file *\/ */
/* if (mpirank == 0) */
/* { */
/* FILE *file; */
/* char filename2[256]; */
/* pastix_int_t i; */
/* double re; */
/* sprintf(filename2,"%s.rhs",filename); */
/* fprintf(stderr,"open RHS file : %s\n",filename2); */
/* file = fopen(filename2,"r"); */
/* if (file==NULL) */
/* { */
/* fprintf(stderr,"cannot load %s\n", filename2); */
/* } */
/* else */
/* { */
/* *rhs = (pastix_complex64_t *) malloc((*ncol)*sizeof(pastix_complex64_t)); */
/* for (i = 0; i < *ncol; i++) */
/* { */
/* (*rhs)[i] = 0.0; */
/* if (1 != fscanf(file,"%lg\n", &re)) */
/* { */
/* fprintf(stderr, "ERROR: reading rhs(%ld)\n", (long int)i); */
/* exit(1); */
/* } */
/* (*rhs)[i] = (pastix_complex64_t)re; */
/* } */
/* fclose(file); */
/* } */
/* } */
/* if (*rhs == NULL && ( mpirank == 0 || */
/* driver_type == LAPLACIAN) && */
/* driver_type != CSCD && driver_type != FDUP_DIST && driver_type != MMD) */
/* { */
/* *rhs = (pastix_complex64_t *) malloc((*ncol)*sizeof(pastix_complex64_t)); */
/* pastix_int_t i,j; */
/* for (i = 0; i < *ncol; i++) */
/* (*rhs)[i] = 0.0; */
/* #ifdef TYPE_COMPLEX */
/* fprintf(stdout, "Setting right-hand-side member such as X[i] = i + i*I\n"); */
/* #else */
/* fprintf(stdout, "Setting right-hand-side member such as X[i] = i\n"); */
/* #endif */
/* for (i = 0; i < *ncol; i++) */
/* { */
/* for (j = (*colptr)[i] -1; j < (*colptr)[i+1]-1; j++) */
/* { */
/* #ifdef TYPE_COMPLEX */
/* (*rhs)[(*rows)[j]-1] += (i+1 + I*(i+1))*(*values)[j]; */
/* #else */
/* (*rhs)[(*rows)[j]-1] += (i+1)*(*values)[j]; */
/* #endif */
/* if (MTX_ISSYM((*type)) && i != (*rows)[j]-1) */
/* { */
/* #ifdef TYPE_COMPLEX */
/* (*rhs)[i] += ((*rows)[j] + (*rows)[j] * I)*(*values)[j]; */
/* #else */
/* (*rhs)[i] += ((*rows)[j])*(*values)[j]; */
/* #endif */
/* } */
/* } */
/* } */
/* } */
/* if (driver_type == CSCD || driver_type == FDUP_DIST || driver_type == MMD) */
/* { */
/* pastix_int_t i,j; */
/* pastix_int_t N; */
/* pastix_int_t send[2], recv[2]; */
/* int comm_size; */
/* MPI_Comm_size(comm,&comm_size); */
/* send[0] = *ncol; */
/* send[1] = 0; */
/* if (*ncol != 0 && *rhs == NULL) */
/* send[1] = 1; */
/* MPI_Allreduce(send, recv, 2, PASTIX_MPI_INT, MPI_SUM, comm); */
/* N = recv[0]; */
/* if (recv[1] > 0) */
/* { */
/* pastix_complex64_t *RHS; */
/* pastix_complex64_t *RHS_recv; */
/* RHS = (pastix_complex64_t *) malloc((N)*sizeof(pastix_complex64_t)); */
/* for (i = 0; i < N; i++) */
/* (RHS)[i] = 0.0; */
/* if (mpirank == 0) */
/* fprintf(stdout, "Setting RHS such as X[i] = i\n"); */
/* for (i = 0; i < *ncol; i++) */
/* { */
/* for (j = (*colptr)[i] -1; j < (*colptr)[i+1]-1; j++) */
/* { */
/* (RHS)[(*rows)[j]-1] += ((*loc2glob)[i])*(*values)[j]; */
/* if (MTX_ISSYM((*type)) && i != (*rows)[j]-1) */
/* (RHS)[(*loc2glob)[i]-1] += ((*rows)[j])*(*values)[j]; */
/* } */
/* } */
/* RHS_recv = (pastix_complex64_t *) malloc((N)*sizeof(pastix_complex64_t)); */
/* MPI_Allreduce(RHS, RHS_recv, N, PASTIX_MPI_FLOAT, MPI_SUM, comm); */
/* free(RHS); */
/* *rhs = (pastix_complex64_t *) malloc((*ncol)*sizeof(pastix_complex64_t)); */
/* for (i = 0; i < *ncol; i++) */
/* (*rhs)[i] = RHS_recv[(*loc2glob)[i]-1]; */
/* } */
/* } */
if ( mpiinit )
{
pastix_int_t nnz;
......@@ -309,15 +171,11 @@ spmReadDriver( pastix_driver_t driver,
spm->values = (void *) malloc(nnz * pastix_size_of( spm->flttype ));
spm->loc2glob = NULL;
spm->loc2glob = NULL;
/* spm->rhs = (void *) malloc((*ncol)*sizeof(pastix_complex64_t)); */
/* spm->type = (char *) malloc(4*sizeof(char)); */
}
MPI_Bcast( spm->colptr, spm->gN+1, PASTIX_MPI_INT, 0, comm );
MPI_Bcast( spm->rowptr, nnz, PASTIX_MPI_INT, 0, comm );
MPI_Bcast( spm->values, nnz * pastix_size_of( spm->flttype ), MPI_CHAR, 0, comm );
/* MPI_Bcast(*rhs, *ncol, PASTIX_MPI_FLOAT, 0, comm); */
/* MPI_Bcast(*type, 4, MPI_CHAR, 0, comm); */
}
spmUpdateComputedFields( spm );
......
......@@ -21,7 +21,7 @@
/**
* Integer routines
*/
int z_spmIntSortAsc(void ** const pbase, const pastix_int_t n);
void z_spmIntSortAsc(void ** const pbase, const pastix_int_t n);
/**
* Conversion routines
......
/**
*
* @file z_spm_integers.c
* @file z_spm_integer.c
*
* PaStiX spm routines
* PaStiX is a software package provided by Inria Bordeaux - Sud-Ouest,
......@@ -24,14 +24,24 @@
/**
*******************************************************************************
*
* @fn void z_spmIntSortAsc(void ** const pbase, const pastix_int_t n)
* @ingroup pastix_spm_dev
*
* @brief Sort 2 arrays simultaneously, the first array is an array of
* pastix_int_t and used as key for sorting. The second array is an array of
* pastix_complex64_t.
*
*******************************************************************************
*
* @param[in,out] pbase
* Couple of pointers to an array of integers and to an array of
* pastix_complex64_t to sort.
*
* @param[in] n
* The number of elements in the array.
*
*******************************************************************************
*/
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static size_t intsortsize[2] = { sizeof(pastix_int_t), sizeof(pastix_complex64_t) };
#define INTSORTNAME z_spmIntSortAsc
#define INTSORTSIZE(x) (intsortsize[x])
......@@ -58,4 +68,5 @@ static size_t intsortsize[2] = { sizeof(pastix_int_t), sizeof(pastix_complex64_t
#undef INTSORTSWAP
#undef INTSORTCMP
#undef INTSORTNTAB
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment