namelist with fortran77 ?
Jaap Karssenberg
j.g.karssenberg@student.utwente.nl
Fri Aug 4 07:44:00 GMT 2006
Steve Kargl wrote:
> Namelist should be implemented as required by the standard.
> Without see your code or a reduced testcase, one can only
> guess at whether it is feature or bug.
>
Attached a test case. Running this gives an error with gfortran, but not
with g77. I'm not sure what the exact specification is for the namelist
format, but I tried various variants for the input format and they all
failed.
[pardus@localhost]$ gfortran -o test_nml test_nml.f
[pardus@localhost]$ ./test_nml
Please enter namelist file
test_nml.txt
Error reading namelist
[pardus@localhost]$ g77 -o test_nml test_nml.f
[pardus@localhost]$ ./test_nml
Please enter namelist file
test_nml.txt
All OK.
[pardus@localhost]$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1.1/configure --prefix=/usr
--enable-shared --enable-languages=f95
--enable-threads=posix --enable-__cxa_atexit --disable-multilib
--libdir=/usr/lib
Thread model: posix
gcc version 4.1.1
[pardus@localhost]$ g77 -v
Reading specs from
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/3.4.3/specs
Configured with: ../gcc-3.4.3/configure --prefix=/usr
--enable-shared --enable-languages=f77
--enable-threads=posix --enable-__cxa_atexit
Thread model: posix
gcc version 3.4.3
Please tell me what I do wrong. As stated before I believe this code
worked with gfortran 4.0.3 - but I don't that installed at the moment
for testing; of course it is possible that the 4.0.3 package I had had
different compile time options - not sure.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_nml.f
Type: text/x-fortran
Size: 753 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060804/baea5d34/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_nml.txt
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20060804/baea5d34/attachment.txt>
More information about the Fortran
mailing list