1 Reply Latest reply on Jan 30, 2008 6:48 PM by chipf

    LAPACK testing

    pmurtha
      How to build Lapack test routines for AMD x86_64 running Gentoo?

      Please help!
      I am trying to run the test routines for the Lapack and BLAS
      libraries to make sure the libraries are installed correctly
      before I port my code from 32 to 64-bits. I downloaded and
      unpacked the tarballs from netlib.org (just for the test routines).
      I edited the make.inc to use the gcc compiler and point at my
      acml blas and lapack libraries. The pertinent lines from my
      make.inc file are as follows:

      FORTRAN = gfortran
      OPTS = -march=k8 -funroll-all-loops -O3
      DRVOPTS = $(OPTS)
      NOOPT = -march=k8
      LOADER = gfortran
      LOADOPTS =
      .
      .
      .
      BLASLIB = `pkg-config --libs blas`
      LAPACKLIB = `pkg-config --libs lapack`
      TMGLIB = tmglib$(PLAT).a
      EIGSRCLIB = eigsrc$(PLAT).a
      LINSRCLIB = linsrc$(PLAT).a

      To test, I am using the command: make lapack_testing

      I originally suspected my problems were with my compiler flags,
      although I am beginning to wonder if this isn't another 32/64-bit
      conversion problem since with these flags, I get an error when I
      run the executables. The executables are not able to read the
      input files correctly. Instead, the output indicates it could not
      recognize the input. For example:

      SEQ: Unrecognized path name

      Any help, guidance, advice, ..., would be greatly appreciated! (And
      to make sure I haven't left anything out, below is some information
      on my machine architecure and Gentoo installaton.) Thanks in advance...

      Patty
      pmurtha@icaos.org

      ---------
      uname -a
      ---------
      Linux coccyx 2.6.22-gentoo-r4 #3 SMP PREEMPT Thu Sep 13 13:31:54 EDT 2007
      x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ AuthenticAMD GNU/Linux

      ---------
      gcc -v
      ---------
      Using built-in specs.
      Target: x86_64-pc-linux-gnu
      Configured with: /var/tmp/portage/sys-devel/gcc-4.2.2/work/gcc-4.2.2/configure
      --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.2.2
      --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/include
      --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.2
      --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.2/man
      --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.2/info
      --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.2/include/g++-v4
      --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
      --disable-nls --with-system-zlib --disable-checking --disable-werror
      --enable-secureplt --disable-libunwind-exceptions --enable-multilib
      --enable-libmudflap --disable-libssp --disable-libgcj
      --enable-languages=c,c++,treelang,fortran --enable-shared
      --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
      Thread model: posix
      gcc version 4.2.2 (Gentoo 4.2.2 p1.0)

      ------------------
      eselect blas list
      ------------------
      [1] acml-gfortran-int64
      [2] acml-gfortran-int64-openmp *

      --------------------
      eselect lapack list
      --------------------
      [1] acml-gfortran-int64
      [2] acml-gfortran-int64-openmp *

      -------------------
      eselect cblas list
      -------------------
      [1] gsl
      [2] reference *
        • LAPACK testing
          chipf
          I am able to build and run the LAPACK 3.1.1 tests. I modify the make.inc lines as so:
          FORTRAN = gfortran
          OPTS = -march=k8 -funroll-all-loops -O3
          DRVOPTS = $(OPTS)
          NOOPT = -march=k8
          LOADER = gfortran
          LOADOPTS =
          . (just like you did in your post)
          .
          .
          BLASLIB = /opt/acml4.0.1/gfortran64/lib/libacml.a
          LAPACKLIB =

          Then I edited the Makefiles in TESTING/LIN and TESTING/EIG to remove
          ../../$(LAPACK) from the build rules. I did this because I want to use the lapack
          routines from ACML and not the lib build from the source package.
          I also removed the lapacklib and blaslib dependencies from the lib target in the main Makefile (because I didn't care to build the those libs.

          Then typing make at the top level directory builds the tests. Note that I used gfortran 4.1.2 with the ACML library that I tested with.
          I did see a few failures... We'll have to check those out.