how can solve fortran running error like '^K^@^@^@^A^@^@^@^@^@^@^@%^@^@^B'

how can solve fortran running error like '^K^@^@^@^A^@^@^@^@^@^@^@%^@^@^B'

Hello profs,

     I write a fortran script and compile it with intel fortran compiler. Then I run it and mostly it works so well. the functin of scripts is to read some strings from the files containing losts of lines.

     but when it read one of the piles of files, error reported 'forrtl: severe (64): input conversion error, unit -5, file Internal Formatted Read'.

     I checked the codes and find the issue attributed to the line ' read(string, '(f14.3)') xfloatn' (where, string set to character*16, xfloatn to real*8). 

    Also when I debugged the program again, I outputed the string into files and checked what happened.  I find the lines like the following:

    ^K^@^@^@^A^@^@^@^@^@^@^@%^@^@^B
  150382809.969 7
 ^K^@^@^@^A^@^@^@^@^@^@^@%^@^@^B
  150385056.018 7
 ^K^@^@^@^A^@^@^@^@^@^@^@%^@^@^B

    In the upper lines, only lines containing float number is valid, the other is not hoped. I never meet with this situation before. Can you help me out for this issue.

    BTW, I run this script in linux platform, on the other hand, when I run it in windows platform with CVF, none of error is reported. I am puzzled.

    Best regards,

     yours alex

 

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

sorry about the questions posted a while before. I lost something.

when lines like

' ^K^@^@^@^A^@^@^@^@^@^@^@%^@^@^B
  150382809.969 7
 ^K^@^@^@^A^@^@^@^@^@^@^@%^@^@^B
  150385056.018 7
 ^K^@^@^@^A^@^@^@^@^@^@^@%^@^@^B'

came out,  the program still works. but when

' ^A^@^@^@^@^@^@^@^@^@^@^@^K^@^@^@'

came out, the program halted.

I guess the upper weird characters seem like control character of system?

Hope your help.

best regards

alex

 

nobody can solve this problem?

 

Login to leave a comment.