-
Notifications
You must be signed in to change notification settings - Fork 32
Description
The README
states that
To build this project from the source code in this repository you need a Fortran compiler supporting at least the Fortran 2008 standard.
However, in Fortran 2008
A statement shall not have more than 255 continuation lines.
(see paragraph 2 of section 3.3.2.6 of Fortran 2008). Unfortunately the statement that defines vdwrad
in src/dftd3/data/vdwrad.f90
and the statements used to define the values of c6ab_view
in src/dftd3/reference.f90
have more than 255 continuation lines.
Some compilers don't check this, but others do. The limit, combined with the maximum length of a line (132 characters) imposes a maximum of ~34k characters in a statement up to Fortran 2018 (see paragraph 2 of section 6.3.2.6 of Fortran 2018; the limit was the same since Fortran 2003, and smaller before that).
The latest version of the standard addressed this: in Fortran 2003 (see section 6.3.2),
A line shall contain at most ten thousand characters. [...]
A statement shall not have more than one million characters.
I think it's a bit too early and disproportionate to indicate in the README
that "a Fortran compiler supporting Fortran 2023 is needed", so I was wondering if it would be reasonable to address this at the source code level:
c6ab_view
can be easily fixed by reducing the size of the chunks used to define the array, but I think thatvdwrad
needs a bit of code refactoring so that it is initialised from a module subroutine.