Guest User

Untitled

a guest
Feb 23rd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.46 KB | None | 0 0
  1. GCC with MASS;
  2. Compilation command: gcc -o 2opt src/two_opt.c src/vnn.c src/util.c src/hill_climb.c -L/opt/ibm/xlmass/8.1.6/lib -I/opt/ibm/xlmass/8.1.6/include -lmassvp8 -lmass_simdp8 -lmass -lm -fopenmp -g -I./lib/ -Wall -O3 -mcpu=power8 -funroll-loops -ffast-math -mrecip=all -D __ibmxl__
  3. ---
  4. Min distance found = 150331.471335
  5.  
  6. Performance counter stats for './2opt /root/Parth/tsplib/pcb3038.tsp':
  7.  
  8. 51,93,16,13,967 cycles
  9. 1,15,43,66,56,959 instructions # 2.22 insn per cycle
  10. 42,60,03,38,667 pm_flop
  11.  
  12. 14.841823305 seconds time elapsed
  13.  
  14. --- --- ---
  15. With Flag added: mveclibabi=mass
  16. ---
  17. Min distance = 150331.471335
  18. Time taken = 14.680456
  19.  
  20. Performance counter stats for './2opt /root/Parth/tsplib/pcb3038.tsp':
  21.  
  22. 51,38,64,48,591 cycles
  23. 1,15,43,79,92,477 instructions # 2.25 insn per cycle
  24. 42,59,85,53,577 pm_flop
  25.  
  26. 14.704448017 seconds time elapsed
  27. ---------------------------------------------------------------------------------
  28. xlC with MASS:
  29. Flags used: -O3 -lmassvp8 -lmass_simdp8 -qarch=pwr8
  30. ---
  31. Min distance found = 150331.471335
  32.  
  33. Performance counter stats for './2opt /root/Parth/tsplib/pcb3038.tsp':
  34.  
  35. 41,78,74,85,042 cycles
  36. 95,90,46,25,620 instructions # 2.30 insn per cycle
  37. 41,74,38,95,699 pm_flop
  38.  
  39. 11.944742810 seconds time elapsed
  40. ----------------------------------------------------------------------------------
  41.  
  42. GCC flags used: -lm -g -I./lib/ -Wall -O3
  43. ---
  44. Execution: perf stat -e cycles,instructions,pm_flop -- ./2opt /root/Parth/tsplib/pcb3038.tsp
  45. Min distance found = 150331.471335
  46.  
  47. Performance counter stats for './2opt /root/Parth/tsplib/pcb3038.tsp':
  48.  
  49. 1,05,94,82,48,806 cycles
  50. 1,10,06,42,09,701 instructions # 1.04 insn per cycle
  51. 30,84,23,39,755 pm_flop
  52.  
  53. 30.278379166 seconds time elapsed
  54.  
  55. ----------------------------------------------------------------------
  56. GCC flags used: -lm -g -I./lib/ -Wall -ffast-math
  57. ---
  58. Min distance found = 150331.471335
  59.  
  60. Performance counter stats for './2opt /root/Parth/tsplib/pcb3038.tsp':
  61.  
  62. 4,15,98,08,36,030 cycles
  63. 4,39,97,72,28,466 instructions # 1.06 insn per cycle
  64. 36,26,21,59,981 pm_flop
  65.  
  66. 118.863982379 seconds time elapsed
  67.  
  68. -------------------------------------------------------------------------
  69. GCC flags used: -lm -fopenmp -g -I./lib/ -Wall -ffast-math -O3
  70. ---
  71. Min distance found = 150331.471335
  72.  
  73. Performance counter stats for './2opt /root/Parth/tsplib/pcb3038.tsp':
  74.  
  75. 96,38,91,74,428 cycles
  76. 83,00,93,99,457 instructions # 0.86 insn per cycle
  77. 25,39,55,14,615 pm_flop
  78.  
  79. 27.546819342 seconds time elapsed
  80.  
  81. ---------------------------------------------------------------------------
  82. GCC with MAAS;//incorrect compilation
  83. flags used: -lm -O3 -ffast-math
  84. ---
  85. Min distance found= 150331.471335
  86.  
  87. Performance counter stats for './2opt /root/Parth/tsplib/pcb3038.tsp':
  88.  
  89. 1,24,32,41,09,471 cycles
  90. 1,00,94,06,36,528 instructions # 0.81 insn per cycle
  91. 24,53,29,66,312 pm_flop
  92.  
  93. 35.528556756 seconds time elapsed
  94.  
  95. ----------------------------------------------------------------------------
  96.  
  97. Conclusion: Accuracy is maintained in all the different compiler flags used. GCC with -O3 -ffast-math gives optimal time.
  98. But xlC performs better on POWER systems compared to gcc with time of around 12 sec with the same input.
Add Comment
Please, Sign In to add comment