6 Replies Latest reply on Aug 8, 2008 1:19 PM by lytles

    OpenSUSE 11.0 and ACML 4.1.0 - missing references

    mekosmowski

      I'm having some trouble with undefined references (details below, truncated, first line shows library call) in a gfortran library when linking to acml 4.1.0 OpenSUSE 11.0, 64-bit, Opteron. My makefile is the same as one that worked except using -lacml -lacml_mv instead of -llapack -lblas. Similar errors were returned when only attempting to link to -lacml without the -lacml_mv.

      Any suggestions will be appreciated.

      Thanks!

         -L/opt/acml4.1.0/gfortran64/lib -lacml -lacml_mv -static
      /usr/lib64/gcc/x86_64-suse-linux/4.3/libgfortran.a(getlog.o): In function `_gfortran_getlog':
      (.text+0x36): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
      /opt/acml4.1.0/gfortran64/lib/libacml.a(dgemv.o): In function `dgemv_':
      dgemv.F.text+0x3fd): undefined reference to `_gfortran_allocate64'
      dgemv.F.text+0x451): undefined reference to `_gfortran_internal_free'
      dgemv.F.text+0x516): undefined reference to `_gfortran_deallocate'
      dgemv.F.text+0x7b2): undefined reference to `_gfortran_allocate64'
      dgemv.F.text+0x806): undefined reference to `_gfortran_internal_free'
      dgemv.F.text+0x8a8): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(dgeqrf.o): In function `dgeqrf_':
      dgeqrf.F.text+0x432): undefined reference to `_gfortran_allocate64'
      dgeqrf.F.text+0x4a5): undefined reference to `_gfortran_internal_free'
      dgeqrf.F.text+0x759): undefined reference to `_gfortran_allocate64'
      dgeqrf.F.text+0x7bc): undefined reference to `_gfortran_internal_free'
      dgeqrf.F.text+0x87b): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(dger.o): In function `dger_':
      dger.F.text+0x211): undefined reference to `_gfortran_allocate64'
      dger.F.text+0x275): undefined reference to `_gfortran_internal_free'
      dger.F.text+0x306): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(dgetrf.o): In function `dgetrf_':
      dgetrf.F.text+0x1d4): undefined reference to `_gfortran_allocate64'
      dgetrf.F.text+0x227): undefined reference to `_gfortran_internal_free'
      dgetrf.F.text+0x2bc): undefined reference to `_gfortran_allocate64'
      dgetrf.F.text+0x317): undefined reference to `_gfortran_internal_free'
      dgetrf.F.text+0x3ee): undefined reference to `_gfortran_deallocate'
      dgetrf.F.text+0x409): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(dlartg.o): In function `dlartg_':
      dlartg.f.text+0xd1): undefined reference to `_gfortran_pow_r8_i4'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(dorgqr.o): In function `dorgqr_':
      dorgqr.F.text+0x2aa): undefined reference to `_gfortran_allocate64'
      dorgqr.F.text+0x331): undefined reference to `_gfortran_internal_free'
      dorgqr.F.text+0x3fe): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(dormlq.o): In function `dormlq_':
      dormlq.F.text+0x470): undefined reference to `_gfortran_allocate64'
      dormlq.F.text+0x4bb): undefined reference to `_gfortran_internal_free'
      dormlq.F.text+0x98c): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(dormqr.o): In function `dormqr_':
      dormqr.F.text+0x3e8): undefined reference to `_gfortran_allocate64'
      dormqr.F.text+0x45b): undefined reference to `_gfortran_internal_free'
      dormqr.F.text+0x5af): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(dpotrf.o): In function `dpotrf_':
      dpotrf.F.text+0x27e): undefined reference to `_gfortran_allocate64'
      dpotrf.F.text+0x2d9): undefined reference to `_gfortran_internal_free'
      dpotrf.F.text+0x347): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(zhetrd.o): In function `zhetrd_':
      zhetrd.F.text+0x4fd): undefined reference to `_gfortran_allocate64'
      zhetrd.F.text+0x56a): undefined reference to `_gfortran_internal_free'
      zhetrd.F.text+0x65b): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(zpotrf.o): In function `zpotrf_':
      zpotrf.F.text+0x27e): undefined reference to `_gfortran_allocate64'
      zpotrf.F.text+0x2d9): undefined reference to `_gfortran_internal_free'
      zpotrf.F.text+0x347): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(zsteqr.o): In function `zsteqr_':
      zsteqr.F.text+0x34e): undefined reference to `_gfortran_allocate64'
      zsteqr.F.text+0x3b0): undefined reference to `_gfortran_internal_free'
      zsteqr.F.text+0x58b): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(ztrmmwrap.o): In function `ztrmmwrap_':
      ztrmmwrap.F.text+0x17d): undefined reference to `_gfortran_allocate64'
      ztrmmwrap.F.text+0x1c9): undefined reference to `_gfortran_internal_free'
      ztrmmwrap.F.text+0x30e): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(ztrsmwrap.o): In function `ztrsmwrap_':
      ztrsmwrap.F.text+0x17d): undefined reference to `_gfortran_allocate64'
      ztrsmwrap.F.text+0x1c9): undefined reference to `_gfortran_internal_free'
      ztrsmwrap.F.text+0x30e): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(dbdsqr.o): In function `dbdsqr_':
      dbdsqr.F.text+0x393): undefined reference to `_gfortran_allocate64'
      dbdsqr.F.text+0x3f7): undefined reference to `_gfortran_internal_free'
      dbdsqr.F.text+0x50c): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(dgebrd.o): In function `dgebrd_':
      dgebrd.F.text+0x13ff): undefined reference to `_gfortran_allocate64'
      dgebrd.F.text+0x1472): undefined reference to `_gfortran_internal_free'
      dgebrd.F.text+0x1574): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(dsyr2k.o): In function `dsyr2k_':
      dsyr2k.F.text+0x462): undefined reference to `_gfortran_allocate64'
      dsyr2k.F.text+0x4ad): undefined reference to `_gfortran_internal_free'
      dsyr2k.F.text+0x576): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(zhemmwrap.o): In function `zhemmwrap_':
      zhemmwrap.F.text+0x343): undefined reference to `_gfortran_allocate64'
      zhemmwrap.F.text+0x39c): undefined reference to `_gfortran_internal_free'
      zhemmwrap.F.text+0x4d9): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(zher2k.o): In function `zher2k_':
      zher2k.F.text+0x34a): undefined reference to `_gfortran_allocate64'
      zher2k.F.text+0x395): undefined reference to `_gfortran_internal_free'
      zher2k.F.text+0x467): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(zlargv.o): In function `zlargv_':
      zlargv.f.text+0xe8): undefined reference to `_gfortran_pow_r8_i4'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(zlartg.o): In function `zlartg_':
      zlartg.f.text+0xc7): undefined reference to `_gfortran_pow_r8_i4'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(zungqr.o): In function `zungqr_':
      zungqr.F.text+0x2ac): undefined reference to `_gfortran_allocate64'
      zungqr.F.text+0x333): undefined reference to `_gfortran_internal_free'
      zungqr.F.text+0x410): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(zungtr8z.o): In function `zungtr8z_':
      zungtr8z.F.text+0x10b): undefined reference to `_gfortran_allocate64'
      zungtr8z.F.text+0x157): undefined reference to `_gfortran_internal_free'
      zungtr8z.F.text+0x205): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(zunmqr.o): In function `zunmqr_':
      zunmqr.F.text+0x3f0): undefined reference to `_gfortran_allocate64'
      zunmqr.F.text+0x463): undefined reference to `_gfortran_internal_free'
      zunmqr.F.text+0x5cf): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(dorgtr8z.o): In function `dorgtr8z_':
      dorgtr8z.F.text+0x10b): undefined reference to `_gfortran_allocate64'
      dorgtr8z.F.text+0x156): undefined reference to `_gfortran_internal_free'
      dorgtr8z.F.text+0x206): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(dormql.o): In function `dormql_':
      dormql.F.text+0x3c8): undefined reference to `_gfortran_allocate64'
      dormql.F.text+0x413): undefined reference to `_gfortran_internal_free'
      dormql.F.text+0x847): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(zgerc.o): In function `zgerc_':
      zgerc.F.text+0x22f): undefined reference to `_gfortran_allocate64'
      zgerc.F.text+0x293): undefined reference to `_gfortran_internal_free'
      zgerc.F.text+0x324): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(ztrmv.o): In function `ztrmv_':
      ztrmv.F.text+0x321): undefined reference to `_gfortran_allocate64'
      ztrmv.F.text+0x37d): undefined reference to `_gfortran_internal_free'
      ztrmv.F.text+0x404): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(ztrsv.o): In function `ztrsv_':
      ztrsv.F.text+0x321): undefined reference to `_gfortran_allocate64'
      ztrsv.F.text+0x37d): undefined reference to `_gfortran_internal_free'
      ztrsv.F.text+0x404): undefined reference to `_gfortran_deallocate'
      /opt/acml4.1.0/gfortran64/lib/libacml.a(zgeru.o): In function `zgeru_':
      zgeru.F.text+0x22f): undefined reference to `_gfortran_allocate64'
      zgeru.F.text+0x293): undefined reference to `_gfortran_internal_free'
      zgeru.F.text+0x324): undefined reference to `_gfortran_deallocate'
      collect2: ld returned 1 exit status
      make: *** [cpmd.x] Error 1

        • OpenSUSE 11.0 and ACML 4.1.0 - missing references
          lytles

          i struggled to get this working at first, and still can't get things to build as statically as i'd like. try linking with -lgfortran, though this stuff all seems to be tied to particular versions of the compilers, and i'm using the older acml 4.0.1. output follows :

          lytles@bryan| nm -D /usr/lib/libgfortran.so.2 | grep gfortran_allocate64
          0000f3d0 T _gfortran_allocate64

          lytles@bryan| gfortran --version
          GNU Fortran (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
          Copyright (C) 2007 Free Software Foundation, Inc.

          • OpenSUSE 11.0 and ACML 4.1.0 - missing references
            japalmer29

            I'm having a similar problem (see next topic) ... I think part of the problem is that there is no libgfortran.a ... so compiling -static doesn't work, unfortunately.

            However, compiling dynamically (w/o -static) gets rid of almost all the allocate64 etc. undefined references, but still leaves 3 undefined references in libacml.so

            I'm not sure how to tell it which dynamic library to use specifically. Adding the dynamic library to the command line gives an error about not linking, but gets rid of the gfortran undefined references errors.

            I'm also using libgfortran.so.1 so maybe .so.2 with -lgfortran would fix the remaining undefined references. I'm attempting to get .so.2 installed ...

              • OpenSUSE 11.0 and ACML 4.1.0 - missing references
                lytles

                 

                the link is sensitive to which version of gcc you are using (i don't know the details, but it looked like when acml was compilied it would pull in dependencies, not sure what the fortran term for them is, maybe intrinsic functions, from the compiler, then when you'd go to link if you use a different version of the compiler that doesn't have the right intrinsics, you're hosed)

                one of my boxes is an older suse, and i had to install several different gcc in the 4.1 - 4.3 range to get acml 4.0.1 to link (gcc 4.2.3 is what ended up working for me, but i think i remember reading somewhere that acml 4.1 was going to build with gcc 4.3)

                > nm ~/install/apps/gcc/lib64/libgfortran.so.2 | grep _gfortran_allocate64
                0000000000014250 T _gfortran_allocate64
                0000000000014290 T _gfortran_allocate64_array
                > nm ~/install/apps/gcc/lib64/libgfortran.so.2 | grep _gfortran_deallocate
                00000000000141a0 T _gfortran_deallocate
                > nm ~/install/apps/gcc/lib64/libgfortran.so.2 | grep _gfortran_internal_free
                00000000000141e0 T _gfortran_internal_free

                so i think this will work, but could be anything - getting the initial builds / links to work was a real pain

                 

                 

                 

                  • OpenSUSE 11.0 and ACML 4.1.0 - missing references
                    mekosmowski

                    Does the below nm output shed any light on my situation?  This output strongly implies that libgfortran.a exists, right?

                    If I were to try explicitly linking -lgfortran should I put it before or after -lacml?

                    I am pretty sure that I had tried removing -static and ran into similar issues - if it would be helpful I can verify and post what happens when I remove -static.  I am away from my compile machine at the moment, but I recall seeing some sort of mismatch between libgfortran.so.2 and libgfortran.so.3.

                    Thanks for the replies!

                    mark@sgt:~> nm /usr/lib64/gcc/x86_64-suse-linux/4.3/libgfortran.a|grep gfortran_allocate64
                    nm: maxloc0_4_r16.o: no symbols
                    nm: maxloc0_8_r16.o: no symbols
                    nm: maxloc0_16_r16.o: no symbols
                    nm: maxloc1_4_r16.o: no symbols
                    nm: maxloc1_8_r16.o: no symbols
                    nm: maxloc1_16_r16.o: no symbols
                    nm: maxval_r16.o: no symbols
                    nm: minloc0_4_r16.o: no symbols
                    nm: minloc0_8_r16.o: no symbols
                    nm: minloc0_16_r16.o: no symbols
                    nm: minloc1_4_r16.o: no symbols
                    nm: minloc1_8_r16.o: no symbols
                    nm: minloc1_16_r16.o: no symbols
                    nm: minval_r16.o: no symbols
                    nm: product_r16.o: no symbols
                    nm: product_c16.o: no symbols
                    nm: sum_r16.o: no symbols
                    nm: sum_c16.o: no symbols
                    nm: matmul_r16.o: no symbols
                    nm: matmul_c16.o: no symbols
                    nm: transpose_r16.o: no symbols
                    nm: transpose_c16.o: no symbols
                    nm: reshape_r16.o: no symbols
                    nm: reshape_c16.o: no symbols
                    nm: in_pack_c16.o: no symbols
                    nm: in_unpack_c16.o: no symbols
                    nm: exponent_r16.o: no symbols
                    nm: fraction_r16.o: no symbols
                    nm: nearest_r16.o: no symbols
                    nm: set_exponent_r16.o: no symbols
                    nm: pow_c16_i4.o: no symbols
                    nm: pow_r16_i8.o: no symbols
                    nm: pow_c16_i8.o: no symbols
                    nm: pow_r16_i16.o: no symbols
                    nm: pow_c16_i16.o: no symbols
                    nm: rrspacing_r16.o: no symbols
                    nm: spacing_r16.o: no symbols
                    nm: c99_functions.o: no symbols
                    nm: _abs_c16.o: no symbols
                    nm: _abs_r16.o: no symbols
                    nm: _aimag_c16.o: no symbols
                    nm: _exp_r16.o: no symbols
                    nm: _exp_c16.o: no symbols
                    nm: _log_r16.o: no symbols
                    nm: _log_c16.o: no symbols
                    nm: _log10_r16.o: no symbols
                    nm: _sqrt_r16.o: no symbols
                    nm: _sqrt_c16.o: no symbols
                    nm: _asin_r16.o: no symbols
                    nm: _asinh_r16.o: no symbols
                    nm: _acos_r16.o: no symbols
                    nm: _acosh_r16.o: no symbols
                    nm: _atan_r16.o: no symbols
                    nm: _atanh_r16.o: no symbols
                    nm: _sin_r16.o: no symbols
                    nm: _sin_c16.o: no symbols
                    nm: _cos_r16.o: no symbols
                    nm: _cos_c16.o: no symbols
                    nm: _tan_r16.o: no symbols
                    nm: _sinh_r16.o: no symbols
                    nm: _cosh_r16.o: no symbols
                    nm: _tanh_r16.o: no symbols
                    nm: _conjg_c16.o: no symbols
                    nm: _aint_r16.o: no symbols
                    nm: _anint_r16.o: no symbols
                    nm: _sign_r16.o: no symbols
                    nm: _dim_r16.o: no symbols
                    nm: _atan2_r16.o: no symbols
                    nm: _mod_r16.o: no symbols
                    mark@sgt:~>