Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
developpement:activites:integration:xeonphi4jessie [2014/11/18 20:48] equemene [Conversion des RPM en DEB] |
developpement:activites:integration:xeonphi4jessie [2014/11/21 15:15] equemene [Installation des paquets] |
||
---|---|---|---|
Ligne 99: | Ligne 99: | ||
==== Compilation du module noyau ==== | ==== Compilation du module noyau ==== | ||
- | Il n'est pas possible de directement créer le module MIC sans modifier le code source. En effet, les fichiers suivants doivent être modifiés pour compiler sur un noyau 3.2 Debian.<code>host/linvnet.c | + | Il n'est pas possible de directement créer le module MIC sans modifier le code source. Heureusement, En effet, le fichier ''host/linux.c'' doit être modifié pour compiler sur un noyau 3.16 Debian. |
- | host/pm_ioctl.c | + | |
- | micscif/micscif_debug.c | + | |
- | micscif/micscif_rb.c | + | |
- | vnet/micveth_dma.c </code> | + | |
Voici les opérations nécessaires poir compiler le module associé au noyau : | Voici les opérations nécessaires poir compiler le module associé au noyau : | ||
Ligne 111: | Ligne 107: | ||
rpm2cpio ../src/mpss-modules-3.4.1-1.src.rpm | cpio -idm | rpm2cpio ../src/mpss-modules-3.4.1-1.src.rpm | cpio -idm | ||
tar jxf mpss-modules-3.4.1.tar.bz2 | tar jxf mpss-modules-3.4.1.tar.bz2 | ||
- | # wget http://www.cbp.ens-lyon.fr/emmanuel.quemener/software/XeonPhi/PatchDebianWheezyMPSS312.patch | + | wget http://www.cbp.ens-lyon.fr/emmanuel.quemener/software/XeonPhi/PatchDebianJessieMPSS341.patch |
- | # patch -p 1 -i ./PatchDebianWheezyMPSS312.patch | + | patch host/linux.c ../PatchDebianJessieMPSS341.patch |
export INSTALL_MOD_PATH=/lib/modules/$(uname -r)/extra | export INSTALL_MOD_PATH=/lib/modules/$(uname -r)/extra | ||
export MIC_CARD_ARCH=k1om | export MIC_CARD_ARCH=k1om | ||
Ligne 331: | Ligne 327: | ||
<code> | <code> | ||
- | apt-get install amd-clinfo amd-libopencl1 amd-opencl-icd | + | apt-get install amd-clinfo amd-opencl-icd ocl-icd-libopencl1 ocl-icd-dev |
</code> | </code> | ||
Ligne 425: | Ligne 421: | ||
<code> | <code> | ||
- | python-pyopencl python-pyopencl-doc | + | apt-get install python-pyopencl python-pyopencl-doc |
</code> | </code> | ||
Ligne 431: | Ligne 427: | ||
<code> | <code> | ||
- | python /usr/share/doc/python-pyopencl-doc/examples/benchmark-all.py | + | python /usr/share/doc/python-pyopencl-doc/examples/benchmark.py |
</code> | </code> | ||
Ligne 448: | Ligne 444: | ||
('Device compute units:', 32) | ('Device compute units:', 32) | ||
Execution time of test: 0.00112901 s | Execution time of test: 0.00112901 s | ||
- | Results OK | ||
- | root@grizzly:~# ^C | ||
- | root@grizzly:~# python /usr/share/doc/python-pyopencl-doc/examples/benchmark-all.py | ||
- | ('Execution time of test without OpenCL: ', 7.43899393081665, 's') | ||
- | =============================================================== | ||
- | ('Platform name:', 'AMD Accelerated Parallel Processing') | ||
- | ('Platform profile:', 'FULL_PROFILE') | ||
- | ('Platform vendor:', 'Advanced Micro Devices, Inc.') | ||
- | ('Platform version:', 'OpenCL 1.2 AMD-APP (938.2)') | ||
- | --------------------------------------------------------------- | ||
- | ('Device name:', 'Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz') | ||
- | ('Device type:', 'CPU') | ||
- | ('Device memory: ', 64463, 'MB') | ||
- | ('Device max clock speed:', 1200, 'MHz') | ||
- | ('Device compute units:', 32) | ||
- | Execution time of test: 0.000632971 s | ||
Results OK | Results OK | ||
</code> | </code> | ||
Ligne 469: | Ligne 449: | ||
Intel publie ses [[http://software.intel.com/en-us/vcsource/tools/opencl-sdk-xe|versions de OpenCL]]. | Intel publie ses [[http://software.intel.com/en-us/vcsource/tools/opencl-sdk-xe|versions de OpenCL]]. | ||
- | La dernière version est la 3.2.1.16712 | ||
==== Récupération de la dernière version : ==== | ==== Récupération de la dernière version : ==== | ||
Ligne 484: | Ligne 463: | ||
==== Conversion des RPM en DEB ==== | ==== Conversion des RPM en DEB ==== | ||
+ | La conversion peut se réaliser "brutalement" avec un ''alien'', mais les paquets ne sont pas très propres... | ||
+ | |||
+ | Installation des outils pour la conversion des paquets : | ||
<code> | <code> | ||
- | ls *.rpm | xargs -I '{}' alien --scripts '{}' | + | apt-get install builder alien |
</code> | </code> | ||
+ | Pour les paquets corrects : | ||
+ | <code> | ||
+ | ls opencl-*pset*.rpm opencl-*mic*.rpm | xargs -I '{}' alien --scripts '{}' | ||
+ | </code> | ||
+ | |||
+ | Pour les paquets à modifier : | ||
+ | <code> | ||
+ | ls opencl-*base-4*.rpm opencl-*cpu*.rpm | xargs -I '{}' alien -g --scripts '{}' | ||
+ | # On degage la possibilite de mettre la libOpenCL de Intel a la place de la standard | ||
+ | sed -i "s/update\-alternatives/exit\nupdate\-alternatives/g" opencl-1.2-base-4.5.0.8/debian/postinst | ||
+ | # On rentre dans l'archive | ||
+ | cd opencl-1.2-base-4.5.0.8 | ||
+ | # On build le paquet | ||
+ | debuild | ||
+ | cd .. | ||
+ | # On remplace la priorite du update-alternatives sur l'installation de l'ICD Intel | ||
+ | sed -i "s/\-2147489047/65536/g" opencl-1.2-intel-cpu-4.5.0.8/debian/postinst | ||
+ | # On rentre dans l'archive | ||
+ | cd opencl-1.2-intel-cpu-4.5.0.8 | ||
+ | # on build le paquet | ||
+ | debuild | ||
+ | cd .. | ||
+ | </code> | ||
+ | |||
+ | Les paquets générés sont les suivants : | ||
<code> | <code> | ||
opencl-1.2-base_4.5.0.8-2_amd64.deb | opencl-1.2-base_4.5.0.8-2_amd64.deb | ||
Ligne 502: | Ligne 509: | ||
</code> | </code> | ||
- | Un lien est réalisé entre ''/opt/intel/opencl-1.2-3.2.1.16712'' et '/etc/alternatives/opencl-intel-runtime' | + | Vérification des périphériques OpenCL détectés : |
<code> | <code> | ||
- | echo /etc/alternatives/opencl-intel-runtime/lib64 >> /etc/ld.so.conf.d/mic.conf | ||
- | echo /etc/alternatives/opencl-intel-runtime/libmic >> /etc/ld.so.conf.d/mic.conf | ||
- | ldconfig | ||
- | |||
clinfo | grep "Device Type" | clinfo | grep "Device Type" | ||
</code> | </code> | ||
- | |||
- | Plus besoin d'établir les liens pour l'ICD. | ||
3 composants sont détectés : | 3 composants sont détectés : | ||
Ligne 522: | Ligne 522: | ||
Lancement du test Python OpenCL 'python /usr/share/doc/python-pyopencl-doc/examples/benchmark-all.py' :<code> | Lancement du test Python OpenCL 'python /usr/share/doc/python-pyopencl-doc/examples/benchmark-all.py' :<code> | ||
- | ('Execution time of test without OpenCL: ', 7.768199920654297, 's') | + | Execution time of test without OpenCL: 0.0567140579224 s |
=============================================================== | =============================================================== | ||
- | ('Platform name:', 'AMD Accelerated Parallel Processing') | + | Platform name: AMD Accelerated Parallel Processing |
- | ('Platform profile:', 'FULL_PROFILE') | + | Platform profile: FULL_PROFILE |
- | ('Platform vendor:', 'Advanced Micro Devices, Inc.') | + | Platform vendor: Advanced Micro Devices, Inc. |
- | ('Platform version:', 'OpenCL 1.2 AMD-APP (938.2)') | + | Platform version: OpenCL 1.2 AMD-APP (1526.3) |
--------------------------------------------------------------- | --------------------------------------------------------------- | ||
- | ('Device name:', 'Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz') | + | Device name: Intel(R) Xeon(R) CPU E5-2637 v2 @ 3.50GHz |
- | ('Device type:', 'CPU') | + | Device type: CPU |
- | ('Device memory: ', 64463, 'MB') | + | Device memory: 516995 MB |
- | ('Device max clock speed:', 1200, 'MHz') | + | Device max clock speed: 1333 MHz |
- | ('Device compute units:', 32) | + | Device compute units: 16 |
- | Execution time of test: 0.000990689 s | + | Device max work group size: 1024 |
+ | Device max work item sizes: [1024, 1024, 1024] | ||
+ | Data points: 8388608 | ||
+ | Workers: 256 | ||
+ | Preferred work group size multiple: 1 | ||
+ | Execution time of test: 0.00852657 s | ||
Results OK | Results OK | ||
=============================================================== | =============================================================== | ||
- | ('Platform name:', 'Intel(R) OpenCL') | + | Platform name: Intel(R) OpenCL |
- | ('Platform profile:', 'FULL_PROFILE') | + | Platform profile: FULL_PROFILE |
- | ('Platform vendor:', 'Intel(R) Corporation') | + | Platform vendor: Intel(R) Corporation |
- | ('Platform version:', 'OpenCL 1.2 LINUX') | + | Platform version: OpenCL 1.2 LINUX |
--------------------------------------------------------------- | --------------------------------------------------------------- | ||
- | ('Device name:', ' Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz') | + | Device name: Intel(R) Xeon(R) CPU E5-2637 v2 @ 3.50GHz |
- | ('Device type:', 'CPU') | + | Device type: CPU |
- | ('Device memory: ', 64463, 'MB') | + | Device memory: 516995 MB |
- | ('Device max clock speed:', 2700, 'MHz') | + | Device max clock speed: 3500 MHz |
- | ('Device compute units:', 32) | + | Device compute units: 16 |
- | /usr/lib/python2.7/dist-packages/pyopencl/__init__.py:36: CompilerWarning: Non-empty compiler output encountered. Set the environment variable PYOPENCL_COMPILER_OUTPUT=1 to see more. | + | Device max work group size: 8192 |
+ | Device max work item sizes: [8192, 8192, 8192] | ||
+ | /usr/lib/python2.7/dist-packages/pyopencl/__init__.py:61: CompilerWarning: Non-empty compiler output encountered. Set the environment variable PYOPENCL_COMPILER_OUTPUT=1 to see more. | ||
"to see more.", CompilerWarning) | "to see more.", CompilerWarning) | ||
- | Execution time of test: 0.00065297 s | + | Data points: 8388608 |
+ | Workers: 256 | ||
+ | Preferred work group size multiple: 128 | ||
+ | Execution time of test: 0.00322651 s | ||
Results OK | Results OK | ||
=============================================================== | =============================================================== | ||
- | ('Platform name:', 'Intel(R) OpenCL') | + | Platform name: Intel(R) OpenCL |
- | ('Platform profile:', 'FULL_PROFILE') | + | Platform profile: FULL_PROFILE |
- | ('Platform vendor:', 'Intel(R) Corporation') | + | Platform vendor: Intel(R) Corporation |
- | ('Platform version:', 'OpenCL 1.2 LINUX') | + | Platform version: OpenCL 1.2 LINUX |
--------------------------------------------------------------- | --------------------------------------------------------------- | ||
- | ('Device name:', 'Intel(R) Many Integrated Core Acceleration Card') | + | Device name: Intel(R) Many Integrated Core Acceleration Card |
- | ('Device type:', 'ACCELERATOR') | + | Device type: ACCELERATOR |
- | ('Device memory: ', 5772, 'MB') | + | Device memory: 11634 MB |
- | ('Device max clock speed:', 1100, 'MHz') | + | Device max clock speed: 1333 MHz |
- | ('Device compute units:', 240) | + | Device compute units: 240 |
- | Execution time of test: 0.00400693 s | + | Device max work group size: 8192 |
+ | Device max work item sizes: [8192, 8192, 8192] | ||
+ | Data points: 8388608 | ||
+ | Workers: 256 | ||
+ | Preferred work group size multiple: 128 | ||
+ | Execution time of test: 0.0179208 s | ||
Results OK | Results OK | ||
</code> | </code> |