hello,
I got the error message:
../../../../src/code_saturne-4.0.8/src/base/cs_field.c:987: Fatal error.
Fortran pointer of rank 1 requested for values of field "velocity",
which have rank 2.
How can i fix it please ?
Fortran pointer of rank 1 requested for values of field "velocity", which have rank 2
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4070
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Fortran pointer of rank 1 requested for values of field "velocity", which have rank 2
Hello,
Are you using user subroutines ?
Regards,
Yvan
Are you using user subroutines ?
Regards,
Yvan
Re: Fortran pointer of rank 1 requested for values of field "velocity", which have rank 2
Yes, and i have already check if i have the good syntax for the call of the velocity field in my subroutine file.
If i have understood correctly:
field_get_val_s for scalar
field_get_val_v for vector
are there an conflict between the id fields ?
subroutine 1:
call field_get_val_s(ivarfl(isca(1)), x_var) ! champ X
call field_get_val_s(ivarfl(isca(2)), y_var) ! champ Y
call field_get_val_s(ivarfl(isca(3)), z_var) ! champ Z
call field_get_val_v(ivarfl(iu), cvar_vel)
subroutine 2:
call field_get_val_s(icrom, crom) ! champ w
call field_get_val_s(ivarfl(ivart), cvar_vart)
call field_get_val_s(ivarfl(isca(1)), x_var) ! champ x
call field_get_val_s(ivarfl(isca(2)), y_var) ! champ y
call field_get_val_s(ivarfl(isca(3)), z_var) ! champ z
call field_get_val_s(iprpfl(itempc), pro_tempc)
If i have understood correctly:
field_get_val_s for scalar
field_get_val_v for vector
are there an conflict between the id fields ?
subroutine 1:
call field_get_val_s(ivarfl(isca(1)), x_var) ! champ X
call field_get_val_s(ivarfl(isca(2)), y_var) ! champ Y
call field_get_val_s(ivarfl(isca(3)), z_var) ! champ Z
call field_get_val_v(ivarfl(iu), cvar_vel)
subroutine 2:
call field_get_val_s(icrom, crom) ! champ w
call field_get_val_s(ivarfl(ivart), cvar_vart)
call field_get_val_s(ivarfl(isca(1)), x_var) ! champ x
call field_get_val_s(ivarfl(isca(2)), y_var) ! champ y
call field_get_val_s(ivarfl(isca(3)), z_var) ! champ z
call field_get_val_s(iprpfl(itempc), pro_tempc)
-
- Posts: 4070
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Fortran pointer of rank 1 requested for values of field "velocity", which have rank 2
Hello,
Did you check the definition/declaration of cvar_vel ? It should have dimension(:,:) and not dimension(:).
Regards,
Yvan
Did you check the definition/declaration of cvar_vel ? It should have dimension(:,:) and not dimension(:).
Regards,
Yvan
Re: Fortran pointer of rank 1 requested for values of field "velocity", which have rank 2
It's seems to be correct:
double precision, dimension(:,:), pointer :: cvar_vel
double precision, dimension(:,:), pointer :: cvar_vel
-
- Posts: 4070
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Fortran pointer of rank 1 requested for values of field "velocity", which have rank 2
Hello,
Do you have a backtrace ? The error is probably due to some wrong value of ivarfl(j) where j might match an array not used here.
Using the "get_by_name" varients of the field access functions would be safer here (but I am not sure they were present in Code_Saturne v4.0).
Regards,
Yvan
Do you have a backtrace ? The error is probably due to some wrong value of ivarfl(j) where j might match an array not used here.
Using the "get_by_name" varients of the field access functions would be safer here (but I am not sure they were present in Code_Saturne v4.0).
Regards,
Yvan
Re: Fortran pointer of rank 1 requested for values of field "velocity", which have rank 2
When i try to remove this line, i always have the same error.
../../../../src/code_saturne-4.0.8/src/base/cs_field.c:987: Fatal error.
Fortran pointer of rank 1 requested for values of field "velocity",
which have rank 2.
../../../../src/code_saturne-4.0.8/src/base/cs_field.c:987: Fatal error.
Fortran pointer of rank 1 requested for values of field "velocity",
which have rank 2.
-
- Posts: 4070
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Fortran pointer of rank 1 requested for values of field "velocity", which have rank 2
Hello,
I do not have enough information to work with to provide relevant suggestions.
Regards,
Yvan
I do not have enough information to work with to provide relevant suggestions.
Regards,
Yvan
Re: Fortran pointer of rank 1 requested for values of field "velocity", which have rank 2
In attachements file: compile and error log file.
When i remove the problematic subroutine file (cs user extra operation),
the compilation works.
best regards,
When i remove the problematic subroutine file (cs user extra operation),
the compilation works.
best regards,
- Attachments
-
- error.txt
- (781 Bytes) Downloaded 159 times
-
- compile.log
- (21.56 KiB) Downloaded 159 times
-
- Posts: 4070
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Fortran pointer of rank 1 requested for values of field "velocity", which have rank 2
Hello,
This is still not sufficient information to work with.
Regards,
Yvan
This is still not sufficient information to work with.
Regards,
Yvan