Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29007 Discussions

error #6946: In this DATA statement, there are more values assigned to variables then there are vari

chaitali495
Beginner
332 Views

I am trying to compile F77 source code. I am getting below errors, 

Compiler : Intel 2020

mpiifort --version
ifort (IFORT) 19.1.3.304 20200925
Copyright (C) 1985-2020 Intel Corporation. All rights reserved.



---------------------------------------------------------------------------------------------------------
mpiifort -mkl -Dsnap_tracer -Dparallel_processing -Dvar3d_snapshots -Dmckinley_biology -Dfrom_restart -Ddic_restore -Dphosp_restore -Disopycmix -Dgm_isopyc_mixing -Dconsthmix -Dkpp_mixing -Dsmagorinsky -Dbryan_lewis -Dimpl_vmix -Docmip_dic -Dinitialize_dic -Dinitialize_phosp -Dinitialize_alk -Dalk_restore -Dinitialize_dop -Dinterannual -Ddaily_u10_v10 -Dshape_japan_artificially -Dvar_resolution -Dnormalized_sst -I/home/apps/WRF/wrf_libs_intel2020/deps_intel2020.4.304/include -g -traceback -extend-source 132 -O3 -c -o advection.o advection.F
./param.h(168): error #6946: In this DATA statement, there are more values assigned to variables then there are variables. There must be the same number of values and variables. ['ALKT']
data var3d_char /"DICT", "FLUX", "PHOS", "ALKT", "DOPT" ,"JBIO"/
-------------------------------------------------^
./param.h(169): error #6946: In this DATA statement, there are more values assigned to variables then there are variables. There must be the same number of values and variables. ['m/m3']
data var3d_units /"m/m3", "m/m2", "m/m3", "m/m3", "m/m3", "mm3s"/
--------------------------------------------------^
./latitude.h(56): error #6946: In this DATA statement, there are more values assigned to variables then there are variables. There must be the same number of values and variables. [1.124951]
&0.3750492, 0.6249508, 0.8750492, 1.124951, 1.375049,
---------------------------------------^
compilation aborted for advection.F (code 1)
make: *** [<builtin>: advection.o] Error 1

-------------------------------------------------------------------------------------------------------------

I am attaching the fortan file and header files.
Please help me to resolve this error 

Regards,
Chaitali

0 Kudos
1 Solution
Arjen_Markus
Honored Contributor II
314 Views

Note that if you include source code (fragments) in a post you can format it nicely via the </> icon that is often hidden under the "..." icon. It makes reading the code clearer.

The error messages are quite clear and you may not have encountered them with older compilers, because compilers get better at checking code all the time ;).

I tried to see the definition of var3d_char, but that is an array of nvar3d elements - the value of nvar3d is not included it appears in the code you posted (in size.h?) The number of data in the DATA statement should match the value of nvar3d.

View solution in original post

1 Reply
Arjen_Markus
Honored Contributor II
315 Views

Note that if you include source code (fragments) in a post you can format it nicely via the </> icon that is often hidden under the "..." icon. It makes reading the code clearer.

The error messages are quite clear and you may not have encountered them with older compilers, because compilers get better at checking code all the time ;).

I tried to see the definition of var3d_char, but that is an array of nvar3d elements - the value of nvar3d is not included it appears in the code you posted (in size.h?) The number of data in the DATA statement should match the value of nvar3d.

Reply