-
Notifications
You must be signed in to change notification settings - Fork 117
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
From CUDA only to CUDA+HIP #768
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really cool! What performance hit for HIP vs CUDA can we expect? From the issue #404 it seems like the HIP version performs quite a bit worse than expected?
@Dankomaister in #404 you also mentioned that MD was not working, and that the "results are incorrect". What results were incorrect, and has these issues been resolved? |
Thanks for the effort, getting this working smoothly would be fantastic! I managed to compile on LUMI (AMD MI250X) after changing
|
MD segfaults sound like problem in CPU? |
After some more investigation:
This is all on the LUMI cluster with HIP version: 6.0.32831-204d35d16 and rocm-6.0.3 with |
The "loop not unrolled" warnings should be gone now. For the segfaults, I have tried to use O1 for the code in the relevant folder and still O3 for other folders. Not sure if this help. We have a plan to rewrite this part using modern C++, so it will be ok in the future. |
Nice to see that HIP support is getting added! great job @brucefan1983. The issue I mentioned in #404 (except for the segmentation fault) was that running MD on multiple GPUs would result in incorrect results i.e. forces not calculated properly. Not sure if this is still an issue? @jesperbygg did you try running MD with multiple GPUs? |
Ok I tried to compile the HIP version on Dardel using ROCm 5.7.0 (the latest version available on Dardel). I tried adding
Changing
Adding a seed to the velocity command solved that problem and MD works! I also tried to run MD on multiple GPUs however this still gives segmentation fault with
So MD on multiple GPU still requires some work it seems. |
@Dankomaister Thank you for your further tests. The error message |
I have tested CUDA version and the C++ optimization level does not affect the overall speed at all. So I changed the C++ optimization level to |
OK I will try with using |
For me on LUMI, compiling everything with |
More testing, compiling everything with I tried to figure out what happens during parsing of the velocity command that causes the error with
I get the following output when running GPUMD
I cannot understand why but somehow the value of |
Hmm ok changing the if statements in
seems to fix the problem... somehow... MD now runs with |
It's so mysterious! How about if you add void Run::parse_velocity(const char** param, const int num_param) |
Indeed, the I just tried to initialize |
@Dankomaister If there is no better way, I will change the code following your fix, and refer to this page in comments. We can investigate multi-GPU later. |
I have followed your cod to change this part @Dankomaister |
Enable HIP compiling for running in AMD GPUs.