Re: [petsc-users] Using "long int" variable in MatSetValues

2020-06-03 Thread Satish Balay via petsc-users
Its best to use PetscInt here. Satish On Tue, 2 Jun 2020, Evan Um wrote: > Hi Satish, > > Thanks for your reply. > When the code is compiled using the petsc library built with the option, an > error message suggests that I need to use 'long long' rather than 'int'. I > can replace variable

Re: [petsc-users] Using "long int" variable in MatSetValues

2020-06-03 Thread Evan Um
Hi Satish, Thanks for your reply. When the code is compiled using the petsc library built with the option, an error message suggests that I need to use 'long long' rather than 'int'. I can replace variable types with long long in my codes, but I am wondering if there is any better way. If I

Re: [petsc-users] Using "long int" variable in MatSetValues

2020-06-02 Thread Satish Balay via petsc-users
You need PetscInt to be 64-bit-integer - so rebuild PETSc with the option: --with-64-bit-indices=1 Satish On Tue, 2 Jun 2020, Evan Um wrote: > Dear PETSC users, > > Using C++, I tried to build a very large sparse matrix and had a problem > shown below. Indices of the matrix should be "long

[petsc-users] Using "long int" variable in MatSetValues

2020-06-02 Thread Evan Um
Dear PETSC users, Using C++, I tried to build a very large sparse matrix and had a problem shown below. Indices of the matrix should be "long int" rather than "int" but PETSC does not allow this. How could I dodge this problem? Thanks for your comments. Regards, Evan fe.cpp(2009): error: