mesham / epython

Python for the Epiphany co-processor
BSD 2-Clause "Simplified" License
83 stars 21 forks source link

Can't get the offload examples to run #5

Open xspager opened 7 years ago

xspager commented 7 years ago

It either unable to open os.py or when I include the python path in EPYTHONPATH it looks for and.py. I have no idea what I'm doing wrong, I'm using the latest Parabuntu.

mesham commented 7 years ago

Hi, probably the easiest way to look at this is if you don't mind posting a topic on the Parallella forum (http://www.parallella.org/forums/). If you could include the source code (or a snippet of such if it is quite large) that you are using then that will help to track things down.

I guess you have had a look at the general information at https://github.com/mesham/epython/blob/master/docs/tutorial6.md (i.e. you have updated the stock install of ePython to this new version 2, are running your code through python rather than ePython directly etc...)

xspager commented 7 years ago

Thanks a lot for the lightning fast answer! :)

Ok, if I:

git clone https://github.com/mesham/epython
cd epython
make
sudo make install

I can just python examples/pi_offload.py

without installing the new version I can just clone the repo and run with PYTHONPATH=./modules/fullpython/ python examples/pi_offload.py

(ps: parallel make is broken, like make -j3 )

Thanks a lot, great project!

mesham commented 7 years ago

Hi - yes that should work (installing it and then running through Python) - let me know if it doesn't. The install script will set up the PYTHONPATH to point to /modules/fullpython/

Without installing (as per your second bit) then you also need to ensure that ePython it executes is the latest version (in /usr/bin) as ePython is the execution engine running on the cores and this is launched by modules/fullpython/epython.py to execute the kernels (which are then passed between Python and ePython) if that makes sense.