NVIDIA / AMGX

Distributed multigrid linear solver library on GPU
486 stars 141 forks source link

Matrix with number of nonzero more than 2147483647 #318

Open kiendangtor opened 2 months ago

kiendangtor commented 2 months ago

In this call _AMGX_RC AMGX_API AMGX_matrix_upload_all(AMGX_matrix_handle mtx, int n, int nnz, int block_dimx, int block_dimy, const int row_ptrs, const int col_indices, const void data, const void diagdata); the number of nnz is int, and I have a fairly large matrix with nnz larger than the max value of int, how do we solve that issues?

marsaev commented 2 months ago

Hello @kiendangtor ,

Unfortunately that is currently not supported for a single GPU. Technically it seems that with modern GPUs it's feasible to run such matrices in a single GPU so it may make sense. AMGX actually instantiates num_rows/num_cols, num_nnz, and row_offsets, column_indices vector off the template parameter, but I haven't tried it with int64 and I believe in many places we assume int. Let me try to do test build with int64 and see if it's a lot of work to allow it - then maybe you can extend API in your local copy and make it work for your app.

kiendangtor commented 2 months ago

Thanks @marsaev i hope it will be feasible. I only need nnz to be int64 if it helps.