Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 394
    • Issues 394
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2305
Closed
Open
Created Feb 27, 2022 by Robert Bernecky@rbeDeveloper

Parallel slowdown in Livermore Loops

-mt_pth results in serious slowdown!

This happens on a number of the Livermore Loops tests. This is typical:

sac@medusa:~/sac/benchmarks/LivermoreLoopsCtest/loop04$ sac2c loop04.sac -O3 -target seq -o out.seq
sac@medusa:~/sac/benchmarks/LivermoreLoopsCtest/loop04$ sac2c loop04.sac -O3 -target mt_pth -o out.mt
sac@medusa:~/sac/benchmarks/LivermoreLoopsCtest/loop04$ time out.seq < loop04.inp ;echo $?
Running Loop4_NAIVE
Number of repetitions: 20000000
Vector length        : 1001
Upper limit (n)      : 35
Element [5] of the result is: -0.073587732613706644, WANT is: -0.0735877326136999965
x[5] - WANT is -6.64746035994312479e-15
WANT - x[5] is 6.64746035994312479e-15
Wall Clock Time spent           :   0.199 secs
Computer Performance achieved   :   2.407 GFlops/s

real    0m0.201s
user    0m0.201s
sys     0m0.000s
0
sac@medusa:~/sac/benchmarks/LivermoreLoopsCtest/loop04$ time out.mt -mt 1 < loop04.inp ;echo $?
Running Loop4_NAIVE
Number of repetitions: 20000000
Vector length        : 1001
Upper limit (n)      : 35
Element [5] of the result is: -0.073587732613706644, WANT is: -0.0735877326136999965
x[5] - WANT is -6.64746035994312479e-15
WANT - x[5] is 6.64746035994312479e-15
Wall Clock Time spent           :   1.322 secs
Computer Performance achieved   :   0.363 GFlops/s

real    0m1.324s
user    0m1.324s
sys     0m0.000s
0
sac@medusa:~/sac/benchmarks/LivermoreLoopsCtest/loop04$ time out.mt -mt 2 < loop04.inp ;echo $?
Running Loop4_NAIVE
Number of repetitions: 20000000
Vector length        : 1001
Upper limit (n)      : 35
Element [5] of the result is: -0.073587732613706644, WANT is: -0.0735877326136999965
x[5] - WANT is -6.64746035994312479e-15
WANT - x[5] is 6.64746035994312479e-15
Wall Clock Time spent           :  69.401 secs
Computer Performance achieved   :   0.007 GFlops/s

real    1m9.403s
user    2m18.799s
sys     0m0.004s
0

sac@medusa:~/sac/benchmarks/LivermoreLoopsCtest/loop04$ sac2c -V 
sac2c 1.3.3-MijasCosta-774-g4dc6e2
build-type: RELEASE
built-by: "sac" at 2022-02-24T15:43:37

Running -mt 2 shows two threads running at 100% (system monitor), so I am guessing that there is some kind of locking problem going on.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking