Skip to content

caidongyun/epython

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Epiphany Python
--------------------------
This is an interpreter for Python which will run on the Epiphany chip and allows for common parallel activities such as communication and synchronisation. Full language documentation can be found in the docs folder. Example codes can be found in docs/examples

Installation
-------------------
Type make
If you wish to install it (into the bin directory) then sudo make install followed by starting a new bash session (execute bash at the command line.)

If you do not install it then you can still run epython from the current directory, as ./epython.sh but ensure that epython-device.srec is in the current directory when you run the interpreter. The epython.sh script will detect whether to run as sudo (earlier versions of the parallella OS) or not (later versions.)

In order to include files (required for parallel functions) you must either run your Python codes in the same directory as the executables (and parallel.py & util.py) and/or export the PYTHONPATH environment variable to point to this. When including files, by default ePython will search in the current directory and then the PYTHONPATH variable, which follows the same syntax as the PATH variable.

Issuing export export PYTHONPATH=$PYTHONPATH:`pwd` in the epython directory will set this to point to the current directory. You can also modify your ~/.bashrc file to contain a similiar command.

Hello world
--------------------
Create a file called hello, then put in the lines
print "Hello world"

save it, and execute epython hello (or ./epython.sh hello if you have not done make install.)

Each core will display the Hello world message to the screen along with their core id

64 cores
--------------
ePython has been developed and tested on a 16 core Epiphany machine, if you have a 64 core chip machine then it should work (still on 16 cores), and it should be trivial to edit the source to support the full 64 cores.

Troubleshooting
----------------------------
Often these are set by default, but if it complains that it can not find e-gcc or the libraries, then you will need to set these environment variables:

export PATH=/opt/adapteva/esdk/tools/e-gnu/bin:$PATH
export EPIPHANY_HOME=/opt/adapteva/esdk

(you might want to place this in your .bashrc file)

Rebuilding the parser/lexer
----------------------------------------------
To rebuild the parser and lexer too, then do make full

About

Python for the Epiphany co-processor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 92.9%
  • Yacc 2.4%
  • Lex 1.9%
  • C++ 1.8%
  • Makefile 0.6%
  • Python 0.3%
  • Shell 0.1%