David Parks
David Parks

Reputation: 32091

How to confirm what libraries Octave is *actually* using at runtime

I've built octave (successfully) using the ATLAS libraries (specifically the multithreaded libraries: libtatlas.so).

All looks well during the configure and make process (after much debugging), but after making Octave I'm still seeing matrix multiplication operations run in a single thread (the ATLAS libraries should make that operation multithreaded).

Is there a way I can see what library Octave is actually using when it does a matrix multiplication operations such as:

x = rand(10000,10000); y = rand(10000,10000); t=time(); 
z = x * y; 

I'm trying to determine if this is still a build issue (e.g. Octave didn't link in the right ATLAS libraries) or if this is an ATLAS issue (Octave uses the right libraries but ATLAS isn't behaving as expected).

Upvotes: 1

Views: 187

Answers (1)

PeterSW
PeterSW

Reputation: 5261

If you are on a linux platform then you can debug the library resolution most easily using ldd. If you simply run it on the application binary:

ldd <the binary file>

it will output a list of how the library dependencies have been resolved.

A more complex approach would be to set LD_DEBUG to libs before running the application:

env LD_DEBUG=libs <command to run application>

That will output information to the command line showing the whole shared library resolution and initialization process.

Upvotes: 1

Related Questions