opening a file in a new directory under Linux Intel Fortran compiler

opening a file in a new directory under Linux Intel Fortran compiler

Hi,

I have a basic question about creating and opening a file in a new directory under Linux Intel Fortran compiler.
I used to be able to do this by specifying the path and having STATUS='unknown' under windows CVF compiler. But it seems the Intel compiler has a differnt support for this feature?

This is the part of the fortran code that is relevant to the problem:
part of my code is:

filename = '/output/lat'//trim(adjust(clat))//'_lon'//trim(adjust(clon))//'_CT7'

OPEN(UNIT=77,FILE=trim(filename),STATUS='UNKNOWN') 

and the error is:

forrtl: No such file or directory
forrtl: severe (29): file not found, unit 77, file /output/lat89_lon200_CT7

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

Whether on Windows or Linux, you must first create the directory (if it does not already exist) before creating a file in the directory.

To create a root-level directory such as /output you may require filesystem permissions that ordinary users are not usually in possession of.

Quote:

mecej4 wrote:

Whether on Windows or Linux, you must first create the directory (if it does not already exist) before creating a file in the directory.

To create a root-level directory such as /output you may require filesystem permissions that ordinary users are not usually in possession of.

Thank you so much!! the problem solved.

Leave a Comment

Please sign in to add a comment. Not a member? Join today