Nick
Nick

Reputation: 2871

Build shared libraries in ATLAS

I've read the entire ATLAS installation guide, and it says all you need to build shared (.so) libraries is to pass the --shared flag to the configure script. However, when I build, the only .so files that appear in my lib folder are libsatlas.so and libtatlas.so, though the guide says that there should be six others:

libatlas.so, libcblas.so, libf77blas.so, liblapack.so, libptcblas.so, libptf77blas.so

After installation some of the tests fail because these libraries are missing. Furthermore, FFPACK wants these libraries during installation.

Has anyone encountered this? What am I doing incorrectly?

Upvotes: 7

Views: 7475

Answers (3)

Vesa Suontama
Vesa Suontama

Reputation: 1

I had to manually create links to the .so.3 files. So the versioned library files existed, but not the files the cmake was looking for.

Running

 sudo ln -s libatlas.so.3 libatlas.so
 sudo ln -s libcblas.so.3 libcblas.so
 sudo ln -s liblapack_atlas.so.3 

(I didn't build the cblas, atlas or lapack but installed them with apt-get. Wondering why the links were not automatically created).

Upvotes: -1

boojum
boojum

Reputation: 181

First if you have incorrectly specified the --force-tids flag for configure then the parallel libs won't build. To check this you can run make ptcheck. I have question regarding the specification of this flag here

Then if I examine my resulting ATLAS Makefile it says " ... only when atlas is built to one lib" and indeed only two "fat" libs are constructed: libsatlas.so and libtatlas.so.

I quess you can either link FFPACK against those libs or change the resulting ATLAS Makefile to contain the targets you need (Which won't be too hard since the static libs are available).

Upvotes: 0

Kenneth Hoste
Kenneth Hoste

Reputation: 2971

In my experience, it's a lot more complex than that, see our EasyBuild implementation of the ATLAS build procedure at https://github.com/hpcugent/easybuild-easyblocks/blob/master/easybuild/easyblocks/a/atlas.py .

We needed to:

  • enable the -fPIC compiler option
  • run 'make shared cshared ptshared cptshared' in the 'lib' directory

We're not even using --shared for configure, probably because it doesn't do much.

If you want to build ATLAS (and whatever you will be linking it with) without headaches, look into EasyBuild.

(disclaimer: I'm a developer for EasyBuild)

Upvotes: 5

Related Questions