- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings Fortran forum members,
When compiling a Fortran source code, I see compiler -parallel optimization suggestions like the following,
remark #30533: (LOOP) Compile with the -opt-subscript-in-range option to vectorize and/or parallelize the loop at line 354. [VERIFY] Make sure that no loop in the program contains or generates very large integers (typically very large integers >= 2^30).
What are the perils of using this flag with a code that has large integers? Specifically, does the large integer criterion apply to exclusively the loop indices or any KIND of integer in any loops, or any KIND of integer anywhere in the program? For example, is 2^31 for an int64 considered large according to this definition?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The description of this option in the output of the command ifort /? on Windows is
/Qopt-subscript-in-range[-]
assumes no overflows in the intermediate computation of the subscripts
Unless you use those DO indices that you mention as subscripts in your code, I don't see why this option should affect the treatment of those variables in other contexts.
Note that the type of the expression 2^31 is default integer; if that is a 4-byte integer (i.e., unless compiler options or directives have been used to change the default integer), this expression will cause integer overflow.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The description of this option in the output of the command ifort /? on Windows is
/Qopt-subscript-in-range[-]
assumes no overflows in the intermediate computation of the subscripts
Unless you use those DO indices that you mention as subscripts in your code, I don't see why this option should affect the treatment of those variables in other contexts.
Note that the type of the expression 2^31 is default integer; if that is a 4-byte integer (i.e., unless compiler options or directives have been used to change the default integer), this expression will cause integer overflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are a few more details in the Fortran Developer Guide. This option is only available with ifort.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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