Skip to content

Commit

Permalink
Update supermatrix.h and superlu_enum_const.h to the new ones in supe…
Browse files Browse the repository at this point in the history
…rlu_dist
  • Loading branch information
xiaoyeli committed Sep 29, 2021
1 parent 20cb2bc commit 0e08344
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
4 changes: 3 additions & 1 deletion SRC/superlu_enum_consts.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ at the top-level directory.
#ifndef __SUPERLU_ENUM_CONSTS /* allow multiple inclusions */
#define __SUPERLU_ENUM_CONSTS

#define LargeDiag_AWPM LargeDiag_HWPM /* backward compatibility */

/***********************************************************************
* Enumerate types
***********************************************************************/
typedef enum {NO, YES} yes_no_t;
typedef enum {DOFACT, SamePattern, SamePattern_SameRowPerm, FACTORED} fact_t;
typedef enum {NOROWPERM, LargeDiag_MC64, LargeDiag_AWPM, MY_PERMR} rowperm_t;
typedef enum {NOROWPERM, LargeDiag_MC64, LargeDiag_HWPM, MY_PERMR} rowperm_t;
typedef enum {NATURAL, MMD_ATA, MMD_AT_PLUS_A, COLAMD,
METIS_AT_PLUS_A, PARMETIS, ZOLTAN, MY_PERMC} colperm_t;
typedef enum {NOTRANS, TRANS, CONJ} trans_t;
Expand Down
34 changes: 23 additions & 11 deletions SRC/supermatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,20 +188,32 @@ typedef struct {
} NRformat_loc;


/* Data structure for storing 3D matrix on layer 0 of the 2D process grid */
/* Data structure for storing 3D matrix on layer 0 of the 2D process grid
Only grid-0 has meanful values of these data structures. */
typedef struct NRformat_loc3d
{
NRformat_loc* A_nfmt;
void* B3d; // on the entire 3D process grid
int ldb;
NRformat_loc *A_nfmt; // Gathered A matrix on 2D grid-0
void *B3d; // on the entire 3D process grid
int ldb; // relative to 3D process grid
int nrhs;
int m_loc;
void* B2d; // on 2D process layer Grid_0

int* row_counts_int; // these counts are for {A, B} distributed on 2D layer 0
int* row_disp;
int* b_counts_int;
int* b_disp;
int m_loc; // relative to 3D process grid
void *B2d; // on 2D process layer grid-0

int *row_counts_int; // these counts are stored on 2D layer grid-0,
int *row_disp; // but count the number of {A, B} rows along Z-dimension
int *nnz_counts_int;
int *nnz_disp;
int *b_counts_int;
int *b_disp;

/* The following 4 structures are used for scattering
solution X from 2D grid-0 back to 3D processes */
int num_procs_to_send;
int *procs_to_send_list;
int *send_count_list;
int num_procs_to_recv;
int *procs_recv_from_list;
int *recv_count_list;
} NRformat_loc3d;


Expand Down

0 comments on commit 0e08344

Please sign in to comment.