4 Replies Latest reply on Apr 17, 2013 5:19 AM by lejeczek

    magma-1.3.0 & acml-5-3-0 would not compile

    lejeczek

      hi everybody
      apologies for any rookie mistake for I'm being one, I'm trying to compile like in the subject.
      Have been trying both:
      acml5.3.0-open64 & acml-5-3-0-gfortran-64bit1

       

      magma's make.inc looks:

       

      # CC        = gcc
      CC        = opencc-4.5.2
      # CC        = opencc
      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 -mp

       

      # LIB       = -lacml -lpthread -lcublas -lm -lfortran -lffio -lm -lmv
      LIB       = -lacml_mp -lpthread -lcublas -lm
      # LIB       = -lacml -lpthread -lcublas -lm

       

      CUDADIR   = /usr/local/cuda

       

      #  -lacml -lfortran -lffio  -lm -lmv  # this should probably go to LIB when us
      # LIBDIR    = -L/opt/x86_open64-4.5.2/lib/gcc-lib/x86_64-open64-linux/4.5.2 \

       

      LIBDIR    = -L/opt/acml5.3.0/open64_64_mp_int64/lib \
                  -L$(CUDADIR)/lib64
      INC       = -I$(CUDADIR)/include -I/opt/acml5.3.0/open64_64_mp_int64/include
      # INC       = -I$(CUDADIR)/include

       

      way it fails:

       

      opencc-4.5.2 -fPIC -Xlinker -mp -DGPUSHMEM=200  testing_zgemm.o  -o testing_zgemm \

          libtest.a lin/liblapacktest.a -L../lib -lmagma -lmagmablas -lmagma \

          -L/opt/acml5.3.0/open64_64_mp_int64/lib -L/usr/local/cuda/lib64  \

          -lacml_mp -lpthread -lcublas -lm

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `__ompc_end_critical'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `__powll'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `__ompc_critical'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `__ompc_serialized_parallel'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `__ompc_get_local_thread_num'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `_TRANSFER'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `__ompc_end_serialized_parallel'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `__ompc_static_init_8'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `_index90'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `__ompc_fork'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `_F90_STOP'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `_FRF'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `s_cmp'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `__powrl'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `s_copy'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `__ompc_can_fork'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `s_cat'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `__powdl'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `_FWF'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `_DEALLOC'

      /opt/acml5.3.0/open64_64_mp_int64/lib/libacml_mp.so: undefined reference to `__ompc_barrier'

      collect2: ld returned 1 exit status

      make[1]: *** [testing_zgemm] Error 1

       

      as you can see I've also been trying gcc/gfortran, unfortunately also unsuccessfully

      can anybody help?

      many thanks

        • Re: magma-1.3.0 & acml-5-3-0 would not compile
          saravanan_ekanathan

          Could you please try the following:

          1) Add -lopenmp and -lfortran in linker path

          2) Use openf90 instead of opencc

          Hope this helps.

            • Re: magma-1.3.0 & acml-5-3-0 would not compile
              lejeczek

              it did not help, my magma make.inc now is:

               

              GPU_TARGET = Fermi

               

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

               

              ARCH      = ar
              ARCHFLAGS = cr
              RANLIB    = ranlib

               

              #OPTS      = -O3 -DADD_ -DCUBLAS_GFORTRAN -fPIC
              #F77OPTS   = -O3 gfortran -DCUBLAS_GFORTRAN

               

              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 -lgfortran -lffio -lmv -lcblas -lcublas -lopenmp

               

              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

               

              for longer while it works but later fails:

               

              ../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

               

              here:

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

              is possible explanation with possible fix, which unfortunately did not work

            • magma-1.3.0 & acml-5-3-0 would not compile
              lejeczek

              I've already been tampering with -DCUBLAS_GFORTRAN

              did not change content of fortran_common.h though

              also was suggested on magma forum make.inc should have

              OPTS  = -O3 -DADD_ -DCUBLAS_GFORTRAN

               

              besides, this line does not seem right to me

              FORT      = gfortran -DCUBLAS_GFORTRAN


              I was back to supposedly the most default altas instead of acml, but not matter what it fails:

               

              testing_zgemm.o: In function `main':

              testing_zgemm.cpp:(.text+0x485): undefined reference to `zlarnv_'

              testing_zgemm.cpp:(.text+0x4aa): undefined reference to `zlarnv_'

              testing_zgemm.cpp:(.text+0x4cf): undefined reference to `zlarnv_'

              testing_zgemm.cpp:(.text+0x7ea): undefined reference to `zlange_'

              /usr/lib64/libf2c.so: undefined reference to `MAIN__'

               

              and yes I'm now trying only gcc/gfortran on rhel 6.3 with distro