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

CVF 6 to Intel 9.1 Format changes #.###e+001 vs #.###e+01

carlls
Beginner
1,215 Views
Greeetings:

I have a mix of CVF 6 and Intel 9.1 FORTRAN codes. Seems CVF put out numbers with e+## format while the newer Intel puts out e+###. So reading old file in new code is no issue but not all codes are ported yet.

Is there a way to have Intel 9.1 FORTRAN put out e+## range?

Regards
Carl

0 Kudos
3 Replies
Steven_L_Intel1
Employee
1,215 Views
Please supply a test program that shows this behavior. I don't know of any reason why simply changing compilers should change the formatted output - especially as you're saying that a character is being dropped.

Also, I'll comment that 9.1 is quite old at this point.
0 Kudos
carlls
Beginner
1,215 Views
Please supply a test program that shows this behavior. I don't know of any reason why simply changing compilers should change the formatted output - especially as you're saying that a character is being dropped.

Also, I'll comment that 9.1 is quite old at this point.


Better than that I will solve my own problem ....

Seems the E format will take on optional format character E#so E15.6E2 will do the trick .... so the last digit sets the range of values.

As an alternative a "simple" sed script could be use to change the files ....

#!/bin/bash
cp $1 $1.bak
cat $1.bak | sed -e "s/([0-9.]*e[+-])0([0-9][0-9])/12 /g" >$1


Hope this helps someone else....

Regards
Carl

0 Kudos
Steven_L_Intel1
Employee
1,215 Views
I am concerned about the behavior change, which should not be there. Please show me an example that illustrates the difference.
0 Kudos
Reply