Discussion:
[petsc-users] Suuden problem compiling
TAY wee-beng
2015-10-18 16:28:16 UTC
Permalink
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
Barry Smith
2015-10-18 17:47:52 UTC
Permalink
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
Hi,
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
Loading...