Commit 673bfef
Fix: quit explicitly for unsupported EXX stress combinations (deepmodeling#7717)
Stress_PW::stress_exx only sums same-pool (ik, iq) pairs without the
same-spin restriction used in the EXX energy evaluation, and crashes
on GPU. Previously these combinations ran silently and produced wrong
stress or segfaulted. Now Input_Conv quits with an explicit message when
EXX stress is requested with:
- basis_type = pw and nspin != 1
- basis_type = pw and kpar > 1
- basis_type = pw and device = gpu
- basis_type = lcao_in_pw (EXX energy comes from Exx_Lip, but the
stress would be evaluated with the pure PW formula)
The supported case (nspin = 1, kpar = 1, CPU) is unchanged.
Co-authored-by: Mohan Chen <mohanchen@pku.edu.cn>1 parent 13d0428 commit 673bfef
1 file changed
Lines changed: 33 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
517 | 521 | | |
518 | 522 | | |
519 | 523 | | |
520 | 524 | | |
521 | 525 | | |
522 | 526 | | |
523 | 527 | | |
524 | | - | |
| 528 | + | |
525 | 529 | | |
526 | 530 | | |
527 | 531 | | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
528 | 559 | | |
529 | 560 | | |
530 | 561 | | |
| |||
0 commit comments