Closed hkershaw-brown closed 8 months ago
gfortran and nvhpc give the correct line. Looking like an intel problem.
small repoducer:
$ cat test_namelist_backspace.f90
program test_backspace
implicit none
integer :: ios, iunit
character(len=5) :: one, two, three, four, line
namelist /nums_nml/ one, two, three, four
one = 'nope'
two = 'nope'
three = 'nope'
four = 'nope'
open(newunit=iunit, file='input.nml', action='read', iostat=ios)
read(iunit, nml=nums_nml, iostat=ios)
print*, one, two, three, four
print*, 'iostat', ios
if (ios /= 0) then
backspace(iunit)
read(iunit, '(A)') line
print*, 'bad line: ', line
endif
close(iunit)
end program test_backspace
$cat input.nml
&nums_nml
one = 'one',
two = 'two',
cake = 'three'
four = 'four'
/
$ gfortran test_namelist_backspace.f90
$ ./a.out
one two nope nope
iostat 5010
bad line: cake
$ ifort test_namelist_backspace.f90
$./a.out
one two nope nope
iostat 19
bad line: four
posted in intel forum
that's too bad - it's always worked up to now. perhaps as a bandaid we can change the 'bad line: ' label somehow to indicate it might be the line before this one. suggestion: bad line is near: xxxx or bad line is close to: xxx
:bug: 🦝
Describe the bug
build utilities developer tests /developer_tests/utilities/work/ put an invalid entry in the input.nml
cheese = 'cake',
run ./nml_testWhat was the expected outcome?
INVALID NAMELIST ENTRY: cake = 'cheese' in namelist utilities_nml
What actually happened?
INVALID NAMELIST ENTRY: module_details = .false., in namelist utilities_nml
Error Message
On Derecho
Compare to ifort on my laptop:
Which model(s) are you working with?
All of them
Version of DART
Which version of DART are you using? You can find the version using
git describe --tags
v10.9.1
Have you modified the DART code?
nope
Build information
Derecho intel