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

Reading from file

ocean
Beginner
1,278 Views

Im trying to read some data from a file using a namelist block that looks like this:

Namelist /TEST/ A, B, DataPath

real*4 A
logical*4 B
character*200 DataPath

The data in the file is organized as follows:

$TEST
A = 0.0
B = .TRUE.
DataPath = C:RootUsers................................................ ! This line contains 190 characters
$END

I have notice that the read(TestRead, nml = TEST) statement in my code fails every time the DataPath line in the file contains more than about 100 characters.

Is there a way of reading more than 100 characters from the same line in the file with the namelist block shown above? I'm using IVF 9.0 on Windows 2000.

Thanks for your help.

Manny

0 Kudos
4 Replies
Steven_L_Intel1
Employee
1,278 Views
I created a full example and tried it in 9.1.025, but could not reproduce a problem. Please try a current version, and if it still fails, submit a complete example (source and data) to Intel Premier Support.
0 Kudos
Steven_L_Intel1
Employee
1,278 Views
Manny,

I saw that you submitted an issue but you did not include a test case. Please update your issue and attach a short program and a data file that shows the problem.
0 Kudos
ocean
Beginner
1,278 Views

Steve,

Thanks for your reply. I'll do just that as soon as I get a code sample. The problem I describe in my previous post appears to be caused by a piece of code that is part of a larger application.I need to isolate that code and verify that the problem still exists.

Manny

0 Kudos
ocean
Beginner
1,278 Views

I took another look at our legacy code and I have concluded that the problem is being caused by the source code itself and not the compiler.

Thanks for your help.

Manny

0 Kudos
Reply