|
[Sponsors] |
May 15, 2012, 17:57 |
A strange thing on Compaq Visual Fortran
|
#1 |
New Member
Lizhu Zhang
Join Date: May 2012
Posts: 9
Rep Power: 14 |
I have met a strange thing today by using CVF. First, I compiled the code by using Debug successfully, and program worked fine. Second I compiled the code by using release in order to earn a faster program, and the code was compiled successfully too, however, when I ran the program, it was hinted that "stack overflow", What is the difference between Debug and Release? Why the same code can be run under Debug but fail under Release? Did anyone know the similar problem? Thanks in advance.
|
|
May 15, 2012, 21:36 |
|
#2 |
Senior Member
Mehdi Babamehdi
Join Date: Jan 2011
Posts: 158
Rep Power: 15 |
I had problem with "stack overflow" but I don't know what "release " means in fortran. but if you want to fix this problem you should increase amount of memory that fortran uses.
for that, follow this: Project tab -> setting -> link -> set category to output -> on stack allocation set a number that it shows the volume of pc's memory that fortran uses. in default fortran uses 300 mb, and you can increase it up 4gb. I hope it is useful |
|
May 15, 2012, 22:47 |
|
#3 |
Senior Member
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 18 |
A lot of times a code won't crash when compiled in "debug" mode, I believe because it doesn't send a kill signal to the code so that if you are running in a debugger you can find the source of the error without the code dying on you. That is my interpretation anyways. I have noticed this many times with divide by zero errors. Under normal conditions the code will stop running but in debug more it just carries on with the NaN.
|
|
May 16, 2012, 09:26 |
|
#4 |
New Member
Lizhu Zhang
Join Date: May 2012
Posts: 9
Rep Power: 14 |
Dear mb.pejvak, Thank you for your reply. I followed your advice and increase number up to 4gb, but it didn't work. I don't know whether it is related to my operation system or not, what I used is CVF 6.7 with win7 system.
|
|
May 16, 2012, 09:35 |
|
#5 |
New Member
Lizhu Zhang
Join Date: May 2012
Posts: 9
Rep Power: 14 |
Dear cdegroot, Thank you for your reply. In fact I have run the same code in Unix system and compiled by ifort, it works fine and the results of debug and ifort are the same. I think ifort is very strict compiler and so I doubt there is something wrong with the setting of CVF.
|
|
May 16, 2012, 12:00 |
|
#6 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
Is a lot of time I didn't use CVF (is an old compiler now...), this error happened to me for memory reasons in the linker. You should increase the option of the linker.
Furthermore, what other options did you set in the compiler? |
|
May 16, 2012, 21:06 |
|
#7 |
Senior Member
Mehdi Babamehdi
Join Date: Jan 2011
Posts: 158
Rep Power: 15 |
unfortunately fortran has a lot of problem with Win 7 and vista. somebody instal some software (such as virtual machine or ....) in this OS that create a virtual win XP and then instal fortran on this virtual win. any way i found a good site that help me alot to fix my problem in fortran you can see it, maybe your problem will fix.
http://stackoverflow.com/questions |
|
May 17, 2012, 07:38 |
|
#8 |
New Member
Lizhu Zhang
Join Date: May 2012
Posts: 9
Rep Power: 14 |
Dear mb.pejvak, Thank you very much, the website is wonderful.
|
|
Tags |
compile probelms, cvf, debug, release |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using PetsC library in compaq visual fortran | salman189 | Main CFD Forum | 0 | May 22, 2011 02:58 |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 19:56 |
How to install CGNS under windows xp? | lzgwhy | Main CFD Forum | 1 | January 11, 2011 19:44 |
CGNS lib and Fortran compiler | manaliac | Main CFD Forum | 2 | November 29, 2010 07:25 |
Compaq visual fortran compiler | underGroundMan | FLUENT | 0 | August 18, 2008 13:56 |