- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I am running a project which was fine on CVF. on IVF, it gives me this message:
"(file name) has triggered a breakpoint" and I have two options: break or continue. when I continue, the program exits with this message:
"The program '[3188] (file name): Native' has exited with code 24 (0x18)."
I get the first error even if I put a break point before the first line. (there is no error or warning at the time of building)
Any suggestions?
Arman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, now we're getting somewhere.
My guess on the first error is that the file you're actually opening is not the file you think it is. Check the file path very carefully. It is probably opening a new, zero-length file because the input data file does not exist in the location being used.
The error 7797 is the sort of thing CVF did not know how to detect. It suggests that you have declared a function as one type in one place, but the actual function is a different type. This error can lead to very unpredictable behavior. You should investigate and fix this.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am running a project which was fine on CVF. on IVF, it gives me this message:
"(file name) has triggered a breakpoint" and I have two options: break or continue. when I continue, the program exits with this message:
"The program '[3188] (file name): Native' has exited with code 24 (0x18)."
I get the first error even if I put a break point before the first line. (there is no error or warning at the time of building)
Any suggestions?
Arman
Arman,
Are you sure that you compiled the program using the Debug configuration. Also you need to run the program in Debug mode using F5 otherwise your break point will be ignored.
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Arman,
Are you sure that you compiled the program using the Debug configuration. Also you need to run the program in Debug mode using F5 otherwise your break point will be ignored.
David
David,
What do you mean by debug configuration? (Sorry, I know little about IVF as I migrated from CVF a couple of days ago)
Actually I wanted to run my program, but I did not find any run button! so I started with the green triangle and I got the error I mentioned.
If by Debug configuration you mean the status of the "Solution Configuration" box on the top of the page, it shows Debug (and not release)
I have all my variables in a module and at the begining of the program I call that module using a USE command, but seemingly the program does NOT read the module and unknown variables force the break. it was working fine in CVF. Do we have any changes regarding modules in IVF?
How can Iput a breakpoint on lines with USE command or variable definition?I tried, but the compiler ignores them and says "No excecutable code is associated with this line".
Arman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
David,
What do you mean by debug configuration? (Sorry, I know little about IVF as I migrated from CVF a couple of days ago)
Actually I wanted to run my program, but I did not find any run button! so I started with the green triangle and I got the error I mentioned.
If by Debug configuration you mean the status of the "Solution Configuration" box on the top of the page, it shows Debug (and not release)
I have all my variables in a module and at the begining of the program I call that module using a USE command, but seemingly the program does NOT read the module and unknown variables force the break. it was working fine in CVF. Do we have any changes regarding modules in IVF?
How can Iput a breakpoint on lines with USE command or variable definition?I tried, but the compiler ignores them and says "No excecutable code is associated with this line".
Arman
Arman
Have you seen this article?
CVF and IVF are only compilers. Presumably you had a development environment (IDE) for building your CFV project(s) - DevStudio? The concept of Debug and Release builds is common to both CVF and IVF under some form of IDE.
I would also recommend reading theFortran Help. There is a section on Building Applicationsand sections on using the Visual Studio IDE
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am running a project which was fine on CVF. on IVF, it gives me this message:
"(file name) has triggered a breakpoint" and I have two options: break or continue. when I continue, the program exits with this message:
"The program '[3188] (file name): Native' has exited with code 24 (0x18)."
I get the first error even if I put a break point before the first line. (there is no error or warning at the time of building)
Any suggestions?
Arman
Arman,
Are you perhaps using an older [AMD processor] computer? This resembles the behavior I've seen with them. IVF by default compiles using SSE2 instruction set, not supported on older Athlons (cca. 2003 and older) and even older Intels. To change the behavior, use the /arch:ia32 switch (you can find IDE equivalent somewhere in Project Properties/Fortran/Code generation). Or, better still, get yourself a new computer :).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Arman
Have you seen this article?
CVF and IVF are only compilers. Presumably you had a development environment (IDE) for building your CFV project(s) - DevStudio? The concept of Debug and Release builds is common to both CVF and IVF under some form of IDE.
I would also recommend reading theFortran Help. There is a section on Building Applicationsand sections on using the Visual Studio IDE
Les
Les,
Yes, I have already read that article and made the required changes.
I am using Microsoft Visual Studio 2008 as an IDE.
At the time of building, I get some warning like "Warning LNK4940: Locally defined symbol MPIPRIV1 imported". I get 6 of them with different symbol names that I have not used at all in my program: MPIPRIV1, MPIPRIV2, ...
I looked up the error in the help but I did not getanything; "Remove the __declspec(dllimport) name declaration from the forward declaration of the symbol which triggered LNK4049", what is that!?
the other solution was "Temporarily disable incremental linking and whole-program optimization", how can I do that?!
do you think these warnings force a break when I run the program?
I tracked the break, it happens exactly when the program starts reading the first data from the first line of the input file. what could impede the accessibility of the input file?
Arman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Arman,
Are you perhaps using an older [AMD processor] computer? This resembles the behavior I've seen with them. IVF by default compiles using SSE2 instruction set, not supported on older Athlons (cca. 2003 and older) and even older Intels. To change the behavior, use the /arch:ia32 switch (you can find IDE equivalent somewhere in Project Properties/Fortran/Code generation). Or, better still, get yourself a new computer :).
Jugoslav,
It could not be the problem. I am using a pretty new intel processor: Intel core i5 CPU 750 @ 2.67GHz 2.66GHz.
Arman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ignore the linker warnings - they are harmless.
Is there perhaps another window (console window or other) hidden behind the Visual Studio window that gives more information about the error? This might happen if uninitialized variable checking had detected a problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ignore the linker warnings - they are harmless.
Is there perhaps another window (console window or other) hidden behind the Visual Studio window that gives more information about the error? This might happen if uninitialized variable checking had detected a problem.
Steve,
the error happens just when program wants to get the first data from the input file.
it says: 'MainMeshFree has triggred a breakpoint' (MainMeshFree is the file name) and in the black window which pops up when program runs (I don't know its name) there is this message: 'End of file during read' and the file number and location of the input file. (I think this is the error message you were looking for)
I rewinded the input file before reading, but the error still appears.
There is another thing that I don't understand; when I build the program, if the solution configuration is 'Release' there is no error, but if the solution configuration is 'Debug' there are two build errors:
Error 1 error #7977: The type of the function reference does not match the type of the function definition. [function name and address]
Error 2 Compilation Aborted (code 1) and then the subroutine name and address.
I am wondering if there is really a mismatch in variable types, shouldn't that be independant of the solution configuration mode? by the way, there was no such a mismatch in CVF.
Arman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, now we're getting somewhere.
My guess on the first error is that the file you're actually opening is not the file you think it is. Check the file path very carefully. It is probably opening a new, zero-length file because the input data file does not exist in the location being used.
The error 7797 is the sort of thing CVF did not know how to detect. It suggests that you have declared a function as one type in one place, but the actual function is a different type. This error can lead to very unpredictable behavior. You should investigate and fix this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, now we're getting somewhere.
My guess on the first error is that the file you're actually opening is not the file you think it is. Check the file path very carefully. It is probably opening a new, zero-length file because the input data file does not exist in the location being used.
The error 7797 is the sort of thing CVF did not know how to detect. It suggests that you have declared a function as one type in one place, but the actual function is a different type. This error can lead to very unpredictable behavior. You should investigate and fix this.
Yes, you are right.
It creates a new folder and read input file from that.
Regarding the error 7797, I will try to fix that.
Thanks for being so helpful.
Arman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i have the same problem, I don't get any errors, how can I know what is the problem. It just says, break or continue, whatever I choose, this is what I get:
'Console23.exe': Loaded 'C:\Users\Ansys\Documents\Visual Studio 2008\Projects\Project1\Console23\Console23\Debug\Console23.exe', Symbols loaded.
'Console23.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'Console23.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'Console23.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'
'Console23.exe': Loaded 'C:\Windows\SysWOW64\imagehlp.dll'
'Console23.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll'
'Console23.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll'
'Console23.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll'
'Console23.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'
'Console23.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll'
'Console23.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll'
'Console23.exe': Loaded 'C:\Program Files (x86)\Intel\Compiler\11.1\048\lib\ia32\libiomp5md.dll', Symbols loaded (source information stripped).
'Console23.exe': Loaded 'C:\Windows\SysWOW64\dbghelp.dll'
Console23.exe has triggered a breakpoint
The program '[3644] Console23.exe: Native' has exited with code 24 (0x18).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There will be a "real" error message in a separate window, possibly hidden by the Visual Studio window. Look for it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Ali
If you compiled your program using debug configuration some parts of the stack are filled with 0xcc opcodes which are probably guarding against the stack thrashing buffer overflow.It is quite possible that during the code execution instruction pointer referenced one of those opcodes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In this case, I predict that the error will be "end of file during READ", based on the exit status.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You found it - the console window. Your program is trying to read CF.inp and got to the end. The most common reason for this is that users don't understand that when you run a program from within Visual Studio, the "default directory" is the project folder, not where the executable is located. So if you open CF.inp and don't say STATUS='OLD', you get the default of STATUS='UNKNOWN' which means it creates a new, empty file, and then tries to read from it. Instant end-of-file.
The solution is either 1) put the input files in the project folder (same folder with the .vfproj file), 2) explicitly specify the path in the OPEN, or 3) set a "Start in" directory in the Debugging property page with the path to where the files are.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi steve,
i didn't understand what u meant by looking for the path. when i enter the visual studio, i add my fortran codes (including main and subroutines) to the source files. my fortran codes are in a place like desktop but visual studio projects are stored in: documents>> visual studio 2010>> projects. i add my codes from desktop to a project that is saved in documents. i have the same problem as Arman had. what should i do?
thank you so much
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hamid Moezzi wrote:
i didn't understand what u meant by looking for the path
Windows presents a tree-structured file system to the user on each device (drive, camera, etc.). When you work with programs that read/write files in different directories, you have to have an understanding of the file system and path strings. Without such an understanding, you can waste a lot of time trying to process files in places where they do not exist. Fortran, by itself, is unaware of Desktop, Documents, etc., folders that Windows conventions provide. From the point of view of Fortran programs, all those folders are just directories, and it is the programmer's responsibility to provide the full or relative paths to all files that are not in the same directory as the EXE file that is being run.
When opening a file for reading, I recommend that you use STATUS='OLD' in the OPEN statement for the file. Otherwise, if the program attempts to OPEN in the wrong directory, it will create a zero length file in the current directory, and the program will misbehave if it expects to read data from the file -- data that actually exists in a different file with the same name but in a directory that you did not specify in the OPEN statement.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page