- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
some of my apps take a long time to run so i like to echo some count numbers to the command window using
write(*,'(i5\)' icount
this should write across the command line. after 15 such writes, i do a carriage return using
write(*,'(/a\)) ' @@ '
this works fine with FPS 4.0, but with IVF 10.1, the system waits for the carriage return to write to the screen. i tried flush (6) but to no avail. any suggestions?
i would prefer to write an integer and not put a character.
thanks, james
write(*,'(i5\)' icount
this should write across the command line. after 15 such writes, i do a carriage return using
write(*,'(/a\)) ' @@ '
this works fine with FPS 4.0, but with IVF 10.1, the system waits for the carriage return to write to the screen. i tried flush (6) but to no avail. any suggestions?
i would prefer to write an integer and not put a character.
thanks, james
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jfdoyle
some of my apps take a long time to run so i like to echo some count numbers to the command window using
write(*,'(i5)' icount
this should write across the command line. after 15 such writes, i do a carriage return using
write(*,'(/a)) ' @@ '
this works fine with FPS 4.0, but with IVF 10.1, the system waits for the carriage return to write to the screen. i tried flush (6) but to no avail. any suggestions?
i would prefer to write an integer and not put a character.
thanks, james
write(*,'(i5)' icount
this should write across the command line. after 15 such writes, i do a carriage return using
write(*,'(/a)) ' @@ '
this works fine with FPS 4.0, but with IVF 10.1, the system waits for the carriage return to write to the screen. i tried flush (6) but to no avail. any suggestions?
i would prefer to write an integer and not put a character.
thanks, james
write(*,'(i5)') icount
which would write the last value and then go to the next record.
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - David White
There are obviously some quote marks missing from your examples, but could you make the 15th write to be
write(*,'(i5)') icount
which would write the last value and then go to the next record.
David
write(*,'(i5)') icount
which would write the last value and then go to the next record.
David
thanks. you are right about the quotes.
the 15th write is OK because the /a forces the carriage return. it is the 14 writes leading up to it that are not showing on the screen until the carriage return.
james
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jfdoyle
Quoting - David White
There are obviously some quote marks missing from your examples, but could you make the 15th write to be
write(*,'(i5)') icount
which would write the last value and then go to the next record.
David
write(*,'(i5)') icount
which would write the last value and then go to the next record.
David
thanks. you are right about the quotes.
the 15th write is OK because the /a forces the carriage return. it is the 14 writes leading up to it that are not showing on the screen until the carriage return.
james
Try using '$" in place of '' to suppress return/linefeed. Sounds like '' is using a buffered record buffer.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
$ and are the same. The key here is that you need to use "Fortran carriage control", which FPS did. This works:
[plain]use ifcore open (unit=6,form='formatted',carriagecontrol='fortran') do i=1,10 write (*,'($,I0,"..")') i call sleepqq(500) end do write (*,*) 'Done!' end[/plain]The USE IFCORE and call to sleepqq are just to help the demonstration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
$ and are the same. The key here is that you need to use "Fortran carriage control", which FPS did. This works:
[plain]use ifcore open (unit=6,form='formatted',carriagecontrol='fortran') do i=1,10 write (*,'($,I0,"..")') i call sleepqq(500) end do write (*,*) 'Done!' end[/plain]The USE IFCORE and call to sleepqq are just to help the demonstration.
Thanks, i now have things working.
Maybe you can clarify this for me. The following test program
c testc.for
use ifport
inc=2
icarriage=0
nmax=100
write(*,'(/a)') ' @@ '
do icount=1,nmax
if (mod(icount,inc) .eq. 0) then
write(*,'(i5)') icount
icarriage=icarriage+1
if (icarriage .eq. 15) then
write(*,'(/a)') ' @@ '
icarriage=0
endif
endif
call sleepqq(100)
enddo
c
end
works properly when i compile with
ifort testc.for
ifort /fpscomp:ioformat testc.for
but does not work properly when i compile with
ifort /fpscomp:all testc.for
ifort /fpscomp testc.for
i would have thought that :all would include :ioformat
--- james
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/fpscomp:ioformat is not the important option here - it's /fpscomp:general. ioformat has no effect on this program.
The difference with "general" and without is the default type of carriage control. Your new program works when the IVF default of CARRIAGECONTROL='LIST' is used but not when 'FORTRAN' is used. Specifying /fpscomp:all or /fpscomp (same as :all) sets "general" which changes the carriage control to 'FORTRAN'. (You can see the effect of this in that the leading space before the @@ is no longer displayed.)
I will admit that I am puzzled that the backslash doesn't work with 'FORTRAN' carriage control, as it is defined based on what is in the first character of the record! I'll have to ask our libraries developers about this.
The difference with "general" and without is the default type of carriage control. Your new program works when the IVF default of CARRIAGECONTROL='LIST' is used but not when 'FORTRAN' is used. Specifying /fpscomp:all or /fpscomp (same as :all) sets "general" which changes the carriage control to 'FORTRAN'. (You can see the effect of this in that the leading space before the @@ is no longer displayed.)
I will admit that I am puzzled that the backslash doesn't work with 'FORTRAN' carriage control, as it is defined based on what is in the first character of the record! I'll have to ask our libraries developers about this.

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