[AMBER-Developers] Pmemd no longer compiling with older GCC (4.8.5)

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Tue, 25 Jan 2022 14:55:40 -0500

Hi All,

Compiling pmemd from the latest Amber GIT repo today for me failed. A
lot of the errors seem like they're related to use of code that is not
supported in older fortran compilers, e.g.:

```
/u/droe/amber/GIT/test.gitlab/src/pmemd/src/xray/src/xray_contracts.F90:14.41:

      error stop "Unmet requirement: " // message
                                         1
Error: Parameter 'message' at (1) has not been declared or is a
variable, which does not reduce to a constant expression
/u/droe/amber/GIT/test.gitlab/src/pmemd/src/xray/src/xray_contracts.F90:16.37:

      error stop "Unmet requirement."
                                     1
Error: ERROR STOP statement not allowed in PURE procedure at (1)
```

I tinkered a bit with this one and was able to workaround by writing
the error message to stderr and making the subroutine non-pure, but
then I hit another bug:

```
/u/droe/amber/GIT/test.gitlab/src/pmemd/src/xray/src/xray_bulk_mask_impl_cpu.F90:174.16:

    unit_cell = unit_cell_
                1
Error: Can't convert CLASS(unit_cell_t) to TYPE(unit_cell_t) at (1)
```

This one seems like more of a pain and is related to the fact that
'class (unit_cell_t)' may not actually be 'type(unit_cell_t)', it
could be extended. The workaround is to manually assign everything but
it's now turning into a decent amount of work. So my question is do we
want to fix this for the older fortran compilers (I vote yes since
4.8.5 still ships with some systems, though not clear for how much
longer), or are we dropping support for the older compilers (in which
case cmake/configure needs to trap)?

-Dan

_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Tue Jan 25 2022 - 12:00:02 PST
Custom Search