Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
29317 Discussions

initialization of variable in intel fortran compiler for 64bit

pe_rasouliyahoo_com
1,897 Views

Hi everybody,

I have code which is developed initially with Fortran 90 in 32-bit. now when I compile it with 64-bit compiler, I realized that he compiler does not initialized the variable to zero and it just initialized the with weird values that resulting to wrong results in the output. how can I automatically initialized all values to zero in compilerwithout changing the source code?

Cheers,
Pejman

0 Kudos
1 Solution
ArturGuzik
Valued Contributor I
1,897 Views

thanks for the reply. I am nor sure but is it in "Tools/options/Intel Visula fortran/compilers/default otions"?

Project->Properties->Fortran->Data->Initialize Local Scalar Variables.

or add options (type) to

Project->Properties->Fortran->Data->Command Line


A.

View solution in original post

0 Kudos
5 Replies
Steven_L_Intel1
Employee
1,897 Views
You would be better off to correct the program. But otherwise, try adding the options /Qsave and /Qzero. You just got lucky on the 32-bit side as variables aren't initialized there either.
0 Kudos
pe_rasouliyahoo_com
1,897 Views
You would be better off to correct the program. But otherwise, try adding the options /Qsave and /Qzero. You just got lucky on the 32-bit side as variables aren't initialized there either.

thanks for the reply. I am nor sure but is it in "Tools/options/Intel Visula fortran/compilers/default otions"?
0 Kudos
ArturGuzik
Valued Contributor I
1,898 Views

thanks for the reply. I am nor sure but is it in "Tools/options/Intel Visula fortran/compilers/default otions"?

Project->Properties->Fortran->Data->Initialize Local Scalar Variables.

or add options (type) to

Project->Properties->Fortran->Data->Command Line


A.
0 Kudos
Steven_L_Intel1
Employee
1,897 Views
You also have to set the Data > Local Variable Storage property to "All variables SAVE".
0 Kudos
pe_rasouliyahoo_com
1,897 Views
You also have to set the Data > Local Variable Storage property to "All variables SAVE".

thank you so much!!!
0 Kudos
Reply