Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test code seems much slower on with heap arrays #7

Open
CRquantum opened this issue Oct 20, 2021 · 1 comment
Open

test code seems much slower on with heap arrays #7

CRquantum opened this issue Oct 20, 2021 · 1 comment

Comments

@CRquantum
Copy link

CRquantum commented Oct 20, 2021

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

@CRquantum CRquantum changed the title test code seems much slower on Windows than on Linux test code seems much slower on Windows (with heap arrays) than on Linux Oct 20, 2021
@CRquantum CRquantum changed the title test code seems much slower on Windows (with heap arrays) than on Linux test code seems much slower on with heap arrays Oct 20, 2021
@princemahajan
Copy link
Owner

ok, this is the next thing to investigate on my todo list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants