- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is wrong with this Fortran program?
complex :: z(5)
call random_number(z%re)
write(*,*) z
end
Intel ifort classic 2021 throws the following error message:
error #6672: This intrinsic procedure or system subprogram must not have an expression or constant as an argument. [RANDOM_NUMBER]
For comparison, gfortran compiles and runs flawlessly. Is this an ifort compiler bug? Generally speaking, what is the easiest way of assigning real/imaginary components of complex numbers separately?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is fixed in ifort 2021.6 and ifx 2022.1 (oneAPI HPC Toolkit 2022.2 - darned confusing.)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that's an ifort bug. There have been others related to %re and %im in the past.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a changelog for the newer compiler releases to see if this bug has been fixed in ifort 2022? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Would be also great if Intel provided a direct link to the bug report page in the main page of this forum.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There haven't been bugfix change logs for years. Only people with paid support can file an official report. But the Intel support engineers often pick up issues from this forum.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's unfortunate. I changed the title to make it more visible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I filed bug report 05244368 on your behalf. I reported a similar issue with %re and %im in a I/O list about a year and a half ago.
To answer your other question, the complex-part-designator (%re or %im) is the easiest way of doing this - that's what it's for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know this is not your responsibility anymore. So thank you very much for taking the time to report it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is fixed in ifort 2021.6 and ifx 2022.1 (oneAPI HPC Toolkit 2022.2 - darned confusing.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
fantastic, thank you for the update.

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