Menu ▾ ▴

#4295 Rabbit regression failures on big-endian host

open
nobody
rab (2) uCsim (9)
Simulator
5
37 minutes ago
14 hours ago
No

Currently, some regression tests fail for Rabbit ports on big-endian ppc64; I do not see them fail on little-endian amd64 and aarch64.

Summary for 'ucr2k'                  :      5 failures, 37229 tests, 6542 test cases,  7016589 bytes,  315951570 ticks
   Failure: cases/tst_bug-3129
   Failure: cases/tst_dilithium-ntt
   Failure: cases/tst_gcc-torture-execute-pr91137
   Failure: cases/coremark/coremark_mem_method_MEM_STACK
   Failure: cases/coremark/coremark_mem_method_MEM_STATIC

Discussion

  • Philipp Klaus Krause

    • labels: rab --> rab, uCsim
     
  • Philipp Klaus Krause

    For dilithium-ntt, the .ihx is identical on ppc64 to amd64. I also tried running the ihx from bug-3129 and gcc-torture-execute-pr91137 on amd64, and it passes there.

    So we can assume that SDCC generates correct code. The ppc64 machine in the farm (nemesis, Power 9) has somewhat weak single-thread performance, comparable to a Raspi 4 or so. The test times out there. Regression test timeout is 180s. So why does it time out?

    The tests take quite some time, even on Strix Halo (42s for dilithium-ntt, 22s for bug-3129, 17s for gcc-torture-execute-pr91137.

    • Has the generated code become less efficient? This would be a compiler regression.
    • Has uCsim become slower? This would be a uCsim regression.
    • Is uCsim hanging on ppc64? This would be a uCsim bug.
     

    Last edit: Philipp Klaus Krause 11 hours ago
    • Philipp Klaus Krause

      Looks like I just crashed nemesis (probably used too much RAM). Findings from before the crash:

      • uCsim from trunk on the .ihx files of the failing tests does not terminate within an hour.
      • Tests pass in [r17133]
      • Tests fail in [r17135]

      P.S.: Guess it wasn't a real crash, just he machine becoming very slow due to swapping. Anway, here are results of the uCsim invokation on nemesis (in [r17133], uCsim takes 13s for this .ihx, for [r17135] and current trunk I did cancel it after waiting a few min):

      [r17133]:

      philipp@nemesis:~/sdcc-17133/support/regression$ ../../sim/ucsim/src/sims/rxk.src/ucsim_rxk -tr3kasdcc  /tmp/tst_gcc-torture-execute-pr91137.ihx < ./ports/ucr3ka/uCsim.cmd
      uCsim 0.9.11, Copyright (C) 1997 Daniel Drotos.
      uCsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
      This is free software, and you are welcome to redistribute it
      under certain conditions; type `show c' for details.
      1000 words read from /tmp/tst_gcc-torture-execute-pr91137.ihx
      set error non-classified off
      set error unknown_code off
      set error memory off
      set error stack off
      set hw simif rom 0x7fff
      vcd0_on=0
      dreg0_on=0
      step 500000000 vclk
      state
      quit
      Error stack not found
      0
      0
      --- Running: gcc-torture-execute-pr91137.c
      Running testTortureExecute
      --- Summary: 0/0/1: 0 failed of 0 tests in 1 cases.
      
      Stop at 0x000559: (110) Program stopped itself
      F 0x000559
      Simulated 54134744 ticks (5.413e+01 sec)
      Host usage: 12.941251 sec, rate=4.183115
      CPU state= OK PC= 0x000559 frequency= 1000000 HZ
      Operation since last reset= 23887739 vclks
      Inst= 12288604 Fetch= 18637142 Read= 3475599 Write= 1774998
      Total time since last reset= 54.134743985618591 sec (54134744 clks)
      Time in isr = 0.000000000000000 sec (0 clks) 0.00%
      Time in idle= 0.000000000000000 sec (0 clks) 0.00%
      Most value of stack pointer= 0x000000
      Simulation: stopped
      Runtime: 12.962756 sec
      

      [r17135]:

      philipp@nemesis:~/sdcc-17135/support/regression$ ../../sim/ucsim/src/sims/rxk.src/ucsim_rxk -tr3kasdcc  /tmp/tst_gcc-torture-execute-pr91137.ihx < ./ports/ucr3ka/uCsim.cmd
      uCsim 0.9.12, Copyright (C) 1997 Daniel Drotos.
      uCsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
      This is free software, and you are welcome to redistribute it
      under certain conditions; type `show c' for details.
      1000 words read from /tmp/tst_gcc-torture-execute-pr91137.ihx
      set error non-classified off
      set error unknown_code off
      set error memory off
      set error stack off
      set hw simif rom 0x7fff
      vcd0_on=0
      dreg0_on=0
      step 500000000 vclk
      state
      quit
      Error stack not found
      0
      Parser error: syntax error
      0
      --- Running: gcc-torture-execute-pr91137.c
      Running testTortureExecute
      ^C
      

      [r17327]:

      philipp@nemesis:~/sdcc-trunk/sdcc/support/regression$ ../../sim/ucsim/src/sims/rxk.src/ucsim_rxk -tr3kasdcc  /tmp/tst_gcc-torture-execute-pr91137.ihx < ./ports/ucr3ka/uCsim.cmd
      uCsim 0.9.12, Copyright (C) 1997 Daniel Drotos.
      uCsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
      This is free software, and you are welcome to redistribute it
      under certain conditions; type `show c' for details.
      1000 words read from /tmp/tst_gcc-torture-execute-pr91137.ihx
      set error non-classified off
      set error unknown_code off
      set error memory off
      set error stack off
      set hw simif rom 0x7fff
      vcd0_on=0
      dreg0_on=0
      step 500000000 vclk
      state
      quit
      Error stack not found
      0
      0
      --- Running: gcc-torture-execute-pr91137.c
      Running testTortureExecute
      ^C
      
       

      Related

      Commit: [r17133]
      Commit: [r17135]


      Last edit: Philipp Klaus Krause 9 hours ago
    • Daniel Drotos

      Daniel Drotos - 1 hour ago

      It is uCsim regression. Introducing timer periferals in rabbit simulator made it slower. The more peripherals being implemented the slower simulation speed can be achived.

       
      • Philipp Klaus Krause

        Philipp Klaus Krause - 37 minutes ago

        It being a bit slower is what I would have expected. But what I see looks more extreme. In a very quick test I just did, 1000000 r3ka simulation steps on nemesis take:

        I didn't expect a relatively simple peripheral to take so much more simulation time than the CPU core.

        Philipp

         

        Related

        Commit: [r17133]
        Commit: [r17135]
        Commit: [r17321]

  • Philipp Klaus Krause

    • Category: other --> Simulator
     
  • Daniel Drotos

    Daniel Drotos - 50 minutes ago

    [r17334] turns off simulation of rabbit timers.

     

    Related

    Commit: [r17334]


Log in to post a comment.