Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
developpement:activites:integration:xeonphi4jessie [2014/11/18 19:05] – [Chargement du module MIC] equemene | developpement:activites:integration:xeonphi4jessie [2025/05/14 07:38] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 3: | Ligne 3: | ||
===== Introduction ===== | ===== Introduction ===== | ||
+ | Les accélérateurs Xeon Phi disposant d'une soixantaine constituent un intermédiaire entre les processeurs standards disposant de l' | ||
+ | Voici comment installer et faire fonctionner un Xeon Phi sur la distribution Debian Jessie, notamment en OpenCL. | ||
===== Installation ===== | ===== Installation ===== | ||
Ligne 99: | Ligne 100: | ||
==== 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, | + | Il n'est pas possible de directement créer le module MIC sans modifier le code source. |
- | host/ | + | |
- | micscif/ | + | |
- | micscif/ | + | |
- | vnet/ | + | |
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 108: | ||
rpm2cpio ../ | rpm2cpio ../ | ||
tar jxf mpss-modules-3.4.1.tar.bz2 | tar jxf mpss-modules-3.4.1.tar.bz2 | ||
- | # wget http:// | + | wget http:// |
- | # patch -p 1 -i ./PatchDebianWheezyMPSS312.patch | + | patch host/ |
export INSTALL_MOD_PATH=/ | export INSTALL_MOD_PATH=/ | ||
export MIC_CARD_ARCH=k1om | export MIC_CARD_ARCH=k1om | ||
Ligne 171: | Ligne 168: | ||
==== Installation des paquets MPSS ==== | ==== Installation des paquets MPSS ==== | ||
- | Les paquets MPSS d' | + | Les paquets MPSS d' |
Les paquets mpss-modules sont supprimés. Les autres installés tel que. | Les paquets mpss-modules sont supprimés. Les autres installés tel que. | ||
< | < | ||
- | cd / | + | cd /root/XeonPhi/mpss-3.4.1 |
rm *mpss-modules*deb | rm *mpss-modules*deb | ||
ls *-lib*deb | xargs -I ' | ls *-lib*deb | xargs -I ' | ||
Ligne 181: | Ligne 178: | ||
</ | </ | ||
- | Par défaut les installations se font dans :< | + | Par défaut les installations se font dans :< |
- | / | + | / |
/etc/mpss | /etc/mpss | ||
- | / | + | /usr/lib64 |
+ | / | ||
+ | </ | ||
- | Ceci n'est plus le cas dans la Debian | + | Ceci n'est plus le cas dans la Debian |
Installation d'un '' | Installation d'un '' | ||
< | < | ||
+ | |||
+ | < | ||
La commande '' | La commande '' | ||
< | < | ||
- | MPSS : mpssinfo | + | MpssInfo Utility Log |
+ | Created Tue Nov 18 20:10:00 2014 | ||
- | MpssInfo Utility Log | ||
- | Created Thu Feb 13 15:52:59 2014 | + | System Info |
+ | HOST OS : Linux | ||
+ | OS Version : 3.16.0-4-amd64 | ||
+ | Driver Version : 3.4.1-1 | ||
+ | MPSS Version : NotAvailable | ||
+ | Host Physical Memory : 529403 MB | ||
- | System Info | + | Device No: 0, Device Name: mic0 |
- | HOST OS | + | |
- | OS Version | + | |
- | Driver Version | + | |
- | MPSS Version | + | |
- | Host Physical Memory | + | |
- | Device No: 0, Device Name: mic0 | + | Board |
- | + | Vendor ID : 0x8086 | |
- | | + | Device ID : 0x225c |
- | Vendor ID : 0x8086 | + | Subsystem ID : 0x7d99 |
- | Device ID : 0x225c | + | Coprocessor Stepping ID : 2 |
- | Subsystem ID : 0x2500 | + | PCIe Width : x16 |
- | Coprocessor Stepping ID | + | PCIe Speed : 5 GT/s |
- | PCIe Width : x16 | + | PCIe Max payload size : 256 bytes |
- | PCIe Speed : 5 GT/s | + | PCIe Max read req size : 512 bytes |
- | PCIe Max payload size | + | Coprocessor Model : 0x01 |
- | PCIe Max read req size | + | Coprocessor Model Ext : 0x00 |
- | Coprocessor Model | + | Coprocessor Type : 0x00 |
- | Coprocessor Model Ext | + | Coprocessor Family : 0x0b |
- | Coprocessor Type | + | Coprocessor Family Ext : 0x00 |
- | Coprocessor Family | + | Coprocessor Stepping |
- | Coprocessor Family Ext | + | Board SKU : C0QS-7120 P/A/X/D |
- | Coprocessor Stepping | + | |
- | Board SKU : B1PRQ-7110 P/X | + | |
- | + | ||
- | MICCTRL : micctrl --status | + | |
- | + | ||
- | mic0: ready | + | |
</ | </ | ||
Ligne 238: | Ligne 233: | ||
Lancement avec la commande suivante : '' | Lancement avec la commande suivante : '' | ||
< | < | ||
- | [Warning] mic0: Generating | + | [Warning] mic0: Generating |
- | [Warning] mic0: User ' | + | [Warning] |
+ | </ | ||
- | micctrl --config | + | < |
+ | < | ||
mic0: | mic0: | ||
============================================================= | ============================================================= | ||
+ | Config Version: 1.1 | ||
+ | |||
Linux Kernel: | Linux Kernel: | ||
+ | Map File: / | ||
BootOnStart: | BootOnStart: | ||
Shutdowntimeout: | Shutdowntimeout: | ||
ExtraCommandLine: | ExtraCommandLine: | ||
- | PowerManagment cpufreq_on; | + | PowerManagment: cpufreq_on; |
- | + | ||
- | UserAuthentication: | + | |
Root Device: | Root Device: | ||
- | | + | Base: |
- | CommonDir: / | + | CommonDir: |
- | | + | Micdir: |
Network: | Network: | ||
- | Hostname: | + | Hostname: |
MIC IP: 172.31.1.1 | MIC IP: 172.31.1.1 | ||
Host IP: | Host IP: | ||
Ligne 266: | Ligne 264: | ||
NetMask: | NetMask: | ||
MtuSize: | MtuSize: | ||
- | MIC MAC: | + | MIC MAC: |
- | Host MAC: 4c:79:ba:32:0f:71 | + | Host MAC: 4c:79:ba:1a:1e:79 |
+ | |||
+ | LDAP: Disabled | ||
+ | | ||
+ | |||
+ | Cgroup: | ||
+ | Memory: | ||
Console: | Console: | ||
VerboseLogging: | VerboseLogging: | ||
+ | CrashDump: | ||
</ | </ | ||
Ligne 276: | Ligne 281: | ||
Connaissance de d' | Connaissance de d' | ||
+ | |||
+ | Au début, j'ai : | ||
+ | < | ||
+ | mic0: booting (mode: linux image: / | ||
+ | </ | ||
+ | |||
+ | Après quelques secondes : | ||
< | < | ||
mic0: online (mode: linux image: / | mic0: online (mode: linux image: / | ||
</ | </ | ||
- | Définition de l' | + | Définition de l' |
+ | # mic0 BEGIN | ||
+ | auto mic0 | ||
+ | iface mic0 inet static | ||
+ | address 172.31.1.254 | ||
+ | netmask 255.255.255.0 | ||
+ | # mic0 END | ||
+ | </ | ||
+ | |||
+ | Je préfère passer à une configuration plus étoffée : | ||
< | < | ||
auto mic0 | auto mic0 | ||
Ligne 307: | Ligne 328: | ||
< | < | ||
- | apt-get install amd-clinfo | + | apt-get install amd-clinfo amd-opencl-icd |
</ | </ | ||
Ligne 401: | Ligne 422: | ||
< | < | ||
- | python-pyopencl python-pyopencl-doc | + | apt-get install |
</ | </ | ||
Ligne 407: | Ligne 428: | ||
< | < | ||
- | | + | |
</ | </ | ||
Ligne 424: | Ligne 445: | ||
(' | (' | ||
Execution time of test: 0.00112901 s | Execution time of test: 0.00112901 s | ||
- | Results OK | ||
- | root@grizzly: | ||
- | root@grizzly: | ||
- | (' | ||
- | =============================================================== | ||
- | (' | ||
- | (' | ||
- | (' | ||
- | (' | ||
- | --------------------------------------------------------------- | ||
- | (' | ||
- | (' | ||
- | (' | ||
- | (' | ||
- | (' | ||
- | Execution time of test: 0.000632971 s | ||
Results OK | Results OK | ||
</ | </ | ||
Ligne 445: | Ligne 450: | ||
Intel publie ses [[http:// | Intel publie ses [[http:// | ||
- | 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 : ==== | ||
- | < | + | Il n'est pas possible de disposer directement de la dernière version OpenCL par un simple |
- | cd /root | + | |
- | wget http:// | + | |
- | tar xzf intel_sdk_for_ocl_applications_xe_2013_r3_sdk_3.2.1.16712_x64.tgz | + | < |
- | cd / | + | cd / |
+ | wget http:// | ||
+ | tar xzf opencl_runtime_14.2_x64_4.5.0.8.tgz | ||
+ | cd pset_opencl_runtime_14.1_x64_4.5.0.8/rpm | ||
</ | </ | ||
==== Conversion des RPM en DEB ==== | ==== Conversion des RPM en DEB ==== | ||
+ | La conversion peut se réaliser " | ||
+ | |||
+ | Installation des outils pour la conversion des paquets : | ||
< | < | ||
- | ls *.rpm | xargs -I ' | + | apt-get install builder |
</ | </ | ||
+ | Pour les paquets corrects : | ||
< | < | ||
- | opencl-1.2-base_3.2.1.16712-2_amd64.deb generated | + | ls opencl-*pset*.rpm opencl-*mic*.rpm | xargs -I ' |
- | opencl-1.2-devel_3.2.1.16712-2_amd64.deb generated | + | |
- | opencl-1.2-intel-cpu_3.2.1.16712-2_amd64.deb generated | + | |
- | opencl-1.2-intel-devel_3.2.1.16712-2_amd64.deb generated | + | |
</ | </ | ||
+ | |||
+ | Pour les paquets à modifier : | ||
+ | < | ||
+ | ls opencl-*base-4*.rpm opencl-*cpu*.rpm | xargs -I ' | ||
+ | # On degage la possibilite de mettre la libOpenCL de Intel a la place de la standard | ||
+ | sed -i " | ||
+ | # On rentre dans l' | ||
+ | cd opencl-1.2-base-4.5.0.8 | ||
+ | # On build le paquet | ||
+ | debuild | ||
+ | cd .. | ||
+ | # On remplace la priorite du update-alternatives sur l' | ||
+ | sed -i " | ||
+ | # On rentre dans l' | ||
+ | cd opencl-1.2-intel-cpu-4.5.0.8 | ||
+ | # on build le paquet | ||
+ | debuild | ||
+ | cd .. | ||
+ | </ | ||
+ | |||
+ | Les paquets générés sont les suivants : | ||
+ | < | ||
+ | opencl-1.2-base_4.5.0.8-2_amd64.deb | ||
+ | opencl-1.2-base-pset_4.5.0.8-2_all.deb | ||
+ | opencl-1.2-intel-cpu_4.5.0.8-2_amd64.deb | ||
+ | opencl-1.2-intel-mic_4.5.0.8-2_amd64.deb | ||
+ | </ | ||
+ | |||
==== Installation des paquets ==== | ==== Installation des paquets ==== | ||
Ligne 476: | Ligne 510: | ||
</ | </ | ||
- | Un lien est réalisé entre ''/ | + | Vérification des périphériques OpenCL détectés : |
< | < | ||
- | echo / | ||
- | echo / | ||
- | ldconfig | ||
- | |||
clinfo | grep " | clinfo | grep " | ||
</ | </ | ||
- | |||
- | Plus besoin d' | ||
3 composants sont détectés : | 3 composants sont détectés : | ||
Ligne 496: | Ligne 523: | ||
Lancement du test Python OpenCL ' | Lancement du test Python OpenCL ' | ||
- | ('Execution time of test without OpenCL: | + | Execution time of test without OpenCL: |
=============================================================== | =============================================================== | ||
- | ('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: | + | Device memory: |
- | ('Device max clock speed:', 1200, 'MHz') | + | Device max clock speed: |
- | ('Device compute units:', 32) | + | Device compute units: |
- | Execution time of test: 0.000990689 | + | 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 | ||
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:', ' | + | Device name: |
- | ('Device type:', 'CPU') | + | Device type: CPU |
- | ('Device memory: | + | Device memory: |
- | ('Device max clock speed:', 2700, 'MHz') | + | Device max clock speed: |
- | ('Device compute units:', 32) | + | Device compute units: |
- | / | + | Device max work group size: 8192 |
+ | Device max work item sizes: [8192, 8192, 8192] | ||
+ | / | ||
"to see more.", | "to see more.", | ||
- | Execution time of test: 0.00065297 | + | Data points: 8388608 |
+ | Workers: 256 | ||
+ | Preferred work group size multiple: 128 | ||
+ | Execution time of test: 0.00322651 | ||
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: | + | Device memory: |
- | ('Device max clock speed:', 1100, 'MHz') | + | Device max clock speed: |
- | ('Device compute units:', 240) | + | Device compute units: |
- | Execution time of test: 0.00400693 | + | 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 | ||
Results OK | Results OK | ||
</ | </ |