Closed s117 closed 4 years ago
A guess: it might be caused by an unchecked malloc() call.
So when out of memory, NULL is returned and used.
Increasing the memory from 8GB to 16GB solved the problem in 603.bwaves_s_1_ref
and 603.bwaves_s_2_ref
And I observed the spike's uses around 11GB to simulator each 603.bwaves run. So the guess seems reasonable.
$ spike -m16384 pk -c speed_bwaves_base.riscv-m64 bwaves_1 < bwaves_1.in
Requesting target memory 0x400000000
******* Resetting core **********
****Initializing the processor system****
******* Resetting core **********
******* Resetting core **********
****Initialization complete****
BI-CGSTAB & symmetric difference scheme
3D Laminar shock wave propagation
Re: 100000.000000 Pr: 0.720000
grid size is: 108 131 251
CFL: 2.000 nuim: 0.100 nuex2: 0.100 nuex4: 0.050
Implicit scheme is working
Cubic initial configuration
Number of Time Steps: 80
Time step: 1 dt: 0.26805236261E-03
0.11557376220 0.10000000000E-02
......
Time step: 80 dt: 0.41929380035E-02
3.7693919829 0.10000000000E-02
cycle = 7633085355747
instret = 7633085355754
******* Resetting core **********
Though still want to confirm the guess, close this issue for now.
Similar to #17
Binary is compiled by https://github.com/s117/riscv-gnu-toolchain/commit/d0bdaa9a282a32cc68e6203098dc1162021ceba7