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

What is "forrtl: severe (104)" ?

bgirl_02
Beginner
4,248 Views
I got this error in linux(Ubuntu 8.04 hardy).
forrtl: severe (104): incorrect POSITION= specifier value for connected file, unit 19 .........

I also tried ACCESS insted of POSITION but same kind of error came out.
forrtl: severe (104): incorrect ACCESS= specifier value for connected file, unit 19 .........

I compiled by ver. 10.0.023 for linux.
0 Kudos
11 Replies
rreis
New Contributor I
4,248 Views
Quoting - bgirl_02
I got this error in linux(Ubuntu 8.04 hardy).
forrtl: severe (104): incorrect POSITION= specifier value for connected file, unit 19 .........

I also tried ACCESS insted of POSITION but same kind of error came out.
forrtl: severe (104): incorrect ACCESS= specifier value for connected file, unit 19 .........

I compiled by ver. 10.0.023 for linux.

Can you post the relevant source lines (the one where you open the file?) What are you feeding POSITION with? Generally I only specify it when I want to apped stuff to the file (like POSITION='append' ). And... do you have permissions to write the file (just checking).
0 Kudos
Ron_Green
Moderator
4,248 Views
Quoting - rreis

Can you post the relevant source lines (the one where you open the file?) What are you feeding POSITION with? Generally I only specify it when I want to apped stuff to the file (like POSITION='append' ). And... do you have permissions to write the file (just checking).

Agreed: we need to see your OPEN statement for unit 19 and the READ or WRITE where this occurs.

You can compile and link with -g -traceback to find the exact source line where you crash.

ron
0 Kudos
bgirl_02
Beginner
4,248 Views

Thanks both of you. This is open and write statement.

OPEN (19,access='append',FILE='NEW_SOUR',STATUS='unknown')
or OPEN (19,FILE='NEW_SOUR',position='append',STATUS='unknown')

WRITE (19,*) NAME, ' ', expid

Also I own the file and I have write permission as you see below.
-rw-r--r-- 1 bgirl02 bgirl02 3572 2009-04-07 22:00 NEW_SOUR

0 Kudos
Xiaoping_D_Intel
Employee
4,248 Views

The error was normally caused by openning the same file multiple times with inconsistent POSITION specifier. For example in your case if you have already opened the non-null file with "POSITION=REWIND" and then try to reopen it with "POSITION=APPEND" you will get such error.

0 Kudos
rreis
New Contributor I
4,248 Views

The error was normally caused by openning the same file multiple times with inconsistent POSITION specifier. For example in your case if you have already opened the non-null file with "POSITION=REWIND" and then try to reopen it with "POSITION=APPEND" you will get such error.


you maybe right, bgirl_02, are you sure you don't have two open statments for the same file?

grep -ni OPEN *f90

would give you all the opens you use in your code...
0 Kudos
bgirl_02
Beginner
4,248 Views
I could not find the problem, which you said, in the sources.

Actually this is not my code. The execution binary, which was compiled somewhere, worked before.
I just changed one line and, after compilation, the error came out.
So I compiled original source again, and then, the same error also came out.

By the way, I compiled same source in aother PC with 9.0 version.
Do you think this runtime error came from compiler or library?

0 Kudos
rreis
New Contributor I
4,248 Views
Quoting - bgirl_02
I could not find the problem, which you said, in the sources.

Actually this is not my code. The execution binary, which was compiled somewhere, worked before.
I just changed one line and, after compilation, the error came out.
So I compiled original source again, and then, the same error also came out.

By the way, I compiled same source in aother PC with 9.0 version.
Do you think this runtime error came from compiler or library?


can you compile it with gfortran, just in case ? which flags are you using?
0 Kudos
bgirl_02
Beginner
4,248 Views
Quoting - rreis

can you compile it with gfortran, just in case ? which flags are you using?
Sorry for late.

After compiling with gfortran, when I run the execution file, following errors came out.

At line 844 of file dtau0.f
Fortran runtime error: Cannot change STATUS parameter in OPEN statement

Line 844 is same line which caused the error before.
OPEN (19,access='append',FILE='NEW_SOUR',STATUS='unknown')

I compiled like this

gfortran -o dtau0 dtau0.f subroutinefiles...
0 Kudos
Ron_Green
Moderator
4,248 Views
Quoting - bgirl_02
Sorry for late.

After compiling with gfortran, when I run the execution file, following errors came out.

At line 844 of file dtau0.f
Fortran runtime error: Cannot change STATUS parameter in OPEN statement

Line 844 is same line which caused the error before.
OPEN (19,access='append',FILE='NEW_SOUR',STATUS='unknown')

I compiled like this

gfortran -o dtau0 dtau0.f subroutinefiles...

This is also indicating that file 19 is already open by the time you get to this statement. You could try this:

close(19)
open( 19,access='append',file='NEW_SOUR',STATUS='unknown')


0 Kudos
bgirl_02
Beginner
4,248 Views

This is also indicating that file 19 is already open by the time you get to this statement. You could try this:

close(19)
open( 19,access='append',file='NEW_SOUR',STATUS='unknown')



Thank you so much.
I think it works!
I also appreciate everybody's comment.
0 Kudos
pramodblackbird
Beginner
4,248 Views
Thnx a lot, even I wanted an answer for the same...

0 Kudos
Reply