Skip to content

Debug compilation issue with MMFF #63

@NF-AMU

Description

@NF-AMU

Hello,
When compiling Tinker8.7.2 in debug mode using gfortran version 9.3.0 (Ubuntu 9.3.0-10ubuntu2) and OPTFLAGS := -Og -g -ffpe-trap=invalid,zero,overflow -Wall -fcheck=all -fbacktrace, running the aspirin case available in the examples directory fails with:
Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:
#0 0x7ff094a5fcd1 in ???
#1 0x7ff094a5eea5 in ???
#2 0x7ff09474520f in ???
#3 0x55e9716deca3 in kvdw_
at /home/ferre/tinker/8.7.2/source_orig/kvdw.f:352
#4 0x55e971338d19 in mechanic_
at /home/ferre/tinker/8.7.2/source_orig/mechanic.f:94
#5 0x55e9711a42b0 in analyze
at /home/ferre/tinker/8.7.2/source_orig/analyze.f:54
#6 0x55e9711a54c4 in main
at /home/ferre/tinker/8.7.2/source_orig/analyze.f:23

Using gdb shows that the error is precisely:
352 gik = (rad(i)-rad(k))/(rad(i)+rad(k))
which I confirms by printing both i and k values of the rad array. Both are 0.0d0, hence the forbidden division par 0.

Note that this error does not show up when normal optimization is achieved at compilation time.

Best regards,
Nicolas Ferré,
Aix-Marseille Université, France

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions