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

input conversion error!

milenko1976
Beginner
4,144 Views
In the input file of my program NEW is in the first line, denotes new conductivity map.This is what I get:
forrtl: severe (64): input conversion error, unit -5, file Internal Formatted Read
Image PC Routine Line Source
mt3 0000000000488EED Unknown Unknown Unknown
mt3 00000000004879F5 Unknown Unknown Unknown
mt3 0000000000439CB0 Unknown Unknown Unknown
mt3 00000000004119DF Unknown Unknown Unknown
mt3 0000000000411212 Unknown Unknown Unknown
mt3 0000000000423B4D Unknown Unknown Unknown
mt3 00000000004216E0 Unknown Unknown Unknown
mt3 00000000004042D2 Unknown Unknown Unknown
mt3 0000000000403270 Unknown Unknown Unknown
I am using Intel 11.1 Linux Compiler.I thought in the first place it is some how related to 64 bit machine and have change some integer values but nothing improved.
0 Kudos
9 Replies
mecej4
Honored Contributor III
4,144 Views
Insufficient information. We need to see at least the pertinent parts of the code, the input statement, declarations of the items in the input list, and the input record that caused the error, at a minimum.

If this information fails to indicate a fix, one should proceed to Standard operating procedure, Step-2: compile with debug/traceback switches on, repeat run.

You wrote: "..somehow related to 64 bit...". Without background information, I would not make any speculations along these lines.
0 Kudos
milenko1976
Beginner
4,144 Views

include 'd2.dat'

character radek*80,rad80*(nmax-1)
integer*8 i,j,k,idrpar
integer*8 icharirg
integer*8 iaa
c--------------------------------------------------------------------

read(5,'(a80)')radek
do 50 i=1,80
if(ichar(radek(i:i)).ge.97.and.ichar(radek(i:i)).le.122)
& radek(i:i)=char(ichar(radek(i:i))-32)
50 continue
c ---------------------------------------------------------
c if 'new' is found in the first line, more general input
c file structure is used (any character in the conductivity
c map is allowed then)
c ---------------------------------------------------------
inewformat=index(radek,'new')
I have problem here.
The input file starts with new in the first line.When I omit it,I get conductivity map distorted.
0 Kudos
mecej4
Honored Contributor III
4,144 Views
The line

include 'd2.dat'

raises eyebrows. Does the file d2.dat contain data or code? Will its inclusion leave you with valid Fortran source code?

Having read 'new' into variable radek, you convert the string in radek to upper case in the subsequent DO loop. However, you set

inewformat=index(radek,'new')

instead of

inewformat=index(radek,'NEW')

Your statement 'I get conductivity map distorted' is so specific to your application domain and dependent on your calculation implementation details that it probably conveys little information to most people.
0 Kudos
milenko1976
Beginner
4,144 Views
Thanks macej.
Ok d2.dat is where the common blocks and parameters are.No source code inside.I have changed uppercase to lowercase,but no use of it.Something else is problem.Well yes I have problem with my conductivity map because the inital reading is not appropriate.
0 Kudos
jimdempseyatthecove
Honored Contributor III
4,144 Views
>>forrtl: severe (64): input conversion error, unit -5, file Internal Formatted Read

insert a line to write out the internal record to console prior to statement performing internal formatted read.
Something ought to show up. (also add a sequence number such that you can tell which iteration the error occures on).

Jim Dempsey
0 Kudos
milenko1976
Beginner
4,144 Views
Where should I insert it?Into input file?I don't think that would be good idea,because it has data that programs read.
0 Kudos
jimdempseyatthecove
Honored Contributor III
4,144 Views
Quoting milenko1976
Where should I insert it?Into input file?I don't think that would be good idea,because it has data that programs read.


write(*,*) '"',radek,'"' ! insert here
inewformat=index(radek,'new')
...
write(*,*) '"',radek(i,j),'"' ! insert here
read(radek(i:j), '(F9.9)') yourVariable ! this is your internal record formatted read

0 Kudos
Lina_F_
Beginner
4,144 Views

Hello everyone,

I am facing this error  

 forrtl: severe (64) input conversion error

i guessed that this is due to some characters like // appearing inside FORMAT statement. But, the problem is I cant go all the way to the full source code . It is composed of 23 fortran source codes with each composed of  10,000 to 25,000 line of codes.

Is there any compiler option to fix this. I used IFORT 14.0.3 with -fpp compiler option for compilation.

Thanks !!! 

0 Kudos
mecej4
Honored Contributor III
4,144 Views

Recompile and link using the -traceback option, and run the program again with the same input. When the input error occurs, a chain of line numbers will be printed, showing the specific READ statement that caused the error. Report that statement here, along with the matching FORMAT statement, and the line(s) of input data that was to be read by that statement.

0 Kudos
Reply