- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I used to run Intel Visual Fortran v11.1 on a Windows 7 machine and everything was ok. I was making little Dos windows programs to post-process my data.
I didn't use it for a while and eventually install it on a new Windows 7 machine. Now it won't run anymore, or rather when I try to run the executables it produces, Windows says that "is not a valid Win32 Application". Any idea what happened?
Please help!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which Visual Studio version are you using? I occasionally use 11.1 on Windows 7 without issues. Does this happen even with a "Hello World" application? You might have something corrupting your executables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should check a few details and report back. For example, did you install the ifort for Intel64 (windows X64) on a 32-bit Windows OS installation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are a number of explanations for 'not a valid Win32 Application', most of which have nothing to do with Intel Fortran. For example, see:
Without further details, we can't help you. At the very least, we need to know:
(1) What Windows operating system is running on the new machince, and is it the 32-bit or 64-bit version of Windows?
(2) Was the 32-bit or 64-bit version of Intel Fortran used to compile the executable that fails?
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok, here are a few more details:
I run Windows 7 x64, and get the same error whether I compile under Win32 or Win64 option.
An another important detail is that after installing the compiler (apparently everything happens smoothly), the first time I run it I get an error message saying that "Package load failure, package 'Microsoft.Visual.Xaml' has failed to load properly..."
I also tried to install a later version of the compiler, the XE 2011 but again, installation is smooth, and when I run it everything seems fine until I try to run the compiled version of my little code and get the "not valid Win32 Application" error.
Any clues?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What happens if you build a "Hello World" program from a command prompt build environment? I wouldn't worry too much right now about the Xaml error as it is unrelated to this problem.
In Visual Studio, select Tools > Options > Intel Visual Fortran > General and change "Show environment in log" to True. Rebuild your project. Zip the buildlog.htm and attach it to a reply here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, here is the BuildLog file coming out of my program.
I never used the compiler from command line and I'm not familiar with the necessary syntax.
I eliminated the Xaml error by installing the Visual Studio 2008 Service Pack 1, but I still get the "not a valid Win32 App" error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you put in /SUBSYSTEM:CONSOLE,"5.01" in the project under Linker > Command Line? Take it out. That's only for running on Windows XP. You may have to set Linker > System > Subsystem to Console.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes, I did that, but didn't make any difference.
I'm currently downloading the original installer from Intel to see if it makes any difference, but I doubt it.
Any other idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create a new project, selecting the default Console application (not empty). Build and run that. Does it run? I doubt very much that this is related to the Fortran install - there's some setting that's wrong.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok, if I make a new project with the default console application and choose "main program code" rather than "empty project" I get the "hello world" little thing that compiles and works just fine.
If I do the same and replace the source with my own source it compiles but then gives me the "not a valid Win32 app" error. Even if I set it to compile as x64 it still does the same thing.
By the way, I also tried to install the latest Visual Fortran Compiler XE 2013 SP1 update 5 as an evaluation copy and it does the same thing as my old 11.1
I know it must be some stupid thing, but please help me figure it out...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, please attach your .vfproj file.
- 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
I think I found the problem. In my code I have large arrays defined. I didn't realized I increased their max dimensions a little bit.
If I make them a bit smaller then everything works just fine.
For future reference, do you have a rule of thumb about how much memory I can allocate with a fortran console app?
Thanks for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that can certainly do it. See https://software.intel.com/en-us/articles/memory-limits-applications-windows For the 64-bit version, consider switching to ALLOCATABLE arrays from static, then you won't have this issue.

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