diff --git a/SRC/superlu_enum_consts.h b/SRC/superlu_enum_consts.h index 24a7e787..3103e46e 100644 --- a/SRC/superlu_enum_consts.h +++ b/SRC/superlu_enum_consts.h @@ -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; diff --git a/SRC/supermatrix.h b/SRC/supermatrix.h index 727e966c..1d720355 100644 --- a/SRC/supermatrix.h +++ b/SRC/supermatrix.h @@ -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;