Gotta love Intel Fortran error messages; and the fact that they cannot point
to the exact argument that is wrong.
The reason you are getting this is because Fortran compilers are becoming
more picky and complaining about passing a scalar when an array is expected.
I believe in the first call II is a scalar while MatSetValues expects a 1d
array of values so you can "fix" the problem by doing
PetscInt IIA(1)
IIA(1) = II
call
MatSetValues(A_semi_xyz,1,IIA,7,int_semi_xyz(ijk,1:7),semi_mat_xyz(ijk,1:7),INSERT_VALUES,ierr)
The second case has the same problem with both II and also JJ
> On Oct 18, 2015, at 11:28 AM, TAY wee-beng <[email protected]> wrote:
>
> Hi,
>
> I suddenly have problem compiling my CFD code. The error is:
>
> PETSc_solvers.F90(303): error #8284: If the actual argument is scalar, the
> dummy argument shall be scalar unless the actual argument is of type
> character or is an element of an array that is not assumed shape, pointer, or
> polymorphic. [C]
> call
> MatSetValues(A_semi_xyz,1,II,7,int_semi_xyz(ijk,1:7),semi_mat_xyz(ijk,1:7),INSERT_VALUES,ierr)
> ---------^
> PETSc_solvers.F90(525): error #8284: If the actual argument is scalar, the
> dummy argument shall be scalar unless the actual argument is of type
> character or is an element of an array that is not assumed shape, pointer, or
> polymorphic. [C]
> call
> MatSetValues(A_mat,1,II,1,JJ,big_A(ijk,kk),ADD_VALUES,ierr)
> -----------------------------^
> PETSc_solvers.F90(525): error #8284: If the actual argument is scalar, the
> dummy argument shall be scalar unless the actual argument is of type
> character or is an element of an array that is not assumed shape, pointer, or
> polymorphic. [E]
> call
> MatSetValues(A_mat,1,II,1,JJ,big_A(ijk,kk),ADD_VALUES,ierr)
> -----------------------------^
> compilation aborted for PETSc_solvers.F90 (code 1)
> make: [PETSc_solvers.o] Error 1 (ignored)
>
> I never have this error before and it was compiling ok with gnu and v3.6.2.
> Now with intel, it can't work. I wonder why...
> --
> Thank you.
>
> Yours sincerely,
>
> TAY wee-beng
>