Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29246 Discussions

Visual Fortran Complier 2008 not working anymore on Windows 7 or 8

Paolo_Focardi
Beginner
1,801 Views

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!

 

0 Kudos
14 Replies
Steven_L_Intel1
Employee
1,801 Views

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.

0 Kudos
TimP
Honored Contributor III
1,801 Views

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?

0 Kudos
pbkenned1
Employee
1,801 Views

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:

http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/windows-7-and-exe-is-not-a-valid-win-32/8f8c4d85-5015-47ec-82d1-5d0ebe7a8bd4

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

0 Kudos
Paolo_Focardi
Beginner
1,801 Views

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?

0 Kudos
Steven_L_Intel1
Employee
1,801 Views

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.

0 Kudos
Paolo_Focardi
Beginner
1,801 Views

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.

459822

 

0 Kudos
Steven_L_Intel1
Employee
1,801 Views

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.

0 Kudos
Paolo_Focardi
Beginner
1,801 Views

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?

0 Kudos
Steven_L_Intel1
Employee
1,801 Views

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.

0 Kudos
Paolo_Focardi
Beginner
1,801 Views

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...

0 Kudos
Steven_L_Intel1
Employee
1,801 Views

Ok, please attach your .vfproj file.

0 Kudos
Paolo_Focardi
Beginner
1,801 Views
0 Kudos
Paolo_Focardi
Beginner
1,801 Views

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!

0 Kudos
Steven_L_Intel1
Employee
1,801 Views

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.

0 Kudos
Reply