HPMC User Guide v 1.00
© 2026 Bassem W. Jamaleddine
In this section, you will be introduced on how to write OpenMP (OMP) programs on your HPMC calculator to be executed on the MIC. The programs are being offloaded on to the MIC Co-processor.
■ Running the OMP Program on the MIC
Consider the following program diffusion_omp.c shown in the listing below.
This section is not included in the SAMPLE PREVIEW.
# scp diffusion_omp_xphi mic0:/root
We ssh to the hpmc9's mic0, then run the code on the MIC.
# ssh mic0
(uos/HPMC9) 00:42 root@mic0: ~ # ./diffusion_omp_xphi
(HPMC9) 00:42 root@mic0: ~ # ./diffusion_omp_xphi Running diffusion kernel 6553 times Elapsed time : 129.454 (s) FLOPS : 11040.484 (MFlops) Throughput : 10.191 (GB/s) Accuracy : 1.363216e-05
On the MIC we can reveal the processes run by the program diffusion_omp_x.
(uos/HPMC9) 00:41 root@mic0: ~ # pstree -up
(HPMC9) 00:41 root@mic0: ~ # pstree -up
init(1)-+-coi_daemon(4354,micuser)---{coi_daemon}(4356)
|-getty(4370)
|-klogd(4333)
|-mpssd(4339)-+-{mpssd}(4341)
| `-{mpssd}(4342)
|-portmap(4290,1)
|-sshd(4322)-+-sshd(4374)---bash(4376)---diffusion_omp_x(4387)-+-{diffusion_omp_x}(4388)
| | |-{diffusion_omp_x}(4389)
| | |-{diffusion_omp_x}(4390)
| | |-{diffusion_omp_x}(4391)
| | |-{diffusion_omp_x}(4392)
| | |-{diffusion_omp_x}(4393)
| | |-{diffusion_omp_x}(4394)
| | |-{diffusion_omp_x}(4395)
| | |-{diffusion_omp_x}(4396)
| | |-{diffusion_omp_x}(4397)
| | |-{diffusion_omp_x}(4398)
...
| | |-{diffusion_omp_x}(4604)
| | |-{diffusion_omp_x}(4605)
| | |-{diffusion_omp_x}(4606)
| | |-{diffusion_omp_x}(4607)
| | |-{diffusion_omp_x}(4608)
| | |-{diffusion_omp_x}(4609)
| | |-{diffusion_omp_x}(4610)
| | |-{diffusion_omp_x}(4611)
| | |-{diffusion_omp_x}(4612)
| | |-{diffusion_omp_x}(4613)
| | |-{diffusion_omp_x}(4614)
| | `-{diffusion_omp_x}(4615)
| `-sshd(4616)---bash(4618)---pstree(4621)
|-syslogd(4330)
`-udevd(4113)-+-udevd(4336)
`-udevd(4363)
■ MIC Native Loading: micnativeloadex
To compare the execution of the OMP diffusion_omp.c in the previous section, we will remove all OpenMP directives and run it on the MIC.
This section is not included in the SAMPLE PREVIEW.
(HPMC9) 02:39 root@mic0: ~ # pstree -up
init(1)-+-coi_daemon(4354,micuser)-+-diffusion_base_(6024)-+-{diffusion_base_}(6030)
| | |-{diffusion_base_}(6031)
| | |-{diffusion_base_}(6032)
| | |-{diffusion_base_}(6033)
| | |-{diffusion_base_}(6034)
| | |-{diffusion_base_}(6035)
| | |-{diffusion_base_}(6036)
| | |-{diffusion_base_}(6037)
| | |-{diffusion_base_}(6038)
...
| | |-{diffusion_base_}(6245)
| | |-{diffusion_base_}(6246)
| | |-{diffusion_base_}(6247)
| | |-{diffusion_base_}(6248)
| | |-{diffusion_base_}(6249)
| | |-{diffusion_base_}(6250)
| | |-{diffusion_base_}(6251)
| | |-{diffusion_base_}(6252)
| | `-{diffusion_base_}(6253)
| |-{coi_daemon}(4356)
| `-{coi_daemon}(6026)
|-getty(4370)
|-klogd(4333)
|-mpssd(4339)-+-{mpssd}(4341)
| `-{mpssd}(4342)
|-portmap(4290,1)
|-sshd(4322)-+-sshd(4374)---bash(4376)
| `-sshd(4616)---bash(4618)---pstree(6254)
|-syslogd(4330)
`-udevd(4113)-+-udevd(4336)
`-udevd(4363)