Skip to content

test code seems much slower on with heap arrays #7

@CRquantum

Description

@CRquantum

Hi @princemahajan !

I have written a Makefile for flint in windows using ifort, and gfortran in linux.
All the f90 files and Makefile is here,
https://gitlab.com/CRquantum/flint_test/-/tree/main/flint_OneAPI
The flint's f90 files is from your src folder, the test file is your test_CR3BP.f90.
Makefile is for gfortran in linux.
Makefile.win is for ifort in windows. Actually you could just add all the f90 files into visual studio with intel OneAPI, it will compile and run.

However, I found a problem, it seems the same code,
in linux with gfortran (no heap array) it only took 10 seconds.
But in windows compiled in visual studio and run (with heap arrays set to 0 so always heap arrays), it took me like at least 5 + minutes. I am a little confused.

If I do not heap arrays, so leave it blank as below

image

then the speed is about the same on windows with ifort and on Linux with gfortran, 10 seconds or so.

@princemahajan Do you know why heap arrays will cause a huge speed difference?

I also post at Fortran forum, https://fortran-lang.discourse.group/t/does-heap-arrays-slow-down-the-code-a-lot/2123

From VTune's results, perhaps looks like some allocate and deallocate arrays caused the heap arrays slow down.

Thank you very much indeed!

Best regards,
Rong

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions