User Tools

Site Tools


strutture:cnaf:cnaf_rd:infrastruttura:utilizzo_cluster:opencl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

strutture:cnaf:cnaf_rd:infrastruttura:utilizzo_cluster:opencl [2013/10/31 08:53] – created caberletti@infn.itstrutture:cnaf:cnaf_rd:infrastruttura:utilizzo_cluster:opencl [2013/10/31 09:25] (current) caberletti@infn.it
Line 1: Line 1:
 +====== OpenCL ======
  
 +Le librerie OpenCL (Open Computing Language) possono essere utilizzate con gli acceleratori, quindi sia con le GPU che con gli Xeon Phi.
 +Nell'infrastruttura R&D sono disponibili due implementazioni di OpenCL:
 +  * Intel OpenCL
 +  * NVIDIA CUDA OpenCL
 +
 +A seconda del device che si intende utilizzare, occorre caricare il modulo corrispondente. 
 +Quindi, prima di utilizzare OpenCL con le GPU:
 +<code bash>
 +$ module load cuda-5.5
 +</code>
 +
 +Prima di usare OpenCL con gli Xeon Phi:
 +<code bash>
 +$ module load ips-xe-2013 intel-opencl 
 +</code>
 +
 +===== Esempi =====
 +
 +Per testare il funzionamento di OpenCL si possono utilizzare alcune semplici programmi test. Uno di questi è GEMM.
 +
 +<code bash>
 +$ module load profile
 +$ cd $SCRATCH
 +$ wget http://software.intel.com/sites/default/files/article/391208/gemm-sample.tar.gz
 +$ tar xzf gemm-sample.tar.gz
 +$ cd GEMM
 +</code>
 +
 +Per compilare ed eseguire il sample su piattaforma Intel:
 +<code bash>
 +$ module load ips-xe-2013 intel-opencl
 +$ make
 +$ ./gemm
 +</code>
 +
 +Il sample troverà quindi due tipi di device compatibili: il processore dell'host e l'acceleratore Xeon Phi. Scegliere il tipo device con
 +<code bash>
 +$ ./gemm -d 0
 +$ ./gemm -d 1
 +</code>
 +
 +Per compilare il sample per le GPU NVIDIA:
 +<code bash>
 +$ module load cuda-5.5
 +$ make
 +$ ./gemm
 +</code>

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki