Bug report obtained via Claude Opus:
Typos get through, and at least one valid keyword is refused. Three causes,
all reproduced with wannier90.x -pp:
w90_readwrite_get_keyword_vector (src/readwrite.F90:2999) matches on a
bare prefix, without the =/:/space check that
w90_readwrite_get_keyword does at :2888. So berry_kmesh_nonsense = 7,
spin_kmesh_rubbish = 7 and dos_kmesh_xyzzy = 7 are all silently
accepted, while totally_bogus_keyword = 7 is correctly rejected.
w90_readwrite_clear_keywords never checks error after any of its ~258
calls, so each discards the previous one's report. A second kmesh* line
makes the kmesh read raise "found more than once" and return before
blanking the line; the error is dropped and the user is told
"Unrecognised keyword(s)" instead.
search_supcell_size is missing from the recognised-keyword list, so any
valid value stops the run as unrecognised. It is read and validated normally
(src/readwrite.F90:974), so = -1 gives the proper error but = 5 does
not. The keyword is unusable today.
parameters.xml already holds the full keyword list under a pre-commit check,
so generating the recognised list from it, or adding a test comparing the two,
would close this off. The comment in w90_readwrite_clear_keywords already
warns that the hand-maintained list "is not an ideal solution".
Bug report obtained via Claude Opus:
Typos get through, and at least one valid keyword is refused. Three causes,
all reproduced with
wannier90.x -pp:w90_readwrite_get_keyword_vector(src/readwrite.F90:2999) matches on abare prefix, without the
=/:/space check thatw90_readwrite_get_keyworddoes at:2888. Soberry_kmesh_nonsense = 7,spin_kmesh_rubbish = 7anddos_kmesh_xyzzy = 7are all silentlyaccepted, while
totally_bogus_keyword = 7is correctly rejected.w90_readwrite_clear_keywordsnever checkserrorafter any of its ~258calls, so each discards the previous one's report. A second
kmesh*linemakes the
kmeshread raise "found more than once" and return beforeblanking the line; the error is dropped and the user is told
"Unrecognised keyword(s)" instead.
search_supcell_sizeis missing from the recognised-keyword list, so anyvalid value stops the run as unrecognised. It is read and validated normally
(
src/readwrite.F90:974), so= -1gives the proper error but= 5doesnot. The keyword is unusable today.
parameters.xmlalready holds the full keyword list under a pre-commit check,so generating the recognised list from it, or adding a test comparing the two,
would close this off. The comment in
w90_readwrite_clear_keywordsalreadywarns that the hand-maintained list "is not an ideal solution".