2 Replies Latest reply on Mar 20, 2012 2:48 PM by tbodine

    How to use ACML with gcc 4.6.2 on Redhat to run HPL?

    tbodine

      Hello

           Since I see this error when trying to use ACML with RHEL 6.2 out of the box:

                         undefined reference to `_gfortran_transfer_integer_write'

           I know I need the newest version of GCC namely 4.6.2. Also I have got gcc 4.6.2, ACML and HPL all working together happily under SUSE on both SLED and SLES. But after trying for several days I can't get past the need of gcc for the thread utilities crti.o crtn.o etc.

       

       

      I am trying to build HPC High Performance Linpack .

       

          I have figured out how to build it on SUSE. On Suse I must build

          a complete gcc 4.6.2 compiler from the ground up. Then ACML,

          openMPI, and HPL.

       

          When I build gcc, for each package I run configure with these arguments:

              parentDir=where I want to put it like /opt or /usr/local

              export LD_LIBRARY_PATH="$parentDir/lib:/usr/local/lib:/lib"

              export PATH=$parentDir/bin:$PATH

              dirArgs="--prefix=$parentDir --exec-prefix=$parentDir"

              gmpArgs="--with-gmp-include=$parentDir/include/ --with-gmp-lib=$parentDir/lib"

          The dirArgs are used for every package, the gmpArgs are used only for

          the packages that need GMP.

       

          I have a problem compiling HPL under RedHat:

       

              1. If I try compiling in the same way I do under SUSE, I see

                  "cannot find crti.o" and "cannot find crtn.o" from

                  $parentDir/x86_64-unknown-linux-gnu/bin/ld

       

              but there is a crti.o and crtn.o in

                  /usr/lib/x86_64-redhat-linux5E/lib64

       

              I suspect gcc is trying to compile 32 bit even though I used

              this command when configuring gcc:

              ./configure --prefix=$parentDirectory --exec-prefix=$parentDirectory \

              --with-gmp-include=$parentDirectory/include/ --with-gmp-lib=$parentDirectory/lib --with-multilib-list=m64

       

              2. So then I tried compiling libc where I get this error:

                  $parentDir/x86_64-unknown-linux-gnu/bin/ld: cannot find crt1.o: No such file or directory

                  $parentDir/x86_64-unknown-linux-gnu/bin/ld: cannot find crti.o: No such file or directory

                  $parentDir/x86_64-unknown-linux-gnu/bin/ld: cannot find crtbegin.o: No such file or directory

                  $parentDir/x86_64-unknown-linux-gnu/bin/ld: cannot find -lgcc

                  $parentDir/x86_64-unknown-linux-gnu/bin/ld: cannot find -lgcc_s

                  $parentDir/x86_64-unknown-linux-gnu/bin/ld: cannot find -lgcc

                  $parentDir/x86_64-unknown-linux-gnu/bin/ld: cannot find -lgcc_s

                  $parentDir/x86_64-unknown-linux-gnu/bin/ld: cannot find crtend.o: No such file or directory

                  $parentDir/x86_64-unknown-linux-gnu/bin/ld: cannot find crtn.o

                         

              And try as I  might I can't seem to find a crtl.asm crti.asm

              crtend.asm for X86_64 or in my case AMD Opteron.           

       

              What do I do next?

      Thanks

        • Re: How to use ACML with gcc 4.6.2 on Redhat to run HPL?
          chipf

          We do tend to use SuSE the most and we also have that working well.

           

          When building GCC/GFORTARN, we use a configure statement such as this.

           

          /usr/local/src/gcc-4.6.0/configure --prefix=/opt/gcc460 --enable-shared --enable-languages=c,c++,fortran --disable-libquadmath --disable-libquadmath-support

           

          We have shown this to work properly on Red Hat.  On Ubuntu there are a few system includes that must be copied for the compiler to work (not the crt files you're having problems with).  We remove the quadmath support since libquadmath is typically not found on most systems, and we don't need it, so we don't want a dependency on it.

           

          For environment, I use this script:

          #!/bin/bash
          #
          # Set GCC environment variables.

          GCCPATH=/opt/gcc460
          GCCVER=4.6.0
          GCCARCH=x86_64-unknown-linux-gnu

          if [ -z "${PATH}" ]
          then
              export PATH=$GCCPATH/bin:$GCCPATH/libexec/gcc/$GCCARCH/$GCCVER:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin
          else
              export PATH=$GCCPATH/bin:$GCCPATH/libexec/gcc/$GCCARCH/$GCCVER:${PATH}
          fi

          if [ -z "${LIBRARY_PATH}" ]
          then
              export LIBRARY_PATH=$GCCPATH/lib64:$GCCPATH/lib/gcc/x86_64-unknown-linux-gnu/$GCCVER
          else
              export LIBRARY_PATH=$GCCPATH/lib64:$GCCPATH/lib/gcc/x86_64-unknown-linux-gnu/$GCCVER:${LIBRARY_PATH}
          fi

          if [ -z "${LD_LIBRARY_PATH}" ]
          then
              export LD_LIBRARY_PATH=$GCCPATH/lib64:/usr/local/lib64
          else
              export LD_LIBRARY_PATH=$GCCPATH/lib64:${LD_LIBRARY_PATH}
          fi

          if [ -z "${LD_RUN_PATH}" ]
          then
              export LD_RUN_PATH=$LIBRARY_PATH
          else
              export LD_RUN_PATH=$LIBRARY_PATH:${LD_RUN_PATH}
          fi

          if [ -z "${C_INCLUDE_PATH}" ]
          then
              export C_INCLUDE_PATH=$GCCPATH/lib/gcc/$GCCARCH/$GCCVER/include
          else
              export C_INCLUDE_PATH=$GCCPATH/lib/gcc/$GCCARCH/$GCCVER/include:$C_INCLUDE_PATH
          fi

          if [ -z "${MANPATH}" ]
          then
              export MANPATH=$GCCPATH/man
          else
              export MANPATH=$GCCPATH/man:$MANPATH
          fi

          if [ -z "${INFOPATH}" ]
          then
              export INFOPATH=$GCCPATH/info
          else
              export INFOPATH=$GCCPATH/info:$INFOPATH
          fi

          export CPATH=$GCCPATH/include:$GCCPATH/lib/gcc/$GCCARCH/$GCCVER/include
          export CPLUS_INCLUDE_PATH=$GCCPATH/include/c++/$GCCVER:$GCCPATH/lib/gcc/$GCCARCH/$GCCVER/include

           

          It's been a while since I built and used gcc on a RedHat machine.  I'll try it and see if I hit the same issue.

          1 of 1 people found this helpful