Problem linking in gfortran on Linux

46 views
Skip to first unread message

Ben Cowan

unread,
Mar 14, 2013, 12:49:34 PM3/14/13
to pyamg...@googlegroups.com
Hi Folks,

When I build pyamg according to the instructions, using GNU compilers, "import pyamg" gives the following error:

  File "/usr/local/contrib/lib/python2.7/site-packages/scipy/linalg/misc.py", line 3, in <module>
    import fblas
ImportError: /usr/local/contrib/lib/python2.7/site-packages/scipy/linalg/fblas.so: undefined symbol: _gfortran_st_write_done

Some googling suggested this could be fixed by including -lgfortran.  Any hints on how to configure the build to add this link flag?  I tried

python setup.py config --libraries -lgfortran

But that didn't fix it, and an ldd on fblas.so indicates that libgfortran.so isn't being linked in.  The build output doesn't indicate what compilation commands are actually being used, even trying --verbose and --noisy flags.

Any help would be appreciated.

Thanks,
Ben

Jacob Schroder

unread,
Apr 1, 2013, 11:10:31 PM4/1/13
to pyamg...@googlegroups.com
Hey Ben,

I think that I've seen this before (it happened to me).  This can happen when NumPy is built with something like g77 and SciPy is built with gfortran.  If you built NumPy on your own, try recompiling NumPy with 
$$ python setup.py build --fcompiler=gnu95
Then, you may have to rebuild SciPy as well (not sure).  Then...I think the standard compiling of PyAMG should work.

If this isn't your issue, then I'm not sure.

Let me know,

Jacob


--
You received this message because you are subscribed to the Google Groups "pyamg-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyamg-user+...@googlegroups.com.
To post to this group, send email to pyamg...@googlegroups.com.
Visit this group at http://groups.google.com/group/pyamg-user?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ben Cowan

unread,
Apr 2, 2013, 12:29:38 PM4/2/13
to pyamg...@googlegroups.com
Yep, SciPy was the problem. Rebuilding that got PyAMG to work fine.

Thanks,
Ben

Jacob Schroder

unread,
Apr 2, 2013, 11:52:16 PM4/2/13
to pyamg...@googlegroups.com
Hey Ben,

Great!  Glad to hear it.

- Jacob
Reply all
Reply to author
Forward
0 new messages