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

line break in formatted output

may_ka
Beginner
674 Views

Hi

this code

write(CSTmp,"(I0)") size(this%RVPEffSize)
CSFormat="("//Trim(AdjustL(CSTmp))//"(1X,F20.10))"
write(this%ISOutputUnitEff,CSFormat,iostat=ISSubStat,iomsg=CSMsg)&
&(this%RVPEffSize(c1),c1=1,size(this%RVPEffSize))

is supposed to write the content of "this%RVPEffSize" into a single line of the file. It does so until "size(this%RVPEffSize)" is 51422. For larger sizes, a new line is inserted.

Is that intended or a bug or related to the operation system???

Thanks

Karl

ifort 14, ubuntu 14.04

0 Kudos
6 Replies
may_ka
Beginner
674 Views

Hi there,

searching the file to which the code write with "hexdump file" showed that the file contains line feeds. How can that happen??

Thanks

0 Kudos
Steven_L_Intel1
Employee
674 Views

That doesn't sound right to me. Woul you please post a short but complete progrsm thst demonstrates the problm?

0 Kudos
may_ka
Beginner
674 Views
Program Write
  Implicit None
  Integer :: i(500000), ii, issubstat
  Character(len=100) :: CSTmp
  Character(len=100) :: CSFormat
  i=(/(ii,ii=1,500000)/)
  write(CSTmp,"(I100)") 500000
  CSFormat="("//Trim(AdjustL(CSTmp))//"(I10))"
  open(500,file="tmp.out",form="formatted",action="write",status="repl&
    &ace")
  write(500,CSFormat,iostat=ISSubStat)&
    & (i(ii),ii=1,500000)
  close(500)
End Program Write

This will produce a file with 13 lines on a Intel(R) Core(TM) i7-3770 machine with a kubuntu14.04 64bit os.

This will not happen if the code is compiled with gfortran 4.8.

Thanks

Karl

0 Kudos
Steven_L_Intel1
Employee
674 Views

Thanks. I can reproduce this in version 14 but not in version 15. 15.0.2 is current.

0 Kudos
may_ka
Beginner
674 Views

Thanks Steve,

how can I get the update. In the "old days" I could download the compiler under a non-commercial license agreement. I could not find such a section on the current Intel webpage, just downloads for academic, student, open source and education. Did I missed anything?? Or has the Intel policy changed.

Thanks.

0 Kudos
Steven_L_Intel1
Employee
674 Views

Yes, the Intel policy changed. Right now, we're not offering free Fortran under any non-commercial license. Sometime later this year, Fortran will be available free for students. Sorry I don't have a better answer for you.

0 Kudos
Reply