- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have a FORTRAN program that uses virtual (ALLOCATABLE) arrays in a 64-bit Windows computer with 32GB RAM, however, when the virtual memory in the program approaches 2GB the program fails to allocate some of the arrays and slows down to a very slow pace. We understand that there is a 2GB limit in the static memory size for 32-bit based applications, but it shouldnt be a limitation in terms of virtual arrays in a 64-bit machine with 32GB RAM. Our questions are:
1. Is there still a limitation of 2GB in the total virtual memory for arrays even when using version 9.1 of the compiler and Windows x64?
2. Is there a limitation for virtual memory with the Fortran compiler version 9.1 in Linux?
3. Is there anyway to compile our program so that we can have access to as much virtual memory as possible in Windows x64?
1. Is there still a limitation of 2GB in the total virtual memory for arrays even when using version 9.1 of the compiler and Windows x64?
2. Is there a limitation for virtual memory with the Fortran compiler version 9.1 in Linux?
3. Is there anyway to compile our program so that we can have access to as much virtual memory as possible in Windows x64?
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to be using the Intel compiler for "Intel EM64T" in order to take advantage of the 64-bit address space. If you do that, there is no 2GB limit for dynamically allocated data. The same holds for Linux. It sounds as if you are still using the 32-bit compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
While compiling with Intel Visual Fortran 9.1 compiler we use the following:
1 - Use "Tools>Options" and select the "Intel Fortran" link, clicking in the "General" link
2 - Change "Target Platform" to "x64" then, press the [ OK ] button
That should ensure a 64-bit application, or are there other steps needed?
1 - Use "Tools>Options" and select the "Intel Fortran" link, clicking in the "General" link
2 - Change "Target Platform" to "x64" then, press the [ OK ] button
That should ensure a 64-bit application, or are there other steps needed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, that should be enough. The build log in the Debug or Release folder should give a clue as to which compiler was used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
x64 also needs an increase in physical RAM beyond 2GB to show an advantage over 32 bit OS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve:
Thanks for the reply. A couple of more questions:
I am using the following KIND definitions for integer, real and double-precision data:
INTEGER, PARAMETER :: kind_i = SELECTED_INT_KIND(9)
INTEGER, PARAMETER :: kind_r = SELECTED_REAL_KIND(6,37)
INTEGER, PARAMETER :: kind_d = SELECTED_REAL_KIND(15,307)
which are the default values for the 32-bit integer, real, and double data for Windows.
1) Would using these definitions make the program be a 32-bit program even if using the 64-bit compiler?
2) Do I need to use the definitions:
INTEGER, PARAMETER :: kind_i = SELECTED_INT_KIND(9)
INTEGER, PARAMETER :: kind_r = SELECTED_REAL_KIND(15,307)
INTEGER, PARAMETER :: kind_d = SELECTED_REAL_KIND(33,4931)
to ensure a 64-bit program?
Thanks for the reply. A couple of more questions:
I am using the following KIND definitions for integer, real and double-precision data:
INTEGER, PARAMETER :: kind_i = SELECTED_INT_KIND(9)
INTEGER, PARAMETER :: kind_r = SELECTED_REAL_KIND(6,37)
INTEGER, PARAMETER :: kind_d = SELECTED_REAL_KIND(15,307)
which are the default values for the 32-bit integer, real, and double data for Windows.
1) Would using these definitions make the program be a 32-bit program even if using the 64-bit compiler?
2) Do I need to use the definitions:
INTEGER, PARAMETER :: kind_i = SELECTED_INT_KIND(9)
INTEGER, PARAMETER :: kind_r = SELECTED_REAL_KIND(15,307)
INTEGER, PARAMETER :: kind_d = SELECTED_REAL_KIND(33,4931)
to ensure a 64-bit program?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tim:
The computer I'm using has 32GB RAM. My questions are:
1) Is all that RAM accessible right away, or do I need to adjust the swap file size to as much as possible to increase the available virtual memory?
2) Is there any other adjustment I need to make in Windows to make as much RAM available to my FORTRAN program?
The computer I'm using has 32GB RAM. My questions are:
1) Is all that RAM accessible right away, or do I need to adjust the swap file size to as much as possible to increase the available virtual memory?
2) Is there any other adjustment I need to make in Windows to make as much RAM available to my FORTRAN program?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no change in default data sizes when using x64 vs. IA-32. Data size is not related to virtual address size.
You need to make sure there is sufficient swapfile space. Right click on My Computer, select Properties, Advanced, Performance Settings, Advanced, Virtual Memory, Change. Make sure there is twice as much swapspace allocated as you want to use for virtual memory.
You need to make sure there is sufficient swapfile space. Right click on My Computer, select Properties, Advanced, Performance Settings, Advanced, Virtual Memory, Change. Make sure there is twice as much swapspace allocated as you want to use for virtual memory.

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