Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
23 Views

line break in formatted output

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
Highlighted
Beginner
23 Views

Hi there,

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
Highlighted
23 Views

That doesn't sound right to

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

Retired 12/31/2016
0 Kudos
Highlighted
Beginner
23 Views

Program Write

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
Highlighted
23 Views

Thanks. I can reproduce this

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

Retired 12/31/2016
0 Kudos
Highlighted
Beginner
23 Views

Thanks Steve,

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
Highlighted
23 Views

Yes, the Intel policy changed

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.

Retired 12/31/2016
0 Kudos