using ACML from AMD

Hi,

My platform is “pgf77 6.1-6 64-bit target on x86-64 Linux”.

I downloaded and installed ACML directly from AMD into a separate directory so as to have access to the _int64 and _mv variants of the lib in addition to the scalar and _mp variants.

Invoking the separately installed shared acml libs using the command line given in the documentation doesn’t seem to work properly.

$ pgf77 -mcmodel=medium dgetrf_example.f -L/usr/local/acml3.5.0/pgi64 -lacml
dgetrf_example.f:

$ ldd a.out
        libacml.so => /share/apps/portland6.1/linux86-64/6.1/libso/libacml.so (0x0000002a95557000)

It appears that the version of libacml.so that comes with the Portland installation is being linked instead.

What’s the proper way of linking with an ACML that’s located in a separate directory.

Thanks!

Ed

It’s not necessarily that the PGI version is linked in, but the PGI version is being resolved at runtime. Either link against the static acml library, or set the LD_LIBRARY_PATH environment variable to /usr/local/acml3.5.0/pgi64.

e.g.
export LD_LIBRARY_PATH="/usr/local/acml3.5.0/pgi64:$LD_LIBRARY_PATH"

or

setenv LD_LIBRARY_PATH “/usr/local/acml3.5.0/pgi64:$LD_LIBRARY_PATH”

Thank you Christopher, setting LD_LIBRARY_PATH works.

(Slight correction to my original post, -lacml_mv was also required.)

Ed