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

Successfully Running **ck_version** and **sycl_version** of Soil Mechanics #715

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ShuangLi-1
Copy link
Collaborator

Based on your previous guidance, I have re-debugged and corrected the ck_version and sycl_version of the soil mechanics module.

The issue was caused by a division by zero in the constitutive equation calculations, which I have now fixed. Thanks for your guidance.

Additionally, I have created two cases:

  • 2d_column_collapse_ck
  • 2d_column_collapse_sycl

On my computer, these cases can run successfully in Release mode, and the GPU is being utilized correctly. Please check them at your convenience.

Supplementary Notes

  1. For matrix transformation purposes, I copied Pull Request inlined vector up and degrade #703 (inline vector up and degrade) into my current version.
  2. This is a new account created using my Google email. I will use this account moving forward.

Simulation Results and GPU Utilization

GPU Computation
Figure 1: GPU utilization during computation.

Simulation Results
Figure 2: Simulation results.

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
@ShuangLi-1
Copy link
Collaborator Author

@Xiangyu-Hu
Thank you for your prompt response and guidance.
I have updated my code based on the latest master branch, made the necessary adjustments, and tested it. The corrected version avoids any inconsistencies with the current version and successfully runs both the CK and SYCL versions of the soil mechanics.
The changes have been updated in the pull request.

Thank you again for your support during the holiday season, and I wish you a Merry Christmas!

@ShuangLi-1 ShuangLi-1 marked this pull request as ready for review December 27, 2024 12:07
@ShuangLi-1 ShuangLi-1 marked this pull request as draft December 30, 2024 02:55
@Xiangyu-Hu
Copy link
Owner

Xiangyu-Hu commented Jan 1, 2025

@ShuangLi-1 Linux (g++) build is quite strict, and requires even no warning message. You can try to build using g++ locally first.

…rors where the initialization order is different from the definition order
@ShuangLi-1
Copy link
Collaborator Author

@ShuangLi-1 Linux (g++) build is quite strict, and requires even no warning message. You can try to build using g++ locally first.
Ok, I will try it. Thanks

@ShuangLi-1
Copy link
Collaborator Author

@ShuangLi-1 Linux (g++) build is quite strict, and requires even no warning message. You can try to build using g++ locally first.

I have modified the code to avoid the issue where the initialization order of variables differs from the definition order, as mentioned in the error message in this PR.

Locally, I can successfully compile and run 2d_column_collapse_ck with g++ and the -Werror=reorder flag, as shown in the screenshot.

Perhaps further testing can be performed.

1735730364927
Figure. The CmakePreset and results

@ShuangLi-1 ShuangLi-1 marked this pull request as ready for review January 2, 2025 06:39
<< interval_computing_time_step.seconds() << "\n";
std::cout << std::fixed << std::setprecision(9) << "interval_updating_configuration = "
<< interval_updating_configuration.seconds() << "\n";

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need have a regression test like

if (sph_system.GenerateRegressionData())
{
write_mechanical_energy.generateDataBase(1.0e-3);
}
else if (sph_system.RestartStep() == 0)
{
write_mechanical_energy.testResult();
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added it and pushed it. But I don't know how to test it on my own computer.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to copy the data files to here from the CPU version of this case.

tests/2d_examples/test_2d_column_collapse/regression_test_tool

So that the regression test can be carried out automatically when you run the case.

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

Successfully merging this pull request may close these issues.

3 participants