SLACKHA / pyJac

Creates C and CUDA analytical Jacobians for chemical kinetics ODE systems
http://slackha.github.io/pyJac/
MIT License
52 stars 23 forks source link

No module named 'loopy.target.c.c_execution' #33

Closed stgeke closed 5 years ago

stgeke commented 5 years ago

Trying to run the latest master results in:

from loopy.target.c.c_execution import CPlusPlusCompiler ImportError: No module named 'loopy.target.c.c_execution'

Any idea how to fix this?

skyreflectedinmirrors commented 5 years ago

Hi Stefan, can I assume you're attempting to use the version of pyjac-V2 for our upcoming paper that's online?

The requirements / etc. on that repo were a bit out of date, but I just pushed an updated master branch that should have fixed a number of issues there.

I haven't created the documentation yet: the best docs for the equations evaluated are in the supplemental of the linked paper, and the easiest way to get a working install up and running is:

A) If you need OpenCL/unit-testing support, use conda and follow the build process in the travis.yml file.

B) If you don't need OpenCL/unit-testing support, you should be able to simply run:

pip install -r requirements.txt

This specific error indicates that the version of loo.py you have installed is too old (I forget which version I added the c_execution stuff in, but it was something like 2017.1). You want 2018.1, or the commit: https://github.com/inducer/loopy/commit/049424df12da70a5ae8d2411c6d12dc2269ff626

stgeke commented 5 years ago

This is corect.

I don't need OpenCL so option (B) is fine.

However, pyjac still bails out reporting: ImportError: No module named pyopencl.tools

Is OpenCL required?

skyreflectedinmirrors commented 5 years ago

Ok, the problem here was that there was still some unguarded pyopencl references in the master branch. The most recent commit should have resolved this (and incorporated most of the last major changes before the beta release).

You'll (likely) have to reinstall loo.py once more; there's a chance it will work as is, but currently I depend on a few features that are still waiting to be integrated into the master branch over there. Running pip install -r requirements.txt or setup.py will bring in all the update requirements.

I have tested this commit with a 'clean' install (i.e., no pyopencl, and just using the requirements in requirements.txt) as was able to generate code correctly, so please let me know if there are any further issues there!