Skip to content

[flang] Slow compilation and high memory usage for htdp.f #58729

@hawkinsp

Description

@hawkinsp

The attached file is from HTDP version 3.2.5.
htdp.zip

flang-new built from head as of today takes at least 2 minutes and more than 60GB of memory to compile this file. I don't know how much it takes in the end since I killed it once the memory usage reached that level.

Repro withflang-new -c htdp.f

gfortran 12.2.0 compiles it reasonably quickly and compactly (25.6s, 566MB memory usage):

$ /usr/bin/time -v gfortran -c htdp.f
...
        Command being timed: "gfortran -c htdp.f"
        User time (seconds): 25.56
        System time (seconds): 0.46
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:26.09
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 566388
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 134119
        Voluntary context switches: 11
        Involuntary context switches: 84
        Swaps: 0
        File system inputs: 0
        File system outputs: 21352
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    flangFlang issues not falling into any other categoryslow-compile

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions