Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GCC with MASS;
- 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__
- ---
- Min distance found = 150331.471335
- Performance counter stats for './2opt /root/Parth/tsplib/pcb3038.tsp':
- 51,93,16,13,967 cycles
- 1,15,43,66,56,959 instructions # 2.22 insn per cycle
- 42,60,03,38,667 pm_flop
- 14.841823305 seconds time elapsed
- --- --- ---
- With Flag added: mveclibabi=mass
- ---
- Min distance = 150331.471335
- Time taken = 14.680456
- Performance counter stats for './2opt /root/Parth/tsplib/pcb3038.tsp':
- 51,38,64,48,591 cycles
- 1,15,43,79,92,477 instructions # 2.25 insn per cycle
- 42,59,85,53,577 pm_flop
- 14.704448017 seconds time elapsed
- ---------------------------------------------------------------------------------
- xlC with MASS:
- Flags used: -O3 -lmassvp8 -lmass_simdp8 -qarch=pwr8
- ---
- Min distance found = 150331.471335
- Performance counter stats for './2opt /root/Parth/tsplib/pcb3038.tsp':
- 41,78,74,85,042 cycles
- 95,90,46,25,620 instructions # 2.30 insn per cycle
- 41,74,38,95,699 pm_flop
- 11.944742810 seconds time elapsed
- ----------------------------------------------------------------------------------
- GCC flags used: -lm -g -I./lib/ -Wall -O3
- ---
- Execution: perf stat -e cycles,instructions,pm_flop -- ./2opt /root/Parth/tsplib/pcb3038.tsp
- Min distance found = 150331.471335
- Performance counter stats for './2opt /root/Parth/tsplib/pcb3038.tsp':
- 1,05,94,82,48,806 cycles
- 1,10,06,42,09,701 instructions # 1.04 insn per cycle
- 30,84,23,39,755 pm_flop
- 30.278379166 seconds time elapsed
- ----------------------------------------------------------------------
- GCC flags used: -lm -g -I./lib/ -Wall -ffast-math
- ---
- Min distance found = 150331.471335
- Performance counter stats for './2opt /root/Parth/tsplib/pcb3038.tsp':
- 4,15,98,08,36,030 cycles
- 4,39,97,72,28,466 instructions # 1.06 insn per cycle
- 36,26,21,59,981 pm_flop
- 118.863982379 seconds time elapsed
- -------------------------------------------------------------------------
- GCC flags used: -lm -fopenmp -g -I./lib/ -Wall -ffast-math -O3
- ---
- Min distance found = 150331.471335
- Performance counter stats for './2opt /root/Parth/tsplib/pcb3038.tsp':
- 96,38,91,74,428 cycles
- 83,00,93,99,457 instructions # 0.86 insn per cycle
- 25,39,55,14,615 pm_flop
- 27.546819342 seconds time elapsed
- ---------------------------------------------------------------------------
- GCC with MAAS;//incorrect compilation
- flags used: -lm -O3 -ffast-math
- ---
- Min distance found= 150331.471335
- Performance counter stats for './2opt /root/Parth/tsplib/pcb3038.tsp':
- 1,24,32,41,09,471 cycles
- 1,00,94,06,36,528 instructions # 0.81 insn per cycle
- 24,53,29,66,312 pm_flop
- 35.528556756 seconds time elapsed
- ----------------------------------------------------------------------------
- Conclusion: Accuracy is maintained in all the different compiler flags used. GCC with -O3 -ffast-math gives optimal time.
- 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