- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using the Intel Fortran Compiler 10.1 on a Windows 2003 Server Enterprise Edition x64 SP2 (on a Fujitsu Siemens Primergy TX200S3 server equipped with an Intel Xeon E5310 processor at 1.6 GHz and with 8 GB of RAM). Im compiling the code using the x64 option.
Im tried to allocate up to 8 GB of memory using the Dynamic allocation of common blocks. Im not able to allocate more than 4 GB as whenever the total dimension of the common block is greater than about 4 GB, I get a run-time error. Im using just one common block allocated in a unique FTN_ALLOC function.
Is there any additional compiler options that must be used? Any suggestion? Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think he is using the /dyncom "dynamic COMMON" option, which is an abomination and should be avoided. It would not at all astonish me that there are 32-bit limits to it.
Please use ALLOCATABLE arrays instead - this will not have address size limits on the x64 platform.
For static COMMONs, Tim is correct that 2GB is the limit. On Windows, there is no concept of memory models as there is on Linux.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know if this makes sense. common blocks are static objects, and would be limited to 2GB, at least with default memory model options. If you are using ALLOCATABLE arrays, a failure when going beyond 4GB would lead one to suspect you used default integer somewhere when you needed larger than default kind.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think he is using the /dyncom "dynamic COMMON" option, which is an abomination and should be avoided. It would not at all astonish me that there are 32-bit limits to it.
Please use ALLOCATABLE arrays instead - this will not have address size limits on the x64 platform.
For static COMMONs, Tim is correct that 2GB is the limit. On Windows, there is no concept of memory models as there is on Linux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think he is using the /dyncom "dynamic COMMON" option, which is an abomination and should be avoided. It would not at all astonish me that there are 32-bit limits to it.
Please use ALLOCATABLE arrays instead - this will not have address size limits on the x64 platform.
For static COMMONs, Tim is correct that 2GB is the limit. On Windows, there is no concept of memory models as there is on Linux.
First of all, thank you very much for your answers.
More precisely, Im porting a quite complex Fortran 77 code based on several include files that contain a number of common blocks (defining global variables). Thus, the quicker way to import the code and to use more memory was to use the Dynamic allocation of common blocks using the compiler option /Qdyncom"Block1, Block2, Block3". The function extern "C" void _FTN_ALLOC(void **mem, int *size, char *name) as then been used to allocate the total memory of the three common blocks Block1, Block2 and Block3.
Is the the limit you mentioned per common block? (i.e., in the above case at most 2*3=6 GB of total memory can be allocated).
Moreover, using ALLOCATABLE arrays I can allocate the variables included in the three common blocks but the variables will have only a local scope unless the dynamic declarations are included in a module defined before the main program. Is it right?
Thank you again. Regards, Roberto.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Windows has a limit of 2GB per "image section". All of the COMMONs and your compiled code are lumped together in this. Please use ALLOCATABLE arrays instead.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page