Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| developpement:activites:integration:xeonphi4wheezy [2014/04/23 12:12] – créée equemene | developpement:activites:integration:xeonphi4wheezy [2014/10/13 17:37] (Version actuelle) – [Installation des paquets MPSS] equemene | ||
|---|---|---|---|
| Ligne 12: | Ligne 12: | ||
| Il est supposé que le système hôte est une Debian Wheezy standard, sur une architecture AMD64. Le socle présenté ici était un Intel Grizzly disposant 7120. De manière à ne pas toucher au matériel embarqué et polluer le disque dur de la machine, l' | Il est supposé que le système hôte est une Debian Wheezy standard, sur une architecture AMD64. Le socle présenté ici était un Intel Grizzly disposant 7120. De manière à ne pas toucher au matériel embarqué et polluer le disque dur de la machine, l' | ||
| - | La Debian Wheezy disposait d'un noyau 3.2 version 54 (maintenant 57). Un @lspsi@ offrait pour ce matériel la sortie suivante : | + | La Debian Wheezy disposait d'un noyau 3.2 version 54 (maintenant 57). Un '' |
| < | < | ||
| - | Le composant MIC n'est donc pas intégré à la liste de périphériques PCI reconnus. La commande @update-pciids@ permet de mettre cette base à jour. Un nouveau lancement de @lspci | grep -i phi@ offre la sortie suivante : | + | Le composant MIC n'est donc pas intégré à la liste de périphériques PCI reconnus. La commande @update-pciids@ permet de mettre cette base à jour. Un nouveau lancement de '' |
| < | < | ||
| Ligne 90: | Ligne 90: | ||
| mpss-sysmgmt-python_3.1.2-2_amd64.deb | mpss-sysmgmt-python_3.1.2-2_amd64.deb | ||
| </ | </ | ||
| + | |||
| + | ==== 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.< | 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.< | ||
| Ligne 97: | Ligne 99: | ||
| vnet/ | vnet/ | ||
| + | Voici les opérations nécessaires poir compiler le module associé au noyau : | ||
| + | < | ||
| mkdir mpss-modules | mkdir mpss-modules | ||
| cd mpss-modules | cd mpss-modules | ||
| Ligne 109: | Ligne 112: | ||
| make install | make install | ||
| depmod -a | depmod -a | ||
| + | </ | ||
| - | Chargement du module | + | ==== Chargement du module |
| - | + | ||
| - | modprobe mic | + | |
| - | Dans le dmesg on obtient : | + | Chargement du module par la commande '' |
| + | Dans le '' | ||
| + | < | ||
| [ 5486.230236] vnet: mode: dma, buffers: 62 | [ 5486.230236] vnet: mode: dma, buffers: 62 | ||
| [ 5486.230446] mic 0000: | [ 5486.230446] mic 0000: | ||
| Ligne 126: | Ligne 130: | ||
| [ 5497.148272] mic0: Transition from state resetting to ready | [ 5497.148272] mic0: Transition from state resetting to ready | ||
| [ 5497.148320] My Phys addrs: 0x87cba60000 and scif_addr 0x8818b192c0 | [ 5497.148320] My Phys addrs: 0x87cba60000 and scif_addr 0x8818b192c0 | ||
| + | </ | ||
| - | En tapant ip link show | + | En tapant |
| + | < | ||
| 1: lo: < | 1: lo: < | ||
| link/ | link/ | ||
| Ligne 141: | Ligne 146: | ||
| 7: mic0: < | 7: mic0: < | ||
| link/ether 4c: | link/ether 4c: | ||
| + | </ | ||
| Copie du paramétrage pour le module MIC chargé au démarrage | Copie du paramétrage pour le module MIC chargé au démarrage | ||
| + | < | ||
| cp / | cp / | ||
| + | update-initramfs -k all -u | ||
| + | </ | ||
| + | ==== Installation des paquets MPSS ==== | ||
| - | ===== Historique ===== | + | Les paquets MPSS d' |
| + | Les paquets mpss-modules sont supprimés. Les autres installés tel que. | ||
| + | < | ||
| + | cd / | ||
| + | rm *mpss-modules*deb | ||
| + | ls *-lib*deb | xargs -I ' | ||
| + | ls *deb | grep -v ' | ||
| + | </ | ||
| - | ==== Des débuts difficiles pour une prise en main impossible ==== | + | Par défaut les installations se font dans :< |
| + | / | ||
| + | /etc/mpss | ||
| + | / | ||
| - | La société Intel a mis à disposition fin octobre 2013 un Xeon Phi 7120P à disposition | + | Ceci n'est plus le cas dans la Debian Wheezy. Il est donc nécessaire |
| - | La carte Intel Xeon Phi 7120P se présente sous forme d'une carte PCI Express d' | + | Installation d'un '' |
| + | < | ||
| + | |||
| + | La commande '' | ||
| + | < | ||
| + | MPSS : mpssinfo | ||
| + | |||
| + | MpssInfo Utility Log | ||
| + | |||
| + | Created Thu Feb 13 15:52:59 2014 | ||
| + | |||
| + | System Info | ||
| + | HOST OS : Linux | ||
| + | OS Version | ||
| + | Driver Version | ||
| + | MPSS Version | ||
| + | Host Physical Memory | ||
| + | |||
| + | Device No: 0, Device Name: mic0 | ||
| + | |||
| + | Board | ||
| + | Vendor ID : 0x8086 | ||
| + | Device ID : 0x225c | ||
| + | Subsystem ID : 0x2500 | ||
| + | Coprocessor Stepping ID : 3 | ||
| + | PCIe Width : x16 | ||
| + | PCIe Speed : 5 GT/s | ||
| + | PCIe Max payload size : 256 bytes | ||
| + | PCIe Max read req size : 4096 bytes | ||
| + | Coprocessor Model : 0x01 | ||
| + | Coprocessor Model Ext : 0x00 | ||
| + | Coprocessor Type : 0x00 | ||
| + | Coprocessor Family | ||
| + | Coprocessor Family Ext : 0x00 | ||
| + | Coprocessor Stepping | ||
| + | Board SKU : B1PRQ-7110 P/X | ||
| + | |||
| + | MICCTRL : micctrl --status | ||
| + | |||
| + | mic0: ready | ||
| + | </ | ||
| + | |||
| + | Pour démarrer le système sur le Xeon Phi, le démon | ||
| + | < | ||
| + | mkdir / | ||
| + | sed -i " | ||
| + | </ | ||
| + | |||
| + | Lancement avec la commande suivante : '' | ||
| + | < | ||
| + | [Warning] mic0: Generating compat network config file. This will be removed in the 3.2 release | ||
| + | [Warning] mic0: User ' | ||
| + | |||
| + | | ||
| + | |||
| + | mic0: | ||
| + | ============================================================= | ||
| + | Linux Kernel: | ||
| + | BootOnStart: | ||
| + | Shutdowntimeout: | ||
| + | |||
| + | ExtraCommandLine: | ||
| + | PowerManagment cpufreq_on; | ||
| + | |||
| + | UserAuthentication: | ||
| + | |||
| + | Root Device: | ||
| + | Base: / | ||
| + | CommonDir: / | ||
| + | MicDir: | ||
| + | |||
| + | Network: | ||
| + | Hostname: | ||
| + | MIC IP: 172.31.1.1 | ||
| + | Host IP: | ||
| + | Net Bits: 24 | ||
| + | NetMask: | ||
| + | MtuSize: | ||
| + | MIC MAC: | ||
| + | Host MAC: 4c: | ||
| + | |||
| + | Console: | ||
| + | VerboseLogging: | ||
| + | </ | ||
| + | |||
| + | Lancement du démon avec '' | ||
| + | |||
| + | Connaissance de d'état de la carte avec '' | ||
| + | < | ||
| + | mic0: online (mode: linux image: / | ||
| + | </ | ||
| + | |||
| + | Définition de l' | ||
| + | < | ||
| + | auto mic0 | ||
| + | iface mic0 inet static | ||
| + | address 172.31.1.254 | ||
| + | netmask 255.255.255.0 | ||
| + | broadcast 172.31.1.255 | ||
| + | network 172.31.1.0 | ||
| + | post-up / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | echo mic >> / | ||
| + | update-initramfs -k all -u | ||
| + | </ | ||
| + | |||
| + | Chargement de l' | ||
| + | |||
| + | Connexion sur le xeon-phi avec '' | ||
| + | |||
| + | Vérification du nombre de processeurs avec '' | ||
| + | |||
| + | ==== Installation du composant OpenCL ==== | ||
| + | |||
| + | === Installation des composants OpenCL standards === | ||
| + | |||
| + | < | ||
| + | apt-get install amd-clinfo amd-libopencl1 amd-opencl-icd | ||
| + | </ | ||
| + | |||
| + | === Vérification du fonctionnement de OpenCL avec clinfo === | ||
| + | |||
| + | < | ||
| + | Number of platforms: | ||
| + | Platform Profile: | ||
| + | Platform Version: | ||
| + | Platform Name: AMD Accelerated Parallel Processing | ||
| + | Platform Vendor: | ||
| + | Platform Extensions: | ||
| + | |||
| + | Platform Name: AMD Accelerated Parallel Processing | ||
| + | Number of devices: | ||
| + | Device Type: | ||
| + | Device ID: | ||
| + | Board name: | ||
| + | Max compute units: | ||
| + | Max work items dimensions: | ||
| + | Max work items[0]: | ||
| + | Max work items[1]: | ||
| + | Max work items[2]: | ||
| + | Max work group size: | ||
| + | Preferred vector width char: 16 | ||
| + | Preferred vector width short: | ||
| + | Preferred vector width int: 4 | ||
| + | Preferred vector width long: 2 | ||
| + | Preferred vector width float: | ||
| + | Preferred vector width double: | ||
| + | Native vector width char: 16 | ||
| + | Native vector width short: | ||
| + | Native vector width int: 4 | ||
| + | Native vector width long: 2 | ||
| + | Native vector width float: | ||
| + | Native vector width double: | ||
| + | Max clock frequency: | ||
| + | Address bits: 64 | ||
| + | Max memory allocation: | ||
| + | Image support: | ||
| + | Max number of images read arguments: | ||
| + | Max number of images write arguments: | ||
| + | Max image 2D width: | ||
| + | Max image 2D height: | ||
| + | Max image 3D width: | ||
| + | Max image 3D height: | ||
| + | Max image 3D depth: | ||
| + | Max samplers within kernel: | ||
| + | Max size of kernel argument: | ||
| + | Alignment (bits) of base address: | ||
| + | Minimum alignment (bytes) for any datatype: | ||
| + | Single precision floating point capability | ||
| + | Denorms: | ||
| + | Quiet NaNs: Yes | ||
| + | Round to nearest even: Yes | ||
| + | Round to zero: Yes | ||
| + | Round to +ve and infinity: | ||
| + | IEEE754-2008 fused multiply-add: | ||
| + | Cache type: | ||
| + | Cache line size: 64 | ||
| + | Cache size: | ||
| + | Global memory size: | ||
| + | Constant buffer size: | ||
| + | Max number of constant args: 8 | ||
| + | Local memory type: | ||
| + | Local memory size: | ||
| + | Kernel Preferred work group size multiple: | ||
| + | Error correction support: | ||
| + | Unified memory for Host and Device: | ||
| + | Profiling timer resolution: | ||
| + | Device endianess: | ||
| + | Available: | ||
| + | Compiler available: | ||
| + | Execution capabilities: | ||
| + | Execute OpenCL kernels: | ||
| + | Execute native function: | ||
| + | Queue properties: | ||
| + | Out-of-Order: | ||
| + | Profiling : Yes | ||
| + | Platform ID: | ||
| + | Name: | ||
| + | Vendor: | ||
| + | Device OpenCL C version: | ||
| + | Driver version: | ||
| + | Profile: | ||
| + | Version: | ||
| + | Extensions: | ||
| + | </ | ||
| + | |||
| + | Seuls les processeurs CPU sont détectés | ||
| + | |||
| + | === Installation des composants Python OpenCL === | ||
| + | |||
| + | < | ||
| + | python-pyopencl python-pyopencl-doc | ||
| + | </ | ||
| + | |||
| + | === Vérification du fonctionnement === | ||
| + | |||
| + | < | ||
| + | | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | (' | ||
| + | =============================================================== | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | --------------------------------------------------------------- | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | Execution time of test: 0.00112901 s | ||
| + | Results OK | ||
| + | root@grizzly: | ||
| + | root@grizzly: | ||
| + | (' | ||
| + | =============================================================== | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | --------------------------------------------------------------- | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | Execution time of test: 0.000632971 s | ||
| + | Results OK | ||
| + | </ | ||
| + | |||
| + | Intel publie ses [[http:// | ||
| + | |||
| + | La dernière version est la 3.2.1.16712 | ||
| + | |||
| + | ==== Récupération de la dernière version : ==== | ||
| + | |||
| + | < | ||
| + | cd /root | ||
| + | wget http:// | ||
| + | |||
| + | tar xzf intel_sdk_for_ocl_applications_xe_2013_r3_sdk_3.2.1.16712_x64.tgz | ||
| + | cd / | ||
| + | </ | ||
| + | |||
| + | ==== Conversion des RPM en DEB ==== | ||
| + | |||
| + | < | ||
| + | ls *.rpm | xargs -I ' | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | opencl-1.2-base_3.2.1.16712-2_amd64.deb generated | ||
| + | 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 | ||
| + | </ | ||
| + | |||
| + | ==== Installation des paquets ==== | ||
| + | |||
| + | < | ||
| + | dpkg -i *.deb | ||
| + | </ | ||
| + | |||
| + | Un lien est réalisé entre ''/ | ||
| + | |||
| + | < | ||
| + | echo / | ||
| + | echo / | ||
| + | ldconfig | ||
| + | |||
| + | clinfo | grep " | ||
| + | </ | ||
| + | |||
| + | Plus besoin d' | ||
| + | |||
| + | 3 composants sont détectés : | ||
| + | < | ||
| + | Device Type: | ||
| + | Device Type: | ||
| + | Device Type: | ||
| + | </ | ||
| + | |||
| + | Lancement du test Python OpenCL ' | ||
| + | (' | ||
| + | =============================================================== | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | --------------------------------------------------------------- | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | Execution time of test: 0.000990689 s | ||
| + | Results OK | ||
| + | =============================================================== | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | --------------------------------------------------------------- | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | / | ||
| + | "to see more.", | ||
| + | Execution time of test: 0.00065297 s | ||
| + | Results OK | ||
| + | =============================================================== | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | --------------------------------------------------------------- | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | (' | ||
| + | Execution time of test: 0.00400693 s | ||
| + | Results OK | ||
| + | </ | ||
| + | ===== Historique ===== | ||
| - | La première étape a été de trouver un socle pour l' | ||