I just downloaded ACML5 and tried to build the performance examples. I got the same linker errors using gfortran 4.4.3 on Ubuntu 10.04.
Compiling program time_drandbeta.f90: gfortran -c time_drandbeta.f90 -o time_drandbeta.o Linking program time_drandbeta.exe: gfortran time_drandbeta.o /opt/acml5.0.0/gfortran64/lib/libacml.a -lrt -o time_drandbeta.exe /opt/acml5.0.0/gfortran64/lib/libacml.a(xerbla.o): In function `xerbla_': xerbla.f:(.text+0x109): undefined reference to `_gfortran_transfer_integer_write' xerbla.f:(.text+0x2c6): undefined reference to `_gfortran_transfer_integer_write' xerbla.f:(.text+0x37f): undefined reference to `_gfortran_transfer_integer_write' xerbla.f:(.text+0x394): undefined reference to `_gfortran_transfer_integer_write' xerbla.f:(.text+0x3a9): undefined reference to `_gfortran_transfer_integer_write' /opt/acml5.0.0/gfortran64/lib/libacml.a(xerbla.o):xerbla.f:(.text+0x3be): more undefined references to `_gfortran_transfer_integer_write' follow /opt/acml5.0.0/gfortran64/lib/libacml.a(xerbla.o): In function `xerbla_': xerbla.f:(.text+0x4ac): undefined reference to `_gfortran_transfer_character_write' xerbla.f:(.text+0x4c1): undefined reference to `_gfortran_transfer_character_write' xerbla.f:(.text+0x52f): undefined reference to `_gfortran_transfer_character_write' xerbla.f:(.text+0x53f): undefined reference to `_gfortran_transfer_integer_write' collect2: ld returned 1 exit status
I have the same problem
This is of course due to using GCC/GFORTRAN 4.6.0 for the ACML 5.0.0 builds.
There appears to be a GCC 4.6.0 build available for Ubuntu. We will test with this soon. If it works, it would be the best option for resolving the problem.
Another option would be to continue using the 4.4.0 ACML library.
We were able to build gcc/gfortran 4.6.0 on an ubuntu system and use it to build and run the ACML examaples. It can be done!
A quick google such as "gfortran 4.6 ubuntu" will show where packages can be downloaded from, and you can also find various descriptions of how to build from source. When building from source, you need to copy the contents of /usr/include/asm-generic directory to newly created /usr/include/asm. Without this, the build process terminates with an error saying missing asm/errorno.h.
After installing the new compiler, make sure you have the environment setup correctly to use the new compiler libraries.
Ubuntu 12.04 LTS (Precise) has gcc 4.6.3, and I can confirm that this does appear to link correctly with ACML 5.1.0.
I too would like to ask about the version of libgfortran required by ACML v5.1. I searched the AMD site and documentation rather wildly without finding this information. I'm asking because I downloaded v5.1 and attempted to use it on a RHEL 6.1 system that has GCC including gfortran version 4.4.5. I ran ldd on the single .so file and received the following output that indicates my system does not meet the prereqs.
$ ldd /opt/acml5.1.0/gfortran64_mp_int64/lib/libacml_mp.so
/opt/acml5.1.0/gfortran64_mp_int64/lib/libacml_mp.so: /usr/lib64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /opt/acml5.1.0/gfortran64_mp_int64/lib/libacml_mp.so)
linux-vdso.so.1 => (0x00007fff92bf6000)
librt.so.1 => /lib64/librt.so.1 (0x00007f061d05a000)
libgfortran.so.3 => /usr/lib64/libgfortran.so.3 (0x00007f061cd68000)
libm.so.6 => /lib64/libm.so.6 (0x00007f061cae3000)
libgomp.so.1 => /usr/lib64/libgomp.so.1 (0x00007f061c8d6000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f061c6b9000)
libc.so.6 => /lib64/libc.so.6 (0x00007f061c327000)
I also checked an Ubuntu 12.04 machine that has GCC 4.6.3. There the link dependencies of ACML 5.1 are satisfied by a file again named libgfortran.so.3. It's rather confusing to me that both machines have files named libgfortran.so.3 (and libgfortran.so.3.0.0), yet with very different content Please help, thanks.
A similar situation exists for Ubuntu 10.04.4 LTS (Lucid) and 12.04 LTS (Precise). The file libgfortran.so.3 is only a symbolic link to libgfortran.so.3.0.0 for both cases; however, the library itself is a different file, and in a different location with different dependencies:
Ubuntu 10.04.4 LTS (GCC 4.4.3) =
-rw-r--r-- 1 root root 968312 2012-03-09 04:22 /usr/lib/libgfortran.so.3.0.0
$ ldd /usr/lib/libgfortran.so.3.0.0
linux-vdso.so.1 => (0x00007fffebdff000)
libm.so.6 => /lib/libm.so.6 (0x00007f8fcc572000)
libc.so.6 => /lib/libc.so.6 (0x00007f8fcc1ef000)
Ubuntu 12.04 LTS (GCC 4.6.3) =
-rw-r--r-- 1 root root 1141184 Apr 16 00:37 /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
$ ldd /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0
linux-vdso.so.1 => (0x00007fffef8b4000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007fa414b25000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa41482b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa41446d000)
Specifically libgfortran on Ubuntu 12.04 LTS needs libquadmath. The link dependencies for ACML 5.1.0 are satisfied by libgfortran.so.3.0.0 on Ubuntu 12.04, but not by libgfortran.so.3.0.0 on Ubuntu 10.04.4.
It seems to me that ACML 4.4.0 is an adequate solution for older systems; otherwise, upgrade the GCC to 4.6.x if your really must have ACML 5.1.0, and newer hosts ought to have GCC 4.6.x or higher anyway.
Thanks for the quick reply! I downloaded ACM version 4.4 in the hope it will satisfy BLAS and LAPACK requirements for Octave version 3.6.2. I am using the files from ACML subdirectory gfortran64_mp_int64, the 64bit version with 64-bit integers for symmetric multi-processing. Running ldd on the two shared library files that came from there seemed to indicate all dependencies are satisfied:
$ ldd libacml_mv.so
linux-vdso.so.1 => (0x00007fffe8277000)
libgomp.so.1 => /usr/lib64/libgomp.so.1 (0x00007fa241bb6000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa241998000)
libc.so.6 => /lib64/libc.so.6 (0x00007fa241607000)
librt.so.1 => /lib64/librt.so.1 (0x00007fa2413ff000)
$ ldd libacml_mp.so
linux-vdso.so.1 => (0x00007fff24533000)
librt.so.1 => /lib64/librt.so.1 (0x00007f9948bb8000)
libacml_mv.so => /usr/lib64/libacml_mv.so (0x00007f9948969000)
libgfortran.so.3 => /usr/lib64/libgfortran.so.3
libm.so.6 => /lib64/libm.so.6 (0x00007f99483f3000)
libgomp.so.1 => /usr/lib64/libgomp.so.1 (0x00007f99481e5000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f9947fc8000)
libc.so.6 => /lib64/libc.so.6 (0x00007f9947c37000)
This machine has GCC including gfortran version 4.4.5. I tried to configure octave using this incantation:
./configure --without-curl --with-blas=acml_mp --with-lapack=acml_mp --enable-64
That yielded this error:
configure: error: BLAS doesn't seem to support 64-bit integers. This
is incompatible with --enable-64.
So in desperation I tried without --enable-64:
./configure --without-curl --with-blas=acml_mp --with-lapack=acml_mp
That yielded a different error:
configure: error: A BLAS library was detected but found incompatible
with your Fortran 77 compiler
Do you see any obvious errors here? Now I'm concerned that my old GCC version just doesn't meet the needs of ACML 4.4.
I see now that the subject of this thread is UBuntu but I'm using RHEL. I'll be happy to move this to a new thread if that's the right thing to do.
Thanks in advance!!
Following some experimentation, I found that using
./configure --prefix=/tmp/octave --without-curl --with-blas=acml_mp --with-lapack=acml_mp \
--enable-64 --disable-readline --disable-docs
I am able to build and install octave 2.6.3 from source, linked to the ACML libraries in gfortran64_mp_int64 for the following systems:
GCC 4.4.3 with ACML 4.4.0 on Ubuntu 10.04.4 LTS (Lucid), and
GCC 4.6.3 with ACML 5.1.0 on Ubuntu 12.04 LTS (Precise)
There are many warnings, and one must have all the requisite packages installed for building, compiling, code development, etc., but apart from that it works. Also, please be aware that, according to the documentation for octave, the --enable-64 option is experimental, and not recommended.
Just want to check - did you really mean Octave version 2.6.3 ? The latest version is 3.6.2.
Apologies: it is octave 3.6.2.
You have to set either LD_PATH for your ACML folder or put the .so file in /usr/lib
The relevant shell variables are:
One may also add appropriate entries to /etc/ld.so.conf or the directory /etc/ld.so.conf.d/ to point at the ACML, and run ldconfig. Full details can be found from "man ld", "man ldd", and "man ldconfig".
Thank you for the help, I have finally come back to this item. You didn't mention where you installed ACML libs on your system, but based on your config line that doesn't specify any library directory, I am guessing your libs are in a directory that is automatically searched by ld. Perhaps you have changed your /etc/ld.so.conf file and/or have added files to /etc/ld.so.conf.d?
Many thanks to Ed Meyer for telling me to look into the config.log file. That let me see my problem before was from ld:
/usr/bin/ld: cannot find -lacml_mp
This bit of output does NOT appear on the console when config runs, and I didn't know how to get this detail. That told me link was failing for a silly reason, not some tricky library incompatibility.
So with this help I was able to get ACML 4.4 and Octave 3.6.2 to play together nicely on RHEL 6.1, just had to avoid the errors between the keyboard and the chair :-)
My base configuration is RHEL 6.1 installed as a "software development workstation" (Anaconda adds lots of extra packages). It has readline and curl. The system has this gcc/gfortran suite:
gcc (GCC) 4.4.5 20110214 (Red Hat 4.4.5-6)
I downloaded ACML 4.4 and let it install itself in /opt (needed root privs here). I set a shell variable:
$ export LD_LIBRARY_PATH=/opt/acml4.4.0/gfortran64_mp_int64/lib
I did not change /etc/ld.so.conf and I did not add a file to /etc/ld.so.conf.d to tell the system to search the /opt/acml-4.4 area automatically. Then checked the dependencies of the multi-processing ACML shared libs:
$ ldd /opt/acml4.4.0/gfortran64_mp_int64/lib/libacml_mv.so
linux-vdso.so.1 => (0x00007fffaabff000)
libgomp.so.1 => /usr/lib64/libgomp.so.1 (0x00007f6a39441000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6a39223000)
libc.so.6 => /lib64/libc.so.6 (0x00007f6a38e92000)
librt.so.1 => /lib64/librt.so.1 (0x00007f6a38c8a000)
$ ldd /opt/acml4.4.0/gfortran64_mp_int64/lib/libacml_mp.so
linux-vdso.so.1 => (0x00007fff076ca000)
librt.so.1 => /lib64/librt.so.1 (0x00007f5b3d1ef000)
libacml_mv.so => /opt/acml4.4.0/gfortran64_mp_int64/lib/libacml_mv.so (0x00007f5b3cfa0000)
libgfortran.so.3 => /usr/lib64/libgfortran.so.3 (0x00007f5b3ccae000)
libm.so.6 => /lib64/libm.so.6 (0x00007f5b3ca2a000)
libgomp.so.1 => /usr/lib64/libgomp.so.1 (0x00007f5b3c81c000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5b3c5ff000)
libc.so.6 => /lib64/libc.so.6 (0x00007f5b3c26e000)
That output tells me every dependency is satisfied. The system has PCRE but not PCRE devel (headers) required by Octave, so installed it (need root privs again):
sudo yum install pcre-devel
I downloaded Octave 3.6.2, unpacked. Configured Octave with this incantation:
./configure --enable-64 --disable-docs --with-blas=acml_mp --with-lapack=acml_mp \
And configure ran to completion! The octave make built a binary successfully (altho blew up when it tried to run makeinfo, grr). Octave launches! If I unset LD_LIBRARY_PATH then octave does not start (no surprise there).
As indicated in my previous posts, assuming all the necessary code development packages are installed, and shell variables set appropriately or ldconfig's configuration files set up appropriately, packages such as octave will compile and link properly. In fact, I use a non-standard location for the ACML, but this causes no problems. So, I think we can mark this thread as "SOLVED".