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

How to build up a 64-bit application?

tang__jun
Beginner
863 Views

Hello there,

     These days I am struggling with allocating big matrices. The error is "forrtl severe (41) insufficient virtual memory".

But I am pretty sure the virtual memory is big enough, its round 8000MB, more importantly I have 128G physical memory.

I am on a 64-bit windows operating system. According to the knowledge I get from other's questions on this forum,

I am running a 32-bit application even though the operating system is 64 bit, right?  

      But the problem is, how to switch to a 64-bit built? As far as I know, Visual Studio has always been a 32 bit platform.

I tried to reinstall IVF, but the default path is "C/:program files(x86)/...". So I guess I was reinstalling a 32-bit software again.

I also searched the buttons in the menus of IVF, either did I find any choice for a 64-bit built. 

      I really need help. 

0 Kudos
2 Replies
TimP
Honored Contributor III
863 Views

Visual studio installs all components to support either 32 or 64 bit target mode. If building in the gui, you are correct that projects default to 32 bit mode.  If you have installed ifort intel64, switching your project target to x64 works just as it does for c++.

Vs2008 was the last one where x64 support was a sub-option.

Ifort, like vs, installs separate shortcuts to open cmd windows set up for 32 or 64 bit mode.

The fact that both the 32 and 64 bit ifort are installed in program files x86 does not invalidate the above.

0 Kudos
Steven_L_Intel1
Employee
863 Views

All of the product files are installed under "Program Files (x86)".

  • In Visual Studio, to switch to a 64-bit configuration select Build > Configuration Manager.
  • Click on Active Solution Platform and select <New...>
  • In the new dialog that appears, click in "Type or select the new platform" and select x64. Click OK, then Close.

Please note that you will still be limited to 2GB static code and data, and 1GB stack. If you want to make use of more virtual address space for large arrays, make them ALLOCATABLE and allocate them to the desired size.

As Tim notes, some editions of Visual Studio don't install x64 support by default and you may need to "modify" the Visual Studio install (through Control Panel > Programs and Features) to add it.

0 Kudos
Reply