I am now using the Parallel Studio XE 2015 Composer Edition for Fortran combined with Xcode 6.3 to run a program.
The program was made in order to read data from file first and then go for some further computation.
I had all my f90 files (including the main program and the modules) in the Project folder and it did compile and run.
But when I tried to input the file name and load the file, it seemed that it failed to read the file.
I have my code like this
.......
CHARACTER(LEN = 20) :: fileName
INTEGER :: iNode
REAL(KIND = dp) :: xBox, yBox, zBox
WRITE(*,'(A)', ADVANCE = "NO") "Input file name: "
READ(*,*) fileName
OPEN(1, FILE = TRIM(fileName)//'.in' , STATUS = 'UNKNOWN')
READ(1,*) iNode, xBox, yBox, zBox
........
When I ran the program and input the file name it simply returned forrtl: severe (24): end-of-file during read, unit 1...
I though it might be due to failure to find the file though I had put the data file (output.in) in the same folder as other .f90 files, as well as add it to the project.
I am just wondering how to deal with this issue (I thought it might be a reference/file location issue of Xcode, since this program is running well on other fortran compiler.)
Thanks.
-Abright