- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I noticed that although the current version of Intel Fortran supports allocatable characters, they require the -assume realloc_lhs option (or explicit allocation) to work properly. The compiler's documentation mentions that such option "may cause extra overhead at run time".
My question is: is it better, in terms of performance, to stick with the iso_varying_string module or to try this new feature?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The requirement of /assume:realloc_lhs is a bug and will be fixed. That switch is there because if you wrote a program with assignments of allocatable arrays for Fortran 90 or 95, you were required to have the left side already allocated to the proper shape. We added the switch to avoid extra checking overhead for existing code.
In the case of allocatable character variables, the checking is part of the normal and desired behavior and should be the default. Indeed, the feature is pretty much useless without it! Just add the switch for now until we fix the bug.
In the case of allocatable character variables, the checking is part of the normal and desired behavior and should be the default. Indeed, the feature is pretty much useless without it! Just add the switch for now until we fix the bug.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, John
You may referbelow discussion thread on the problem ofusing"iso_varying_string" module. Basically it's not quite recommended for product use.
http://software.intel.com/en-us/forums/showthread.php?t=62433
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know that iso_varying_string has a lot of issues (e.g., I/O handling, array assignment, length of an empty string, etc.), so you're right about that. But my question was more related to the fact that using the allocatable characters introduced in version 11.1 require "-assume realloc_lhs", which might cause unnecessary headaches (at least for me) and hurt performance.
Thanks to the signature in your post I found an article related to my question:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The requirement of /assume:realloc_lhs is a bug and will be fixed. That switch is there because if you wrote a program with assignments of allocatable arrays for Fortran 90 or 95, you were required to have the left side already allocated to the proper shape. We added the switch to avoid extra checking overhead for existing code.
In the case of allocatable character variables, the checking is part of the normal and desired behavior and should be the default. Indeed, the feature is pretty much useless without it! Just add the switch for now until we fix the bug.
In the case of allocatable character variables, the checking is part of the normal and desired behavior and should be the default. Indeed, the feature is pretty much useless without it! Just add the switch for now until we fix the bug.
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