8 Replies Latest reply on Jul 24, 2014 12:43 AM by sjg

    Please provide a recent build of ACML for CentOS 6

    sjg

      CentOS 6 (or whatever RHEL 6 you like) is a very popular enterprise Linux distribution.  I need a recent version of ACML which works on this platform.  By recent, I mean, supports LAPACK versions >= 3.2.  I have been using ACML 4.4.0 previously, but that's too old (LAPACK 3.1.1 I think).  It therefore doesn't work with R 3.0.0.

       

      Specifically, the problems are:

      1. R 3.0.0 doesn't work with ACML 4.4.0 because of the undefined LAPACK symbol dpstrf (maybe there are other reasons too)

      2. ACML 5.3.1 doesn't work on CentOS 6, because of GFORTRAN version incompatability (/usr/lib64/R/bin/exec/R: /usr/lib64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /usr/lib64/acml-blas-lapack-5.3.1/gfortran64_mp/lib/libblas.so.3)

       

      Previous threads on this topic (e.g. http://devgurus.amd.com/message/1285256#1285256) have suggested that I should build my own gcc 4.6 tool chain.  If I did that, I'd basically have to rebuild my whole system using gcc 4.6, which is like making my own Linux distribution.  That suggestion is surely ludicrous.

       

      Also, there are some compelling features in R 3.0.0 (w.r.t very large array handling) which mean we really need it.

       

      Therefore I politely request AMD to release a recent version of ACML built on a RHEL 6 (or clone) system, using the standard system gcc/gfortran.  There are surely many people wanting a similar thing.

       

      Isn't that reasonable?

       

      cheers,

      Simon

       

      PS: Alternatively, let me have the ACML source code under a NDA and I'll build it for you.  ;-)

        • Re: Please provide a recent build of ACML for CentOS 6
          chipf

          The problem is that the older GCC does not have many features needed by recent ACML versions, especially support  for newer AMD processors.

           

          I was able to find devtool packages for Centos 6.  Have you tried these?  I do have a recipe for building GCC 4.7.1 that has worked on a RHEL 6 system.  The compiler itself can be built and installed in user owned directories.

            • Re: Please provide a recent build of ACML for CentOS 6
              sjg

              Hi Chip,

               

              Ah, now that explains the (previously puzzling) lack of support for RHEL 6, thanks.

               

              Since I am supporting 100 or so users on 70 or so servers, building in user directories is not really an option.  Instead I will build myself a gcc 4.7 RPM to install alongside the system one, and make this selectable using the excellent environment modules package http://modules.sourceforge.net/.  If I build all my R 3.0.0 packages using this, I should be OK to link them against the latest ACML.

               

              I'll report back if I have any wisdom to add after going through this process.

               

              cheers,

              Simon

              • Re: Please provide a recent build of ACML for CentOS 6
                sjg

                Hi Chip,

                 

                Well, I still have nothing working.  I spent a few days trying to build my own gcc 4.7 toolchain, based on the FC18 SRPM.  Still not quite right, but perhaps this is my most promising avenue.  Having just discovered SCL, I may start again using that, with the FC18 SRPM.

                 

                I had a go with the CentOS devtoolset-1.1, from here:http://people.centos.org/tru/devtools-1.1/.  However, it seems not to ship with the fortran runtime library (libgfortran.so.3 (or should it be 4?).  All I have from there is plain old libgfortran.so, which is an ld script:

                /* GNU ld script

                   Use the shared library, but some functions are only in

                   the static library, so try that secondarily.  */

                OUTPUT_FORMAT(elf64-x86-64)

                INPUT ( /usr/lib64/libgfortran.so.3 -lgfortran_nonshared )

                 

                Doesn't look to me like that's ever going to provide the undefined symbols at runtime.  Did you get ACML working with the devtoolset on CentOS 6?

                 

                cheers,

                Simon

                  • Re: Please provide a recent build of ACML for CentOS 6
                    sjg

                    Well, I finally solved it.  The Red Hat devtools (and CentOS repackaging of them) are no good, because they don't ship the required fortran library.

                     

                    I had to rebuild gcc 4.7 from source.  This is huge, and takes a long time, but I packaged it as an RPM using SCL, and have put the resulting RPMs on the agr-free repo, in case this helps someone else.  You will need agr-devtools-libgfortran (and its single dependency, agr-devtools-libquadmath).  Get them from here:  http://rpm.agresearch.co.nz/

                     

                    Anyway, I'm a happy camper again, and so are my users of R 3.0.1 and ACML 5.3.1 on CentOS 6.

                     

                    cheers,

                    Simon

                      • Re: Please provide a recent build of ACML for CentOS 6
                        chipf

                        Our recipe for this process uses --disable-libquadmath and --disable-libquadmath-support on the gcc configure step.  This will build the gcc to not require libquadmath as a dependency, making it just a bit easier to support binary installations on other machines.  The downside is that the compiler won't fully support 128bit floats.

                         

                        Glad you got it resolved,  we had to go through the same pain here.  If you were to publish steps or a build script along with your rpm of binaries, I think that others will be grateful.

                          • Re: Please provide a recent build of ACML for CentOS 6
                            sjg

                            The SRPM is up on agr-free, and the spec file therein has the full story.  Not recommended for the faint of heart.  ;-)

                             

                            http://rpm.agresearch.co.nz/agr-free/6/SRPMS/Packages/agr-devtools-gcc-4.7.2-8.el6.src.rpm

                             

                            cheers,

                            Simon

                              • Re: Please provide a recent build of ACML for CentOS 6
                                lejeczek

                                hi gents

                                 

                                this src.rpm still does not really help much, rebuilding it sill expect a whole bunch of dependencies that are not in distro's repository, at least not for scientificL, pulling them all in naturally breaks compatibility chain of the running system, or do you do it in chroot type of env or maybe the modules you Simon mentioned of are the solution?

                                how do you build and run 4.7.x without breaking OS'es toolchain?

                                 

                                best wishes

                                P.

                                  • Re: Please provide a recent build of ACML for CentOS 6
                                    sjg

                                    Hi,

                                     

                                    Only just saw your question.  Perhaps it would help you to know the incantation with which I build using this SRPM on CentOS 6, which is rpmbuild -ba gcc.spec --define 'scl agr-devtools'  (or use the binary RPMs, as suggested above).

                                     

                                    I doubt I will do anything more with this package (I have purged the memory of the pain I endured while jumping through these hoops).  I note, however, that the binary gcc package that gets built from my SRPM isn't installable (argh!), because of missing agr-devtools-runtime.  I'm planning to dodge this issue by using someone else's devtoolset package, e.g. Index of /data/puias/DevToolset/6/x86_64 (but I note their packages don't provide libgfortran.so.3).  Yes, it's a big mess, and I'll be moving to CentOS 7 soon, I hope.  In the meantime, I'm still using the two binary RPMs I mentioned above, and they work for me on CentOS 6.  YMMV.

                                     

                                    My conclusion is, basically nobody else is using ACML 5 on CentOS 6 with libgfortran.so.3 from an RPM.  I think everyone must have built their own gcc in /usr/local, or similar.

                                     

                                    cheers,

                                    Simon