compiler option no out range vector

compiler option no out range vector

imagem de diedro

Hi everyone,

in the last days I have a lot of problems with my program. It seem sometimes to run randomly. I suppose tha it's a allocation problem. I saw tha sometimes does not caare about allocation in the vector. I mean if a I allocate a vector as:

ALLOCATE(VECTOR(1000))  and then i do

WRITE(*,*) vector(1001)

it runs anyway.

Is there any option in the compilation to avoid that?

Thanks a lot. 

4 posts / 0 new
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem de HeinzB (Intel)

As already mentioned in your other thread, you can use "-check bounds" or "-check all" to catch such errors at run-time. .Many of these errors would be found too by static source code analysis: See chapter 'Static Analysis' in the compiler manual. To use this feature, you must have the whole suite Intel Parallel Studio XE installed however since you need the Intel Inspector XE too to look at the reported problems.

imagem de diedro

hi,
I have used "- CB" as suggested by Steve Lione. It really helps me. Now I would like to study 'Static Analysis' but I do not have much time. I will do for sure at the end of my project.
Thanks again

imagem de Steve Lionel (Intel)

Static Analysis is a great feature, but it requires that you have Fortran Studio XE or Parallel Studio XE. If all you have is the compiler (Composer XE), that feature is not available.

Steve

Faça login para deixar um comentário.