-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for 64-bit ints. #54
Conversation
…eros) field and `rowind`, `colind` (row and column indicies) in storage structures have been updated, as have all computational functions (e.g. zgstrf), and utility functions (e.g. sp_coletree). Also updated are memory functions, guaranteeing that the correct size is allocated. In practice, this requires updating a huge number of functions to guarantee correctness and minimise typecasts. Some typecasts have been added, where integer overflow is unlikely (e.g. `colamd`, and also to BLAS functions[1]). This is achieved by the typedef: ``` /* Define my integer type int_t */ typedef long long int int_t; typedef int int_t; /* default */ ``` `int_t` can then be selected at compile-time via the cmake option `-Denable_longints`. When compiled with this flag on this library is API breaking and any library which depends on SuperLU (e.g. armadillo, scipy) will need to be updated to use `long long int` where relevant. In practice this should be straightforward [2]. [1] Note: there are some BLAS calls wrapped in e.g. CRAY ifdefs that I *haven't* added typecasts to because I can't test and also don't expect CRAY to ever need int64. [2] A patch for armadillo is under preparation and currently stands at `8 files changed, 109 insertions(+), 90 deletions(-)`.
SRC/dutil.c
Outdated
@@ -293,15 +293,15 @@ dPrint_Dense_Matrix(char *what, SuperMatrix *A) | |||
/*! \brief Diagnostic print of column "jcol" in the U/L factor. | |||
*/ | |||
void | |||
dprint_lu_col(char *msg, int jcol, int pivrow, int *xprune, GlobalLU_t *Glu) | |||
dprint_t_lu_col(char *msg, int_t jcol, int_t pivrow, int_t *xprune, GlobalLU_t *Glu) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect replacement of int in function name.
Name of function must be "dprint_lu_col".
I've fixed the typo mentioned above, and also merged in the latest commit. At least on my end there seems to be no issues; all my tests pass. |
No, the recent patches don't seem to fix the issue. Building the latest head (0060a50) with
Setting
Needless to say the out of memory error is spurious; I can monitor memory usage and it doesn't exceed a few GB. Also, the size being printed out is incorrect because the cast from I don't have time right now to debug this in detail right now, and diffing the latest head and my fork shows quite some differences so I couldn't guess if there's an easy fix or not. |
64-bit is supported now. |
See issue #50 .
Add support for 64-bit ints. In particular, the
nnz
(number of nonzeros)field and
rowind
,colind
(row and column indices) in storagestructures have been updated, as have all computational functions
(e.g. zgstrf), and utility functions (e.g. sp_coletree). Also updated
are memory functions, guaranteeing that the correct size is allocated.
In practice, this requires updating a huge number of functions to
guarantee correctness and minimise typecasts. Some typecasts have been
added, where integer overflow is unlikely (e.g.
colamd
, and also toBLAS functions[1]).
This is achieved by the typedef:
int_t
can then be selected at compile-time via the cmake option-Denable_longints
.When compiled with this flag on this library is API breaking and any
library which depends on SuperLU (e.g. armadillo, scipy) will need to
be updated to use
long long int
where relevant. In practice thisshould be straightforward [2].
Notes:
[1] Note: there are some BLAS calls wrapped in CRAY ifdefs that I
haven't added typecasts to because I can't test and also don't expect
CRAY to ever need int64.
[2] A patch for armadillo is under preparation and currently stands at
8 files changed, 109 insertions(+), 90 deletions(-)
.