Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-02-2014, 05:20 AM   #1
Registered: Feb 2013
Posts: 274

Rep: Reputation: 9
A question about compilation error


I have a code written in fortran. When I compile it with gfortran, mpif90 or f95, I receive the following error:

open (is1, file='tmpfil',form='formatted',status='SCRATCH')
Error: The STATUS specified in OPEN statement at (1) cannot have the value SCRATCH if a FILE specifier is present
I don't know if here is the place to ask this question or I should be diverted somewhere else.
Please guide me on this.
Old 04-02-2014, 08:32 AM   #2
LQ Newbie
Registered: Mar 2011
Posts: 11

Rep: Reputation: 0
From the looks of it, the open function does not allow you to specify a file name when using status='SCRATCH'

if OLD or NEW is specified, the FILE= specifier must be designated. If SCRATCH is specified, the FILE= specifier cannot be specified.

'SCRATCH' -- For a file opened with STATUS='SCRATCH', a temporary file with a name of the form tmp.FAAAxnnnnn is opened. Any other STATUS specifier without an associated file name results in opening a file named 'fort.n', where n is the specified logical unit number. By default, a scratch file is deleted when closed or during normal termination. If the program aborts, then the file may not be deleted. To prevent deletion, CLOSE with STATUS='KEEP'.

Hope that helps,
Old 04-02-2014, 09:37 AM   #3
Registered: Feb 2013
Posts: 274

Original Poster
Rep: Reputation: 9
Hi, I have enclosed the code. With some manipulations, I am receiving a new error:

At line 126 of file grid2cube.f (unit = 5, file = 'stdin')
Fortran runtime error: End of file
The input file of this code is generated by a bigger code and I can read the contents of the input to be able to see what is wrong with the input.

I would be extremely thankful if anyone help to solve this problem.
Attached Files
File Type: txt question.f.txt (6.8 KB, 6 views)


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
unable to resolve compilation error;./List.c:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ amolgupta Programming 3 01-09-2009 11:09 AM
Inkscape compilation error: *** [extension/internal/pdfinput/pdf-parser.o] Error 1 w1k0 Slackware 12 10-25-2008 10:53 AM
compilation error : /tmp/cczC6Kc3.s:7368: Error: unknown pseudo-op: `.ltorg' nankie Red Hat 0 08-19-2008 11:15 AM
Error during the compilation of Prozilla. How to correct the recursive error? deepumnit Linux - Software 1 01-10-2008 12:02 PM
Kernel compilation error: Error 15: File not found Niceman2005 Linux - General 9 10-04-2007 04:45 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:32 PM.

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