bpartridge / PyPhi

Python for Scientific Computing on Intel's Xeon Phi MIC Platform
22 stars 7 forks source link

PyPhi

Python for Scientific Computing on Intel's Xeon Phi MIC Platform

This repository contains tools for cross-compiling a Python interpreter and the Numpy and Scipy libraries for an Intel Xeon Phi Many Integrated Core (MIC) coprocessor, allowing you to run Python code using those libraries as parallel native executables on the coprocessor, communicating and processing with the full power and expressivity of Python.

Based on Emilio Castillo Villar's work to cross-compile Python.

Numpy was never designed to be cross-compiled for anything, much less a system without a compiler of its own, so much effort was placed into re-engineering it to use the "MIC" architecture and the relevant Intel MKL libraries. Internal testing code for Numpy and Scipy also works.

After downloading the Makefile into a folder and running make like the following:

mkdir -p mic
cd mic
wget https://raw.github.com/bpartridge/PyPhi/master/Makefile -N && make

that folder mic will then contain python/_install, which will be the $PYTHONHOME whose bin/python can be executed on the Phi, and whose lib/python2.7[/site-packages] should be on $PYTHONPATH. See mic_task.sh for a usage example.

Tested on the Babbage cluster at NERSC as part of the MANTISSA project.

REQUIREMENTS

TODO

References

License (for all utilities)

Copyright (c) 2014 Brenton Partridge

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Analytics