Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
xeonphi [2015/09/16 13:03] – [Offload mode] adminxeonphi [2020/02/05 15:48] (Version actuelle) – admin
Ligne 1: Ligne 1:
 ~~ODT~~ ~~ODT~~
  
 +<note warning>This documentation is obsolete. 
 +XeonPHI cards are disabled in this node.
 +</note>
 ====== XeonPHI ====== ====== XeonPHI ======
  
Ligne 20: Ligne 23:
  
  
-**3 Devices (mic0,mic2,mic3,mic4)**+**3 Devices (mic0,mic2,mic3)**
 |Family         |5110P| |Family         |5110P|
 |Number of cores| 60| |Number of cores| 60|
Ligne 37: Ligne 40:
  
  
-  * [[http://mesoadmin.univ-fcomte.fr/ganglia2/graph_all_periods.php?c=lumiere&h=node2-2&m=mic0_user| Card usage (ganglia)]] +  * [[http://mesoadmin.univ-fcomte.fr/ganglia2/graph_all_periods.php?c=lumiere&h=node1-51&m=mic0_user| Card usage (ganglia)]] 
-  * [[http://mesoadmin.univ-fcomte.fr/ganglia2/?c=lumiere&h=node2-2|Node usage (ganglia)]]+  * [[http://mesoadmin.univ-fcomte.fr/ganglia2/?c=lumiere&h=node1-51|Node usage (ganglia)]]
  
  
Ligne 76: Ligne 79:
 </code> </code>
  
-A remote shell is opened to the node2-2+A remote shell is opened to the node1-51
  
 <code bash> <code bash>
Ligne 83: Ligne 86:
 waiting for interactive job to be scheduled ... waiting for interactive job to be scheduled ...
 Your interactive job 79206 has been successfully scheduled. Your interactive job 79206 has been successfully scheduled.
-Establishing builtin session to host node2-2.cluster ...+Establishing builtin session to host node1-51.cluster ...
  
-[user@node2-2 ~]$+[user@node1-51 ~]$
 </code> </code>
  
-<note tip>Change directory to WORK (''cd WORK'') (because $HOME is readonly on all computing nodes)</note>+<note tip>Change directory to WORK (''cd WORK'') (because ''HOME'' is readonly on all computing nodes)</note>
  
 You can check the state of the MIC card by: You can check the state of the MIC card by:
Ligne 94: Ligne 97:
 <code bash> <code bash>
  
-[user@mesologin1 ~]$ micinfo+[user@node1-51 ~]$ micinfo
 </code> </code>
 <WRAP center round important 60%> <WRAP center round important 60%>
Ligne 105: Ligne 108:
  
  
-[user@node2-2 ~]$ module load intel/mic+[user@node1-51 ~]$ module load intel/mic
  
 </code> </code>
Ligne 179: Ligne 182:
  
 <WRAP center round tip 60%> <WRAP center round tip 60%>
-By default ''mic0'' is used. Use ''-d mic1'' to use another card for example ''mic1''.+By default ''mic0'' is used. Use ''-d 1'' to use ''mic1'' for example.
 </WRAP> </WRAP>
    
Ligne 202: Ligne 205:
 <code bash> <code bash>
  
-$ micnativeloadex ./hello.mic -e "export OMP_NUM_THREADS=40"+$ micnativeloadex ./hello.mic -e "OMP_NUM_THREADS=40"
  
 </code>  </code> 
Ligne 286: Ligne 289:
 <code> <code>
 Hello World from thread = 0 Hello World from thread = 0
-Number of threads = 4, running on node2-2-mic0+Number of threads = 4, running on node1-51-mic0
 Hello World from thread = 2 Hello World from thread = 2
 Hello World from thread = 3 Hello World from thread = 3
Ligne 400: Ligne 403:
 <WRAP center round tip 60%> <WRAP center round tip 60%>
 This value can be set from 0 to 3, where a higher number means more debugging information. This value can be set from 0 to 3, where a higher number means more debugging information.
 +</WRAP>
 +
 +<WRAP center round important 60%>
 +Since we have several devices in host, use OFFLOAD_DEVICES environment variable to choose the offload device.
 +For example: ''export OFFLOAD_DEVICES=1,2'' to offload on ''mic1'' and ''mic2''   
 </WRAP> </WRAP>
  
Ligne 431: Ligne 439:
 ^Host^Coprocessor^ ^Host^Coprocessor^
 |OMP_NUM_THREADS|MIC_OMP_NUM_THREADS| |OMP_NUM_THREADS|MIC_OMP_NUM_THREADS|
-|KMP_AFFINITY|MIC_KMP_AFFINIT|+|KMP_AFFINITY|MIC_KMP_AFFINITY|
  
 For example 2 threads on host and 200 on card : For example 2 threads on host and 200 on card :
Ligne 582: Ligne 590:
    - Compile the program for the coprocessor (-mmic) <code bash>$ mpiicc -mmic hello_mpi.c -o hello_mpi.mic</code>    - Compile the program for the coprocessor (-mmic) <code bash>$ mpiicc -mmic hello_mpi.c -o hello_mpi.mic</code>
    - Set the ''I_MPI_MIC'' variable <code bash>export I_MPI_MIC=1</code>     - Set the ''I_MPI_MIC'' variable <code bash>export I_MPI_MIC=1</code> 
-   - Launch MPI jobs on the coprocessor ''mic0'' from the ''host'' you **MUST** give the full path to program (because WORK is shared with MIC) <code bash>mpirun -host mic0  -n 244 /Work/kmazouzi/hello_mpi.mic</code>+   - Launch MPI jobs on the coprocessor ''mic0'' from the ''host'' you **MUST** give the full path to program (because WORK is shared with MIC) <code bash>mpirun -host mic0  -n 244 /Work/Users/kmazouzi/hello_mpi.mic</code>
 <WRAP center round info 60%> <WRAP center round info 60%>
 Alternatively one can copy and login to the mic0 and run mpirun there) Alternatively one can copy and login to the mic0 and run mpirun there)
Ligne 596: Ligne 604:
   - Compile the program for the host <code bash>$ mpiicc -mmic hello_mpi.c -o hello_mpi</code>   - Compile the program for the host <code bash>$ mpiicc -mmic hello_mpi.c -o hello_mpi</code>
   - Set the ''I_MPI_MIC'' variable <code bash>export I_MPI_MIC=1</code>    - Set the ''I_MPI_MIC'' variable <code bash>export I_MPI_MIC=1</code> 
-  - Launch MPI jobs on the host node2-2 and on the coprocessor mic0 <code bash>$ mpirun -host node2-2 -n 1 ./hello_mpi : -n 244  -host mic0 /Work/kmazouzi/hello_mpi.mic</code> this will run 1 process on host (node2-2) and 244 on mic0. +  - Launch MPI jobs on the host node1-51 and on the coprocessor mic0 <code bash>$ mpirun -host node1-51 -n 1 ./hello_mpi : -n 244  -host mic0 /Work/Users/kmazouzi/hello_mpi.mic</code> this will run 1 process on host (node1-51) and 244 on mic0. 
  
 <WRAP center round important 60%> <WRAP center round important 60%>
Ligne 673: Ligne 681:
 <code> <code>
 OMP_NUM_THREADS=10 mpirun -np 3 ./a.out  OMP_NUM_THREADS=10 mpirun -np 3 ./a.out 
-Hello world from processor node2-2, rank 1 out of 3 processors +Hello world from processor node1-51, rank 1 out of 3 processors 
-Hello world from processor node2-2, rank 2 out of 3 processors +Hello world from processor node1-51, rank 2 out of 3 processors 
-Hello world from processor node2-2, rank 0 out of 3 processors +Hello world from processor node1-51, rank 0 out of 3 processors 
-Hello world from thread 0 on processor node2-2-mic0, from mpi process 0 +Hello world from thread 0 on processor node1-51-mic0, from mpi process 0 
-Hello world from thread 2 on processor node2-2-mic0, from mpi process 0 +Hello world from thread 2 on processor node1-51-mic0, from mpi process 0 
-Hello world from thread 4 on processor node2-2-mic0, from mpi process 0 +Hello world from thread 4 on processor node1-51-mic0, from mpi process 0 
-Hello world from thread 6 on processor node2-2-mic0, from mpi process 0 +Hello world from thread 6 on processor node1-51-mic0, from mpi process 0 
-Hello world from thread 3 on processor node2-2-mic0, from mpi process 0 +Hello world from thread 3 on processor node1-51-mic0, from mpi process 0 
-Hello world from thread 7 on processor node2-2-mic0, from mpi process 0 +Hello world from thread 7 on processor node1-51-mic0, from mpi process 0 
-Hello world from thread 8 on processor node2-2-mic0, from mpi process 0 +Hello world from thread 8 on processor node1-51-mic0, from mpi process 0 
-Hello world from thread 9 on processor node2-2-mic0, from mpi process 0 +Hello world from thread 9 on processor node1-51-mic0, from mpi process 0 
-Hello world from thread 5 on processor node2-2-mic0, from mpi process 0 +Hello world from thread 5 on processor node1-51-mic0, from mpi process 0 
-Hello world from thread 1 on processor node2-2-mic0, from mpi process 0+Hello world from thread 1 on processor node1-51-mic0, from mpi process 0
  
  
Ligne 733: Ligne 741:
 </code> </code>
 </note> </note>
 +
 +===== Usefull env variables =====
 +
 +^Variable^possibile values ^ doc ^
 +|  MKL_MIC_ENABLE | 0, 1| enable or not Automatic MKL offload |
 +|  OFFLOAD_REPORT |0,1,2,3 | offload debug informations | 
 +|  OFFLOAD_DEVICES |{0,1,2,3} | choose device de offload |
 +|  MKL_MIC_X_WORKDIVISION | (X is id of device) | work division between the host and the coprocessor|
 ====== Benchmarks ====== ====== Benchmarks ======
  
Ligne 754: Ligne 770:
  
        
 +===== Applications =====   
  
 +  * [[Using XeonPhi with Matlab]]
 +  * Using XeonPhi with Python 
 ====== Links ====== ====== Links ======
  
 +  * {{:xphi.pdf|Short presentation on Xeon Phi}} 
   * http://www.prace-ri.eu/Best-Practice-Guide-Intel-Xeon-Phi-HTML   * http://www.prace-ri.eu/Best-Practice-Guide-Intel-Xeon-Phi-HTML
   * https://software.intel.com/sites/default/files/11MIC42_How_to_Use_MKL_Automatic_Offload_0.pdf   * https://software.intel.com/sites/default/files/11MIC42_How_to_Use_MKL_Automatic_Offload_0.pdf
  • xeonphi.1442408633.txt.gz
  • Dernière modification : 2015/09/16 13:03
  • de admin