- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I was using ifort compiler, but i have seen the message that it will be deprecated, so I'm trying to use ifx instead, but I get this error:
lld-link: error: section larger than 4 GiB: .data
Do you have any suggestions?
Best regards,
Julie
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you really have a static variable (COMMON, most likely) larger than 4GB?
This isn't a compiler issue - add -mcmodel medium to the compiler options.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems that '-mcmodel medium' is not recognized by ifx compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On Linux the syntax is "-mcmodel=medium". There is no equivalent option for Windows. See this section in the Fortran Developer Guide and Reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your answer. I will in the next few months, maybe there will be an update that will allow this option for Windows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, there won't - Windows has a hard limit of 2GB static code and data, due to the design of the executable format. Use ALLOCATABLE arrays instead of very large static arrays.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, thanks for this precision.
So I don't know why it works with ifort but not with ifx: maybe it is linked to the fact that with ifort, our code is compiled for win32, but we have to compile for x64 with ifx?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It doesn't work with 64-bit ifort either.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page