CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

A strange thing on Compaq Visual Fortran

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 15, 2012, 17:57
Default A strange thing on Compaq Visual Fortran
  #1
New Member
 
Lizhu Zhang
Join Date: May 2012
Posts: 9
Rep Power: 14
archdevil is on a distinguished road
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.
archdevil is offline   Reply With Quote

Old   May 15, 2012, 21:36
Default
  #2
Senior Member
 
Mehdi Babamehdi
Join Date: Jan 2011
Posts: 158
Rep Power: 15
mb.pejvak is on a distinguished road
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
mb.pejvak is offline   Reply With Quote

Old   May 15, 2012, 22:47
Default
  #3
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 18
cdegroot is on a distinguished road
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.
cdegroot is offline   Reply With Quote

Old   May 16, 2012, 09:26
Default
  #4
New Member
 
Lizhu Zhang
Join Date: May 2012
Posts: 9
Rep Power: 14
archdevil is on a distinguished road
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.
archdevil is offline   Reply With Quote

Old   May 16, 2012, 09:35
Default
  #5
New Member
 
Lizhu Zhang
Join Date: May 2012
Posts: 9
Rep Power: 14
archdevil is on a distinguished road
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.
archdevil is offline   Reply With Quote

Old   May 16, 2012, 12:00
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,897
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
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?
FMDenaro is offline   Reply With Quote

Old   May 16, 2012, 21:06
Default
  #7
Senior Member
 
Mehdi Babamehdi
Join Date: Jan 2011
Posts: 158
Rep Power: 15
mb.pejvak is on a distinguished road
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
mb.pejvak is offline   Reply With Quote

Old   May 17, 2012, 07:38
Default
  #8
New Member
 
Lizhu Zhang
Join Date: May 2012
Posts: 9
Rep Power: 14
archdevil is on a distinguished road
Dear mb.pejvak, Thank you very much, the website is wonderful.
archdevil is offline   Reply With Quote

Reply

Tags
compile probelms, cvf, debug, release


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 21:33.