wannier90
wannier90 copied to clipboard
Small fixes for variable allocation
- Some allocatable string variables are not allocated (progname, seedname and cpstatus in wannier_prog.F90, but there might be more for instance in postw90). With stricter compiler settings (e.g. recommended for debugging in config/make_gfort.inc) this causes an error. The problem is caused by
-fno-realloc-lhs
flag. If the arrays are explicitly allocated, the code would be more robust. *chkpt1 variable used in writing .chk file is declared with undefined length (wannier90_readwrite.F90). Parent variable is cpstatus declared with undefined length in wannier_prog.F90. This breaks backward compatibility with .chk file created with the old version of the code (where len=20). Maybe to ensure backward compatibility it would be better to still use len=20?