Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linalg_utils missing dpotrf_wrap #9

Closed
mcfarljm opened this issue Feb 18, 2011 · 8 comments
Closed

linalg_utils missing dpotrf_wrap #9

mcfarljm opened this issue Feb 18, 2011 · 8 comments

Comments

@mcfarljm
Copy link

On Fedora 13, with the latest development version from github, I get this import error when importing pymc:

In [1]: import pymc

ImportError Traceback (most recent call last)

/usr/lib/python2.6/site-packages/pymc/init.pyc in ()
45 from CircularStochastic import *
46 import distributions
---> 47 import gp
48
49 # Optional modules

/usr/lib/python2.6/site-packages/pymc/gp/init.py in ()
20 from GPutils import *
21 from Mean import *
---> 22 from Covariance import *
23 from BasisCovariance import *
24 from FullRankCovariance import *

/usr/lib/python2.6/site-packages/pymc/gp/Covariance.py in ()
8 from numpy.linalg import cholesky, LinAlgError
9 from GPutils import regularize_array, trisolve, square_and_sum
---> 10 from linalg_utils import diag_call, dpotrf_wrap
11 from incomplete_chol import ichol, ichol_continue
12

ImportError: cannot import name dpotrf_wrap

I can verify using nm that linalg_utils.so does not contain dpotrf_wrap.

@apatil
Copy link
Contributor

apatil commented Feb 21, 2011

I don't get this error. Were there errors during compilation?

@mcfarljm
Copy link
Author

No, I didn't notice any build errors on the console. Is there a log file I can check?

@mcfarljm
Copy link
Author

Anand: the difference may be that my system doesn't have a system lapack, so it's using different code in setup.py. Can you try to recreate the issue by forcing lapack_info==False? It looks like on my build, blas_wrap.o isn't getting included in linalg_utils.so, so probably has something to do with setup.py...

@mcfarljm
Copy link
Author

OK, I think the fix is to add the source for blas_wrap.f to linalg_utils at line 80 of setup.py:
config.add_extension(name='gp.linalg_utils',sources=['pymc/gp/linalg_utils.f', 'pymc/blas_wrap.f'] + f_sources)

(I also had to update the timestap on blas_wrap.f or else re-running setup.py was not triggering a re-generation of linalg_utilsmodule.c; seems like a minor deficiency in the distutils build system.)

@apatil
Copy link
Contributor

apatil commented Feb 22, 2011

Thanks John, could you please verify that commit 7d3755c fixes the problem?

@mcfarljm
Copy link
Author

Yes, that works for me.

@apatil
Copy link
Contributor

apatil commented Feb 22, 2011

Cool.

@mcfarljm
Copy link
Author

Closing: fixed by above commit

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants