Previously speedy multi-threaded Fortran program slows dramatically on new M4 Max Mac Studio #6053
Unanswered
canecaster
asked this question in
Everyday usage
Replies: 1 comment
-
If it helps, I just ran the following GeekBench 6 benchmarks on the new Mac Studio: Single core score of 3999 and a multi-core score of 26338. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Output of
brew config
Output of
brew doctor
Description of issue
I have a Fortran application, compiled using Homebrew's gcc, that can be executed either to run with 1 thread or multiple threads. My experience on my M1 Ultra Mac Studio and M2 Max MacBookPro is that it runs about 10-20% faster with 2 threads than 1. However, I just finished setting up an M4 Max Mac Studio, and on this machine the application runs MUCH slower with 2 threads than 1. I have a standard set of program inputs to test the timings.
When run with 1 thread, the M4 Max Mac Studio timing is the fastest machine among the three, as expected. But I can't figure out why the multi-thread performance of this program is suddenly so much degraded. It does not seem to matter on which of the Macs I compile the program on (the code and executables sync via iCloud so fresh compilations propagate to all three machines). My compile command looks like this:
gfortran -O2 -fopenmp -o verify_model verify_model.f ${lib_path}/verifymlib.o ${lib_path}/atcflib.o ${lib_path}/tclip2020lib.o ${lib_path}/sondelib.o ${lib_path}/pchiplib.o ${lib_path}/splinelib.o
I'm wondering if anyone has any insight into what might be going wrong with multi-threading on the new M4 Max Mac Studio or how I'd begin to diagnose the issue. Multi-thread performance on my older two machines continues to be fine. I haven't run any standardized benchmarks on the new machine, so perhaps someone could point me to the most appropriate one(s) to run.
Grateful for any suggestions.
James
Beta Was this translation helpful? Give feedback.
All reactions