Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
2 Views

Some real,save variable in module lost its value after called

Hi.
I have a fortran program(with large array):
module  icon
        real,save :: theta0,estart,zstart
endmodule icon
It works well gfortran, bu if it compiled with Intel compiler 2018.update3 or 2015, the estart variable losts its value when called in other subroutine.
 
if I have added a new variable tmpestart, the tmpestart has its value correctly.
module  icon
        real,save :: theta0,estart,zstart,tmpestart
endmodule icon

Can you help me how to deal with it or is this a Intel compiler bug?

Thank you very much.

0 Kudos
2 Replies
Highlighted
Valued Contributor I
2 Views

This is not a complete

This is not a complete example of your problem, you mention a large array but there are no arrays shown. We do not know where and when you set the values for your module variables. You mention subroutines but there are no subroutines shown. 

0 Kudos
Highlighted
Beginner
2 Views

The reason is during some

The reason is during some arrays out of bounds.

Compiled with -check bounds can find the array.

 

0 Kudos