Change in some interfaces (i8 integers) between 2.8.1 and 2.9.0
This was discussed in an ELSI meeting in late 2021, but I have found no mention or warning in the manual or in the changelog file.
Some arguments of, for example, elsi_set_csc, have been turned into i8 integers:
diff --git a/src/elsi_setup.f90 b/src/elsi_setup.f90
index 85659294..28637632 100644
--- a/src/elsi_setup.f90
+++ b/src/elsi_setup.f90
@@ -255,11 +255,11 @@ subroutine elsi_set_csc(eh,nnz_g,nnz_l,n_lcol,row_ind,col_ptr)
implicit none
type(elsi_handle), intent(inout) :: eh !< Handle
- integer(kind=i4), intent(in) :: nnz_g !< Global number of nonzeros
- integer(kind=i4), intent(in) :: nnz_l !< Local number of nonzeros
+ integer(kind=i8), intent(in) :: nnz_g !< Global number of nonzeros
+ integer(kind=i8), intent(in) :: nnz_l !< Local number of nonzeros
integer(kind=i4), intent(in) :: n_lcol !< Local number of columns
integer(kind=i4), intent(in) :: row_ind(nnz_l) !< Row index
- integer(kind=i4), intent(in) :: col_ptr(n_lcol+1) !< Column pointer
+ integer(kind=i8), intent(in) :: col_ptr(n_lcol+1) !< Column pointer
......
This was motivated by the possible overflow of matrix sizes in single-node runs with large numbers of orbitals.
The problem is that now client codes (e.g. Siesta) need to have different invocations of elsi_set_csc (and other routines) depending on the exact version of ELSI being used.
I can think of a way to avoid that: provide a "generic" interface for elsi_set_csc (and the other updated routines), with two versions, one with i4 integers, and the other with (some) i8 integers.
If this is too much of a burden on the developers, I can suggest at least another mechanism to facilitate these kinds of transitions: provide a include/elsi_fortran.h
file whose contents can be used (by inclusion during pre-processing) by client codes at compile time. If there is, say, an entry of the form
#define ELSI_HAS_i8_INTS_INTERFACES
then the client code can act accordingly.
Obviously, the mere existence of that file is a break with previous versions, but at least its existence can be checked, and once it is there a number of useful bits of information could be found.