LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-10-2010, 11:47 AM   #1
ladhikari
LQ Newbie
 
Registered: Sep 2010
Posts: 2

Rep: Reputation: 0
gfortran v4.4.1 run in linux machine gives runtime error


Hi,
I am new to both linux and fortran programming. I am trying to read from an external file, but it gives this error message:

Fortran runtime error: Bad integer for item 1 in list input

Part of the code that has the problem is:

open(unit=3,file=&
'../../../../../../atrain_data/prfdata/temp_pres_cld_profile_for_CRTM2006-06-15T200163.dat',FORM='formatted')
read(3,*)bsepos
read(3,*)toppos
write(3,*)bsepos
write(3,*)toppos
do 200 i1=1,102
read(3,*)presprf(i1)
write(3,*)presprf(i1)
200 continue
do 150 i2=1,101
read(3,*)preslyr(i2),templyr(i2)
write(3,*)preslyr(i2),templyr(i2)
150 continue
do 100 i3=1,7
read(3,*)modisBtemp(i3)
write(3,*)modisBtemp(i3)
100 continue
close(3)


All the variables have been declared before and there is no problem with that. The problem (error message) is in the (first) line that deals with open(unit=3,file='..//').

Any help will be greatly appreciated.
Thanks,
ladhikari
 
Old 09-11-2010, 07:36 AM   #2
hda7
Member
 
Registered: May 2009
Distribution: Debian wheezy
Posts: 244

Rep: Reputation: 31
Can you list the part that declares the variables (so we can tell what type they are)?

Also, that error (I think) means the input that is being read for an integer variable is not formatted as an integer. Check your input file.
 
Old 09-11-2010, 12:19 PM   #3
ladhikari
LQ Newbie
 
Registered: Sep 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you hda7. I figures out the main problem was with the input/output discrepancy. I rewrote the data in a column and was able to read.

Ladhikari
 
  


Reply

Tags
error, runtime


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime exception on a Solaris Machine chrismiceli Solaris / OpenSolaris 3 10-02-2009 02:46 AM
How to run a script to a remote linux machine from a windows machine squirrel001 Linux - Newbie 5 05-04-2009 06:06 PM
gfortran runtime error saray Linux - Software 1 05-02-2009 10:56 AM
Gfortran compile error aukuntin Linux From Scratch 2 01-28-2007 08:08 PM
Problem installing Java runtime env on machine eroica Linux - Software 3 03-06-2004 06:39 PM


All times are GMT -5. The time now is 04:58 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration