Skip to content

Conversation

zgn-26714
Copy link

@zgn-26714 zgn-26714 commented Jul 29, 2025

Adding the option "precision = single" to the INPUT file caused the simulation to fail.
1280X1280

The single-precision simulation crash bug does not exist on the develop branch.
A specific commit was identified where the single-precision bug exists in versions prior to this commit but is absent in versions after it. Therefore, this commit was cherry-picked onto the LTS branch.

Resolved two conflicts arising from two cherry-picks.
* source/module_hsolver/test/test_hsolver_sdft.cpp
* source/module_psi/psi_initializer_nao.cpp

After the cherry-pick, the program runs normally with precision = single.
The results of the same test case in single vs. double precision are compared below.( Double-precision is presented first)
1280X1280-2
1280X1280-3

Qianruipku and others added 2 commits July 29, 2025 17:01
* use psi_initializer

* fix compile

* same results of random init

* make atomic initialized results right

* finish refactor

* fix compile

* fix compile

* fix UTs

* update results

* update results

* update GPU results

* update

* refactor pw

* change 108_PW_RE_PINT_RKS results

* update results

* remove openmp for random generate

* update

* remove psi_initializer in Doc

* remove omp2

* fix compile
@mohanchen mohanchen added the Long-Time Support (LTS) Issues related to LTS version label Jul 30, 2025
@mohanchen
Copy link
Collaborator

It seems to me that the PR does not belong to LTS version

@mohanchen mohanchen added the Refactor Refactor ABACUS codes label Jul 30, 2025
…est/test_hsolver_sdft.cpp file

cherry-pick deepmodeling#5775 has resolved the issue of single-precision version errors

Tests were conducted locally on the previous and subsequent versions of cherry-pick, and it was found that the failed samples of both were almost the same. It was concluded that the problem was not caused by cherry-pick
@zgn-26714 zgn-26714 changed the title cherry-pick previous id to solve the single-precision error problem Cherry-picked #5775 to resolve the single-precision version error. Local testing was conducted on the versions before and after the cherry-pick. Since the LIBRI library could not be downloaded, both versions had tests that failed. However, upon inspection, it was found that the failed examples were almost identical in both versions. Therefore, it is concluded that the failures are not due to the cherry-pick。Additionally, a bug involving duplicate definitions in the file source/module_hsolver/test/test_hsolver_sdft.cpp was fixed Jul 31, 2025
@zgn-26714 zgn-26714 changed the title Cherry-picked #5775 to resolve the single-precision version error. Local testing was conducted on the versions before and after the cherry-pick. Since the LIBRI library could not be downloaded, both versions had tests that failed. However, upon inspection, it was found that the failed examples were almost identical in both versions. Therefore, it is concluded that the failures are not due to the cherry-pick。Additionally, a bug involving duplicate definitions in the file source/module_hsolver/test/test_hsolver_sdft.cpp was fixed Cherry-picked #5775 to resolve the single-precision version error. Jul 31, 2025
@Qianruipku
Copy link
Collaborator

Thanks for the PR.
Given the large number of modified files (142) for an LTS branch, I'm concerned about stability. This PR seems to include code refactoring.
Could you please consider a more focused approach, perhaps addressing only the specific bug without extensive refactoring for this stable release?

Copy link
Collaborator

@dyzheng dyzheng left a comment

Choose a reason for hiding this comment

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

LGTM

@dyzheng
Copy link
Collaborator

dyzheng commented Jul 31, 2025

Thanks for the PR. Given the large number of modified files (142) for an LTS branch, I'm concerned about stability. This PR seems to include code refactoring. Could you please consider a more focused approach, perhaps addressing only the specific bug without extensive refactoring for this stable release?

I have checked the tests with this PR carefully, I think this refactoring would not include high risk into LTS branch, the main change of this refactoring is dropping the old wavefunction initialization code. In my opinion, it is okay to accept this PR.

@mohanchen
Copy link
Collaborator

OK @dyzheng if you consider this is OK, you can go ahead and merge the PR

@dyzheng dyzheng merged commit 52457bf into deepmodeling:LTS Aug 4, 2025
14 checks passed
@zgn-26714 zgn-26714 deleted the LTS branch August 13, 2025 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Long-Time Support (LTS) Issues related to LTS version Refactor Refactor ABACUS codes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants