5 Replies Latest reply on Apr 12, 2013 10:13 AM by lejeczek

    acml-5-3-0-open64-64bit and magma-1.3.0 fails

    lejeczek

      hi everybody

       

      I'm trying to build magma with acml but compilation fails:

       

      gcc: unrecognized option '-zmuldefs'
      /opt/acml5.3.0/open64_64/lib/libacml.so: undefined reference to `_TRANSFER'
      /opt/acml5.3.0/open64_64/lib/libacml.so: undefined reference to `_index90'
      /opt/acml5.3.0/open64_64/lib/libacml.so: undefined reference to `_F90_STOP'
      /opt/acml5.3.0/open64_64/lib/libacml.so: undefined reference to `_FRF'
      /opt/acml5.3.0/open64_64/lib/libacml.so: undefined reference to `s_cmp'
      /opt/acml5.3.0/open64_64/lib/libacml.so: undefined reference to `s_copy'
      /opt/acml5.3.0/open64_64/lib/libacml.so: undefined reference to `s_cat'
      /opt/acml5.3.0/open64_64/lib/libacml.so: undefined reference to `__powri'
      /opt/acml5.3.0/open64_64/lib/libacml.so: undefined reference to `_FWF'
      /opt/acml5.3.0/open64_64/lib/libacml.so: undefined reference to `_DEALLOC'
      /opt/acml5.3.0/open64_64/lib/libacml.so: undefined reference to `__powii'
      /opt/acml5.3.0/open64_64/lib/libacml.so: undefined reference to `__powdi'
      collect2: ld returned 1 exit status
      make[1]: *** [testing_zgemm] Error 1
      make: *** [test] Error 2

       

      content of my make.inc:

      ------------------------------------

      GPU_TARGET = Fermi

       

      #CC        = gcc

      CC        = opencc-4.5.2

      NVCC      = nvcc

      FORT      = openf95-4.5.2

      #FORT      = gfortran

       

      ARCH      = ar

      ARCHFLAGS = cr

      RANLIB    = ranlib

       

      OPTS      = -O3 -DADD_ -fPIC

      F77OPTS   = -O3 -DADD_

      FOPTS     = -O3 -DADD_

      NVOPTS    = -O3 -DADD_ --compiler-options -fno-strict-aliasing -DUNIX

      LDOPTS    = -fPIC -Xlinker -zmuldefs

       

      LIB       = -lacml -lpthread -lcublas -lm

       

      CUDADIR   = /usr/local/cuda

       

      LIBDIR    = -L/opt/acml5.3.0/open64_64/lib \

                  -L$(CUDADIR)/lib64

      INC       = -I$(CUDADIR)/include

      --------------------------------------------------------

       

      I was hoping a developer/programmer, I ain't one, could shed some light as to what might be wrong,

      I am going to ask magma's people but I thought I should before double check here, maybe I'm not doing something silly..

       

      any thoughts?

      many thanks

        • Re: acml-5-3-0-open64-64bit and magma-1.3.0 fails
          chipf

          Did you choose the open64 compiler for a reason?  The missing symbols would be found in the open64 runtimes.  Examples of how to include those in the LIB and LIBDIR definitions can be found by running and examining the ACML examples.

           

          I suspect you would be the first to try using MAGMA with the open64 compiler.

          • Re: acml-5-3-0-open64-64bit and magma-1.3.0 fails
            lejeczek

            well, I was hoping for best possible optimization for Opetrons that most of our boxes sport

            where do I find these examples? not in the rpm package are they?

            and I also try gnu/gfortran with ACML and depending on which compiler-version I use I get different errors, eg with acml-5-3-0-gfortran-64bit1:

             

            gcc -fPIC -Xlinker -zmuldefs -DGPUSHMEM=200  testing_zgemm.o  -o testing_zgemm \
                libtest.a lin/liblapacktest.a -L../lib -lmagma -lmagmablas -lmagma \
                -L/usr/local/cuda/lib64 -L/opt/acml-5-3-0-gfortran-64bit1/gfortran64_mp/lib -L/opt/lib64 \
                -lacml_mp -mp -lpthread -lm -lcublas -lcblas
            /opt/acml-5-3-0-gfortran-64bit1/gfortran64_mp/lib/libacml_mp.so: undefined reference to `_gfortran_transfer_integer_write@GFORTRAN_1.4'
            /opt/acml-5-3-0-gfortran-64bit1/gfortran64_mp/lib/libacml_mp.so: undefined reference to `_gfortran_transfer_character_write@GFORTRAN_1.4'
            /opt/acml-5-3-0-gfortran-64bit1/gfortran64_mp/lib/libacml_mp.so: undefined reference to `_gfortran_transfer_real_write@GFORTRAN_1.4'
            collect2: ld returned 1 exit status

             

            thanks Chip for you help

              • Re: acml-5-3-0-open64-64bit and magma-1.3.0 fails
                chipf

                The examples are not hard to find, they are in example directory.  We don't make RPMs available, just tgz files and you can download these and extract the examples if they aren't available on your system.

                 

                The compiler problem you're having sounds like it might be just a version problem.  We used GCC/GFORTRAN 4.7.1 for ACML 5.3.0.  Also be carefull how LIBRARY_PATH and LD_LIBRARY_PATH are defined.  If these point to the wrong gcc then you can have these sorts of problems.

                 

                There are many older posts about solving gcc undefined reference problems.  This one is the most recent: http://devgurus.amd.com/message/1285922#1285922

                 

                I know that I can build and run the magma library and test programs, at least the openCL version.

              • Re: acml-5-3-0-open64-64bit and magma-1.3.0 fails
                lejeczek

                this is my make.inc for mamga 1.3.0:

                 

                GPU_TARGET = Fermi

                 

                CC        = opencc-4.5.2
                FORT      = openf90-4.5.2
                NVCC      = nvcc

                 

                ARCH      = ar
                ARCHFLAGS = cr
                RANLIB    = ranlib

                 

                OPTS      = -O3 -DADD_ -fPIC
                F77OPTS   = -O3 -DADD_
                FOPTS     = -O3 -DADD_
                NVOPTS    = -O3 -DADD_ --compiler-options -fno-strict-aliasing -DUNIX
                LDOPTS    = -fPIC -Xlinker

                 

                LIB       = -lacml_mp -mp -lpthread -lm -lfortran -lffio -lmv -lcblas -lcublas

                 

                CUDADIR   = /usr/local/cuda


                LIBDIR    = -L$(CUDADIR)/lib64 \
                            -L/opt/acml-5-3-0-open64-64bit-int64/open64_64_mp_int64/lib \
                            -L/opt/x86_open64-4.5.2/open64-gcc-4.2.0/lib64 \
                            -L/opt/usr/lib64

                 

                INC       = -I$(CUDADIR)/include \
                            -I/opt/acml-5-3-0-open64-64bit-int64/open64_64_int64/include \
                            -I/opt/usr/include/libcblas

                 

                it works nicely for a longer while then fails with:

                 

                ../lib/libmagma.a(dlaex1.o): In function `magma_dlaex1':

                /home/pe243/rpmbuild/tars/magma-1.3.0-open64/src/dlaex1.cpp:203: undefined reference to `magma_dlaed2_'

                collect2: ld returned 1 exit status

                make[1]: *** [testing_dsyevd_gpu] Error 1

                 

                on magma's forum I get hint that an assumption is that Fortran adds _ to function names, but proposed fix:

                http://icl.cs.utk.edu/magma/forum/viewtopic.php?f=2&t=865

                did not help