Advertisement
AthabaskanCoreMiner

VUPS.COM

Jun 12th, 2016
2,904
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
DCL 2.55 KB | None | 0 0
  1. $! CALCULATE_VUPS
  2. $! Use at your own risk.
  3. $!
  4. $ set noon
  5. $ cpu_multiplier = 10 ! VAX = 10 - Alpha/AXP = 40
  6. $ cpu_round_add = 1 ! VAX = 1 - Alpha/AXP = 9
  7. $ cpu_round_divide = cpu_round_add + 1
  8. $ init_counter = cpu_multiplier * 525
  9. $ speed_factor = 1 ! to increase no. of loops on fast CPUs
  10. $ 9$:
  11. $ init_loop_maximum = 205 * speed_factor
  12. $ start_cputime = f$getjpi(0,"CPUTIM")
  13. $ loop_index = 0
  14. $ 10$:
  15. $ loop_index = loop_index + 1
  16. $ if loop_index .ne. init_loop_maximum then goto 10$
  17. $ end_cputime = f$getjpi(0,"CPUTIM")
  18. $ IF end_cputime .LE. start_cputime + 1 ! not enough clock-ticks = CPU too fast
  19. $ THEN
  20. $ speed_factor = speed_factor + 1 ! increase no. of loops
  21. $ WRITE SYS$OUTPUT "INFO: Preventing endless loop (10$) on fast CPUs"
  22. $ GOTO 9$
  23. $ ENDIF
  24. $ init_vups = ((init_counter / (end_cputime - start_cputime) + -
  25. cpu_round_add) / cpu_round_divide) * cpu_round_divide
  26. $ IF init_vups .LE. 0
  27. $ THEN
  28. $ WRITE SYS$OUTPUT "Calibration error -> exiting (Please report this problem)"
  29. $ SHOW SYMB speed_factor
  30. $ SHOW SYMB init_vups
  31. $ SHOW SYMB init_counter
  32. $ SHOW SYMB end_cputime
  33. $ SHOW SYMB start_cputime
  34. $ SHOW SYMB cpu_multiplier
  35. $ SHOW SYMB cpu_rounding
  36. $ SHOW CPU
  37. $ EXIT
  38. $ ENDIF
  39. $ write sys$output " "
  40. $ loop_maximum = (init_vups * init_loop_maximum) / ( 10 * speed_factor )
  41. $ base_counter = (init_counter * init_vups) / 10
  42. $ vups = 0
  43. $ min_vups = %X7FFFFFFF
  44. $ max_vups = 0
  45. $ avg_vups = 0
  46. $ times_through_loop = 0
  47. $ 20$:
  48. $ start_cputime = f$getjpi(0,"CPUTIM")
  49. $ times_through_loop = times_through_loop + 1
  50. $ loop_index = 0
  51. $ 30$:
  52. $ loop_index = loop_index + 1
  53. $ if loop_index .ne. loop_maximum then goto 30$
  54. $ end_cputime = f$getjpi(0,"CPUTIM")
  55. $ IF end_cputime .LE. start_cputime
  56. $ THEN
  57. $ new_vups = 0 ! can not calculate VUPS (CPU too fast)
  58. $ WRITE SYS$OUTPUT "INFO: Loop too fast (20$) - ignoring VUPS data"
  59. $ ELSE
  60. $ new_vups = ((base_counter / (end_cputime - start_cputime) + -
  61. cpu_round_add) / cpu_round_divide) * cpu_round_divide
  62. $ ENDIF
  63. $ IF new_vups .LT. min_vups THEN $ min_vups = new_vups
  64. $ IF new_vups .GT. max_vups THEN $ max_vups = new_vups
  65. $ avg_vups = avg_vups + new_vups
  66. $ if new_vups .eq. vups then goto 40$
  67. $ vups = new_vups
  68. $ if times_through_loop .le. 5 then goto 20$
  69. $!! WRITE SYS$OUTPUT "INFO: Preventing endless loop 20$"
  70. $ 40$:
  71. $ vups = avg_vups / times_through_loop
  72. $ write sys$output " Approximate System VUPs Rating : ", -
  73. vups / 10,".", vups - ((vups / 10) * 10), -
  74. " ( min: ", min_vups/10,".", min_vups - ((min_vups / 10) * 10), -
  75. " max: ", max_vups/10,".", max_vups - ((max_vups / 10) * 10), " )"
  76. $ exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement