1

If you have error that contain “gfortran” in it, like this one:

ImportError: (‘/home/Nick/.theano/compiledir_Linux-2.6.35-31-generic-x86_64-with-Ubuntu-10.10-maverick–2.6.6/tmpIhWJaI/0c99c52c82f7ddc775109a06ca04b360.so: undefined symbol: _gfortran_st_write_done’

Hi, I am following given steps. The problem is probably that NumPy is linked with a different blas then then one currently available (probably ATLAS). There is 2 possible fixes:

Uninstall ATLAS and install OpenBLAS.
Use the Theano flag “blas.ldflags=-lblas -lgfortran”

1) is better as OpenBLAS is faster then ATLAS and NumPy is probably already linked with it. So you won’t need any other change in Theano files or Theano configuration.

But i dont how to uninstall this ATLAS package. I tried

 sudo apt-get remove libatlas

but it didnt worked. Can you tell me how can i formally remove them. regards

1
  • You should uninstall atlassudo apt-get remove libatlas* and do update-alternative as explained below. Jan 7, 2016 at 0:55

1 Answer 1

1

If you want to remove the ATLAS development packages, they are actually called libatlas-dev and libatlas-base-dev.

However, there should be no need to uninstall these packages in order to use OpenBLAS: the update-alternatives mechanism will take care of things for you, automatically assigning higher priority to the OpenBLAS version of libblas when you install it e.g. with only the ATLAS development packages installed you should see

$ update-alternatives --get-selections | grep libblas
libblas.so                     auto     /usr/lib/atlas-base/atlas/libblas.so
libblas.so.3                   auto     /usr/lib/atlas-base/atlas/libblas.so.3

then installing OpenBLAS development packages using

$ sudo apt-get install libopenblas-dev

and checking again you should see

$ update-alternatives --get-selections | grep libblas
libblas.so                     auto     /usr/lib/openblas-base/libblas.so
libblas.so.3                   auto     /usr/lib/openblas-base/libblas.so.3

You should be able to swap between them using sudo update-alternatives --config libblas.so and following the on-screen instructions.

3
  • i tried them, and it seems it already had this, ih@cap8:~$ update-alternatives --get-selections | grep libblas libblas.so auto /usr/lib/openblas-base/libopenblas.so libblas.so.3gf auto /usr/lib/openblas-base/libopenblas.so.0 ih@cap8:~$ sudo apt-get install libopenblas-dev [sudo] password for ih: Reading package lists... Done Building dependency tree Reading state information... Done libopenblas-dev is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 512 not upgraded.
    – khan
    May 21, 2015 at 18:43
  • ih@cap8:~$ update-alternatives --get-selections | grep libblas libblas.so auto /usr/lib/openblas-base/libopenblas.so libblas.so.3gf auto /usr/lib/openblas-base/libopenblas.so.0
    – khan
    May 21, 2015 at 18:44
  • But still it has the same error...
    – khan
    May 21, 2015 at 18:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .