- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Iam using Visual Studio 2008 with IVF11.0.061 on Windows XP. Since I migrated from CVF6, I have beginers problem on this environment.
In this simple code variables STEP,x(2)...x(200),y(2)...y(200) have values NaN, and x(1)=-3.14, y(1)=0.0
program Test1
implicite none
REAL x(200),y(200), step
INTEGER i
x(1)=-3.14
y(1)=0.0
step=6.28/199.
print *, x(1),y(1),step
DO i=2,200
x(i)=step+x(i-1)
y(i)=sin(x(i))
print *, x(i),y(i)
END DO
end program TEST1
If I change y(1)=1.0E-37, everithingbecome OK. x(1)=-3.14, y(1)=9.9999e-38 (almost zero), step=3.1557791e-02, and all other values of x(i) and y(i) are correct.
I have a lot of old source code from CVF6, and it is very hard to change all zeros.
I also tried to change
Project>TEST1 Properties..>Fortran>Floating Point>Floating-Point Exception Handling> /fpe:0
but program break with message:
Unhandled exception at 0x7c92a911 in test1.exe: 0xC0000005: Access violation writing location 0x00030fd8.
If I change /fpe:0 in /fpe:1, problem still persist like in the begining.
I will appreciate any help. Thank You.
- Balises:
- Intel® Fortran Compiler
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
That is not a valid statement without your having specified at what point in the program this refers to. After all, your program performs calculations and assigns new values (assuming that you have correctly spelled "implicit") to variables, so a blanket statement such as this, seeming to apply to the entire duration of a run of the program, cannot stand.
The program with implicite corrected to implicit, runs to completion with no access errors. This short, trivial, program exposes no CVF -> IVF migration issues.
The reported access violation is not in your code, but in some system library. You may try to use a more recent version of the compiler and see if the problem has been fixed.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
But everithing other is correct.
The values NaN are the final results of the program.
Thank you.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Your build-log shows that a manifest file was involved at the link step, possibly because of a setting in VisualStudio. In some circumstances, running a program with a mismatched manifest can cause access violations.
Please repeat the build attempt with manifests turned off.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
first one worked perfectly,
at first compilation second code returned a manifestation error, but when I compiled it again it worked fine too and error didn't show up later too.
my first action at this situations would be a reinstall of vs and ifort
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
likewise i had tried it here...no issue.
I would guess that it's aconflict on libraries?
(I recall back a few versions ago there was an issue with ifort? being the same on another fortran compiler?
what other fortran compilers or other compilers do you have installed on the computer?
particulalry do you have any other in the Visual Studio environment (I run different fortran compilers on different versions of Visual Studio since they don't like sharing attention!)
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable