Commit a8185af
Zanthoxylum
Fix: use threadsafe death tests in DFPT suites to avoid fork-in-threaded-process deadlock
MODULE_DFPT_pw_run_test timed out (1700 s) in the gnu Test CI job: the
two irrep-loop tests run first execute OpenMP regions, so with the job's
OMP_NUM_THREADS=2 the process is multithreaded when the third test
(dftu-reservation EXPECT_EXIT) forks. The default fast-style child then
deadlocks on exit and the parent waits forever (reproduced locally under
OMP_NUM_THREADS=2: gtest warns 'detected 2 threads' and hangs).
Switch all three DFPT death tests to the fork+exec threadsafe style
(same pattern as module_container tensor_test). For the pw_run test also
bridge std::cout to std::cerr inside the death statement: WARNING_QUIT
prints the NOTICE block to stdout, while death tests match the child's
stderr; the old CaptureStdout+HasSubstr assertion cannot see the re-exec
child's output. Verified under OMP_NUM_THREADS=2: pw_run 3/3 in 0.3 s
(previously indefinite hang), kq_basis 5/5, pert_serial 8/8, and the
full MODULE_DFPT ctest batch 8/8.1 parent 7e6f180 commit a8185af
3 files changed
Lines changed: 13 additions & 7 deletions
File tree
- source/source_pw/module_dfpt
- test_serial
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
386 | 387 | | |
387 | 388 | | |
388 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
217 | 221 | | |
218 | 222 | | |
219 | 223 | | |
| |||
227 | 231 | | |
228 | 232 | | |
229 | 233 | | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
237 | 241 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| 627 | + | |
627 | 628 | | |
628 | 629 | | |
629 | 630 | | |
| |||
0 commit comments