Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29250 Discussions

Improper Non-advanced output in ifort

ganapati
Beginner
474 Views
Hello all,

In ifc compiler vesion 7, the simple code below produces a progress bar (kind of) by adding a #-mark to the line every cycle of the ii variable.

This is what I want; however, the latest compiler version, ifort, produces no output until the loops are finished and that writes the whole bar at once.
How can I get back my slowly progressing bar in ifort?


PROGRAM testbar
!print progress bar to show current progress of window processing

INTEGER :: ii,jj
REAL :: number

number=1.
DO ii=1,100
WRITE(*,'(A)', ADVANCE='NO') "#"
DO jj=1,1000000000
number=SQRT(number)
END DO
END DO
WRITE(*,*)
END PROGRAM testbar
0 Kudos
1 Reply
Steven_L_Intel1
Employee
474 Views
Use:
WRITE(*,'($,A)') "+#"
and compile with -ccdefault:fortran
0 Kudos
Reply