Re: [petsc-users] Error during code compile with MATGETOWNERSHIPRANGE

2024-08-25 Thread TAY Wee Beng
Hi Barry, Thanks, I'll try later. Back to using 3.20.6 which is working 1st. On 22/8/2024 10:39 pm, Barry Smith wrote:   Hmm, try using a standalone variable   PetscReal value   value = int_impl(k,5)] call MatSetValues(A_mat_uv,[ione],II,[ione],[value],impl_mat_A,INSERT_VALUES,ierr) u

Re: [petsc-users] Error during code compile with MATGETOWNERSHIPRANGE

2024-08-22 Thread Barry Smith
Hmm, try using a standalone variable PetscReal value value = int_impl(k,5)] > call > MatSetValues(A_mat_uv,[ione],II,[ione],[value],impl_mat_A,INSERT_VALUES,ierr) > unfortunately Fortan compilers in this situation are not good at telling us exactly what argument is giving

Re: [petsc-users] Error during code compile with MATGETOWNERSHIPRANGE

2024-08-22 Thread TAY Wee Beng
On 22/8/2024 10:28 pm, Barry Smith wrote:   Should be PetscReal as it is a numerical value. Ok, I changed it but I still get the same error. On Aug 22, 2024, at 9:55 AM, TAY Wee Beng wrote: On 22/8/2024 9:54 pm, Barry Smith wrote:   What is int_impl(k,5) defined type? PetscInt On

Re: [petsc-users] Error during code compile with MATGETOWNERSHIPRANGE

2024-08-22 Thread Barry Smith
Should be PetscReal as it is a numerical value. > On Aug 22, 2024, at 9:55 AM, TAY Wee Beng wrote: > > > > On 22/8/2024 9:54 pm, Barry Smith wrote: >> >> What is int_impl(k,5) defined type? > PetscInt >> >>> On Aug 22, 2024, at 9:45 AM, TAY Wee Beng >>> wrot

Re: [petsc-users] Error during code compile with MATGETOWNERSHIPRANGE

2024-08-22 Thread TAY Wee Beng
On 22/8/2024 9:54 pm, Barry Smith wrote:   What is int_impl(k,5) defined type? PetscInt On Aug 22, 2024, at 9:45 AM, TAY Wee Beng wrote: Hi Barry, Do you mean that I change from: call MatSetValues(A_mat_uv,ione,II,ione,int_impl(k,5),impl_mat_A,INSERT_VALUES,ierr) to call MatSetValu

Re: [petsc-users] Error during code compile with MATGETOWNERSHIPRANGE

2024-08-22 Thread Barry Smith
What is int_impl(k,5) defined type? > On Aug 22, 2024, at 9:45 AM, TAY Wee Beng wrote: > > Hi Barry, > > Do you mean that I change from: > > call > MatSetValues(A_mat_uv,ione,II,ione,int_impl(k,5),impl_mat_A,INSERT_VALUES,ierr) > > to > > call > MatSetValues(A_mat_uv,[ione],II,[ione],[i

Re: [petsc-users] Error during code compile with MATGETOWNERSHIPRANGE

2024-08-22 Thread TAY Wee Beng
Hi Barry, Do you mean that I change from: call MatSetValues(A_mat_uv,ione,II,ione,int_impl(k,5),impl_mat_A,INSERT_VALUES,ierr) to call MatSetValues(A_mat_uv,[ione],II,[ione],[int_impl(k,5)],impl_mat_A,INSERT_VALUES,ierr) ? I did it but the error is still there. On 22/8/2024 9:40 pm, Bar

Re: [petsc-users] Error during code compile with MATGETOWNERSHIPRANGE

2024-08-22 Thread Barry Smith
Fortran 90 type checking is very tight; The dimension of the array, or scalar passed as arguments must match the expected dimension (f77 did not do this type checking). Thus the ione argument must be a 1-d array as well as the numerical values so do > call > MatSetValues(A_mat_uv,[ione],I

Re: [petsc-users] Error during code compile with MATGETOWNERSHIPRANGE

2024-08-21 Thread Barry Smith
You must declare as PetscInt ksta_p,kend_p Perhaps they are declared as arrays? > On Aug 21, 2024, at 11:19 AM, TAY Wee Beng wrote: > > Hi, > > I am using the latest PETSc thru github. I compiled both the debug and rel > ver of PETSc w/o problem. > > I then use it with my CFD code a