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

Intel Compiler Suite and VS2008 question

postaquestion
Novice
1,569 Views

After I had purchased and successfully installed MS Visual Studio 2008 as instructed by one of your resellers, I downloaded and installed the Intel Compiler Suite (which seemed to be successful). However, when I try to use the compiler, for example, executing a simple task like compiling a subroutine I get the following error message:

The Fortran compiler (ifort.exe) cannot be found.

Build log written to "file://C:UsersAntPL3DIntelds_pl3dpl3dDebugBuildLog.htm"
PL3D - 1 error(s), 0 warning(s)


What do I need to do to get visual studio to recognize all the compilers etc? Please help.

0 Kudos
12 Replies
Steven_L_Intel1
Employee
1,569 Views
In VS2008, select Tools > Options > Intel Fortran > Compiler. Make sure that the compiler selected is the version you installed. (If you can see this field at all, you at least have a version that supports VS2008.)

What version is shown? (10.1.???)
0 Kudos
antpeirce
Beginner
1,569 Views
Hi Steve,
Thanks for the response. I tried this selection path and under Compiler Selection it says

Target Platform : Win32
Selected Compiler: No compiler Installed

the rest is blank.


I installed the W 64 bit compiler w_fc_p_10.1.021_intel64, but there does not seem to be an option to invoke this with the drop-down menu? So where to next. There does indeed not seem to be a compiler associated with the MS VS 2008.


So What should I try next?

Thanks

Anthony

0 Kudos
Steven_L_Intel1
Employee
1,569 Views

Ok. You have asked to build a 32-bit application but you installed only the 64-bit compiler. If you want to build your application as 64-bits, do this in your project.

Build > Configuration Manager...
Under "Active solution platform", select
It should default to x64 under "Type or select the new platform", and "Copy settings from" should say Win32. Click OK.

Now your active configuration will be x64 and you should be able to build.

If you do not see x64 as an option, you may not have installed the "x64 Compiler and Tools" component of VS2008.

  1. From Control Panel > Add or Remove Programs, select Microsoft Visual Studio 2008 > Change/Remove. The Visual Studio Maintenance Mode window will appear. Click Next.
  2. Click Add or Remove Features
  3. Under "Select features to install", expand Language Tools > Visual C++
  4. If the box "X64 Compiler and Tools" is not checked, check it, then click Update. If the box is already checked, click Cancel.

If in fact you wanted to build a 32-bit application, download and install the package ending in _ia32.exe.

0 Kudos
antpeirce
Beginner
1,569 Views

Hi Steve,
Thanks - that seemed to work. I compiled all the code in the work space then got the following link error:

Error 1 fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' x64Debug/vof_out.obj


If I want to add a source file to a project, how do I go about doing this. It seems a little different from the Compac Fortran Environment I am used to.

In addition, if I want to set the stack size for a project so that I can use all 8 Gb of RAM, how do I do this?

Thanks so much for your help - I was getting desperate.

Anthony
0 Kudos
Steven_L_Intel1
Employee
1,569 Views
You are somehow still using the 32-bit linker. Did you try changing paths under Tools > Options >Intel Fortran > Compiler > Directories? You shouldn't have. I have seen people try to use this dialog to switch platforms, but that's not how it's done. That dialog is where you specify which tools are used for each platform, to build for a given platform you change the project platform configuration.

Another possibility is that there is an explicit setting of /machine:x86 in the linker options. If so, remove it.

Adding a source file to the project is the same as in CVF. Right click on the project, select Add to Project > Files...

You cannot use 8GB for stack. Windows limits you to 2GB stack (and you won't get all of that). Try using the "Heap arrays" option instead so that things ordinarily allocated on the stack are allocated on the heap instead.
0 Kudos
antpeirce
Beginner
1,569 Views
Hi Steve,
Thanks for your response. I fiddled around and managed to get a trivial program to compile, link and execute. So there is progress.

I have Windows Vista 64 bit Ultimate and a8 Gb of RAM. What settings do I need to execute to be able to access all 8 Gb of RAM. Surely the Vista 64 bit should be able to do this?


Thanks

Anthony
0 Kudos
TimP
Honored Contributor III
1,569 Views
ALLOCATABLE arrays can take advantage of your RAM, if compiled for 64-bit mode.
0 Kudos
Steven_L_Intel1
Employee
1,569 Views
As Tim says, use ALLOCATABLE arrays for your large array declarations (and then ALLOCATE them to the proper size). Use the "Heap Arrays" option to cause compiler-generated temporaries to go on the heap.

Windows limits the stack and static code/data to 2GB, even on x64.
0 Kudos
antpeirce
Beginner
1,569 Views
Thanks Steve and Tim, I will look into Allocatable arrays.

By the way does the Mac Intel Fortran Compiler have a similar problem with addressing data larger than 2 Gb?

Anthony
0 Kudos
Steven_L_Intel1
Employee
1,569 Views
It's not a compiler issue - it's an OS limitation. The 64-bit compiler has no problem at all addressing such data.

On MacOS, I know there can be an issue, which is being worked on, when referencing static data more than 2GB away from the current location. I'm a bit fuzzy as to whether you can have a single array bigger than 2GB - I remember asking once and was told no. Feel free to ask in our Linux/Mac forum section.
0 Kudos
antpeirce
Beginner
1,569 Views
Hi Steve,
So it may perhaps work under Linux?

Anthony
0 Kudos
TimP
Honored Contributor III
1,569 Views
The default memory model in linux x86-64 limits static objects to 2GB. -mc-model=medium raises the limit.
0 Kudos
Reply