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

DFSU.read() very slow on AMD CPU or linux #709

Open
bhlevca opened this issue Aug 1, 2024 · 6 comments
Open

DFSU.read() very slow on AMD CPU or linux #709

bhlevca opened this issue Aug 1, 2024 · 6 comments

Comments

@bhlevca
Copy link

bhlevca commented Aug 1, 2024

Describe the bug
A clear and concise description of what the bug is.
I am expecting some differences but not 30x.

There is something in the read algorithm that may be favoured by Intel CPU.

I have a code

dfs = Dfsu(filename)
dsp = dfs.read(x=x, y=y)

The dfsu file is large ~ 52 GB.
The same read operation takes 17-18 sec on an Intel i7 CPU laptop running Windows 10 and 420 sec on a powerful AMD Ryzen 3950X desktop running Linux.

To Reproduce
Steps to reproduce the behavior:

Get a large DFSU file and use read (x,y)

System information:

  • Python version 3.12.4
  • MIKE IO version 1.7.1
@jsmariegaard
Copy link
Member

@JesperGr - this most be related to MIKE Core ...

@bhlevca
Copy link
Author

bhlevca commented Sep 19, 2024

@JesperGr - this most be related to MIKE Core ...

Is there anything we can do about it? It may be related to what you do in the read function. Is it using pandas in the underlying code? I know that pandas code is slower on AMD platforms.

@jsmariegaard
Copy link
Member

@bhlevca could you try with a profiler - I hear Scalene is great https://github.com/plasma-umass/scalene :-)

@bhlevca
Copy link
Author

bhlevca commented Sep 19, 2024

I guess that I need to use the mikeio source files to do useful profiling

@jsmariegaard
Copy link
Member

You get those when you install MIKE IO (pure python)

@bhlevca
Copy link
Author

bhlevca commented Sep 20, 2024

Usually, When I debug, I point Pythonpath to the git folder
From what you're saying, it will be enough to use the pip installed mikeio for the profiling purposes

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