Quantcast
Channel: Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2583

bug report- write statement have no idea of some bounds of multi-dim allocatable var

$
0
0

hi, I'm using the ifort 14.0.0 20130728

I found a possible bug of this version. 

when some allocatable variable has a non-1 lower bound, for some elements(not all) of this allocated variable, the write() statement do not know what's the true lower bound, it will use '1' instead. so when you write something like "write(*,*) a(:,0,1)", you get some strange answer. however if you use  something like "write(*,*) a(1:6,0,1)" which strictly defines the first dimension, the answer is correct.

the funny thing is, this kind of wrong answer is very rare, in most cases the compiler get the correct bounds. so I didn't realize it is maybe it is related to the compiler.

I cannot reproduce it in a normal simple code, so I upload my original code here.

be aware of line 111,112 and 132-137

on our sever here, it will write 0.0E0 for the first output at line 112

output at 128 of "meanstrain" is also always 0 whatever the true data is

 

 

 

 

 

 

 

 

AttachmentSize
Downloadextracstress.f905.01 KB

Viewing all articles
Browse latest Browse all 2583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>