Git Product home page Git Product logo

openmathlib / openblas Goto Github PK

View Code? Open in Web Editor NEW
6.2K 206.0 1.5K 54.04 MB

OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.

Home Page: http://www.openblas.net

License: BSD 3-Clause "New" or "Revised" License

C 51.02% Shell 0.07% C++ 0.42% Assembly 17.50% Fortran 29.95% Makefile 0.52% CMake 0.36% TeX 0.04% Python 0.04% MATLAB 0.01% R 0.01% Meson 0.01% Raku 0.01% Perl 0.07% BitBake 0.01%
blas lapack lapacke

openblas's Introduction

OpenBLAS

Join the chat at https://gitter.im/xianyi/OpenBLAS

Travis CI: Build Status

AppVeyor: Build status

Cirrus CI: Build Status

Build Status

OSUOSL POWERCI Build Status

OSUOSL IBMZ-CI Build Status

Introduction

OpenBLAS is an optimized BLAS (Basic Linear Algebra Subprograms) library based on GotoBLAS2 1.13 BSD version.

Please read the documentation on the OpenBLAS wiki pages: https://github.com/xianyi/OpenBLAS/wiki.

For a general introduction to the BLAS routines, please refer to the extensive documentation of their reference implementation hosted at netlib: https://www.netlib.org/blas. On that site you will likewise find documentation for the reference implementation of the higher-level library LAPACK - the Linear Algebra Package that comes included with OpenBLAS. If you are looking for a general primer or refresher on Linear Algebra, the set of six 20-minute lecture videos by Prof. Gilbert Strang on either MIT OpenCourseWare https://ocw.mit.edu/resources/res-18-010-a-2020-vision-of-linear-algebra-spring-2020/ or Youtube https://www.youtube.com/playlist?list=PLUl4u3cNGP61iQEFiWLE21EJCxwmWvvek may be helpful.

Binary Packages

We provide official binary packages for the following platform:

  • Windows x86/x86_64

You can download them from file hosting on sourceforge.net or from the Releases section of the github project page, https://github.com/xianyi/OpenBLAS/releases.

Installation from Source

Download from project homepage, https://xianyi.github.com/OpenBLAS/, or check out the code using Git from https://github.com/xianyi/OpenBLAS.git. (If you want the most up to date version, be sure to use the develop branch - master is several years out of date due to a change of maintainership.) Buildtime parameters can be chosen in Makefile.rule, see there for a short description of each option. Most can also be given directly on the make or cmake command line.

Dependencies

Building OpenBLAS requires the following to be installed:

  • GNU Make
  • A C compiler, e.g. GCC or Clang
  • A Fortran compiler (optional, for LAPACK)
  • IBM MASS (optional, see below)

Normal compile

Simply invoking make (or gmake on BSD) will detect the CPU automatically. To set a specific target CPU, use make TARGET=xxx, e.g. make TARGET=NEHALEM. The full target list is in the file TargetList.txt, other build optionss are documented in Makefile.rule and can either be set there (typically by removing the comment character from the respective line), or used on the make command line. Note that when you run make install after building, you need to repeat all command line options you provided to make in the build step, as some settings like the supported maximum number of threads are automatically derived from the build host by default, which might not be what you want. For building with cmake, the usual conventions apply, i.e. create a build directory either underneath the toplevel OpenBLAS source directory or separate from it, and invoke cmake there with the path to the source tree and any build options you plan to set.

Cross compile

Set CC and FC to point to the cross toolchains, and set HOSTCC to your host C compiler. The target must be specified explicitly when cross compiling.

Examples:

  • On an x86 box, compile this library for a loongson3a CPU:

    make BINARY=64 CC=mips64el-unknown-linux-gnu-gcc FC=mips64el-unknown-linux-gnu-gfortran HOSTCC=gcc TARGET=LOONGSON3A

    or same with the newer mips-crosscompiler put out by Loongson that defaults to the 32bit ABI:

    make HOSTCC=gcc CC='/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/mips-linux-gnu-gcc -mabi=64' FC='/opt/mips-loongson-gcc7.3-linux-gnu/2019.06-29/bin/mips-linux-gnu-gfortran -mabi=64' TARGET=LOONGSON3A
  • On an x86 box, compile this library for a loongson3a CPU with loongcc (based on Open64) compiler:

    make CC=loongcc FC=loongf95 HOSTCC=gcc TARGET=LOONGSON3A CROSS=1 CROSS_SUFFIX=mips64el-st-linux-gnu-   NO_LAPACKE=1 NO_SHARED=1 BINARY=32

Debug version

A debug version can be built using make DEBUG=1.

Compile with MASS support on Power CPU (optional)

The IBM MASS library consists of a set of mathematical functions for C, C++, and Fortran applications that are tuned for optimum performance on POWER architectures. OpenBLAS with MASS requires a 64-bit, little-endian OS on POWER. The library can be installed as shown:

  • On Ubuntu:

    wget -q http://public.dhe.ibm.com/software/server/POWER/Linux/xl-compiler/eval/ppc64le/ubuntu/public.gpg -O- | sudo apt-key add -
    echo "deb http://public.dhe.ibm.com/software/server/POWER/Linux/xl-compiler/eval/ppc64le/ubuntu/ trusty main" | sudo tee /etc/apt/sources.list.d/ibm-xl-compiler-eval.list
    sudo apt-get update
    sudo apt-get install libxlmass-devel.8.1.5
  • On RHEL/CentOS:

    wget http://public.dhe.ibm.com/software/server/POWER/Linux/xl-compiler/eval/ppc64le/rhel7/repodata/repomd.xml.key
    sudo rpm --import repomd.xml.key
    wget http://public.dhe.ibm.com/software/server/POWER/Linux/xl-compiler/eval/ppc64le/rhel7/ibm-xl-compiler-eval.repo
    sudo cp ibm-xl-compiler-eval.repo /etc/yum.repos.d/
    sudo yum install libxlmass-devel.8.1.5

After installing the MASS library, compile OpenBLAS with USE_MASS=1. For example, to compile on Power8 with MASS support: make USE_MASS=1 TARGET=POWER8.

Install to a specific directory (optional)

Use PREFIX= when invoking make, for example

make install PREFIX=your_installation_directory

(along with all options you added on the make command line in the preceding build step) The default installation directory is /opt/OpenBLAS.

Supported CPUs and Operating Systems

Please read GotoBLAS_01Readme.txt for older CPU models already supported by the 2010 GotoBLAS.

Additional supported CPUs

x86/x86-64

  • Intel Xeon 56xx (Westmere): Used GotoBLAS2 Nehalem codes.
  • Intel Sandy Bridge: Optimized Level-3 and Level-2 BLAS with AVX on x86-64.
  • Intel Haswell: Optimized Level-3 and Level-2 BLAS with AVX2 and FMA on x86-64.
  • Intel Skylake-X: Optimized Level-3 and Level-2 BLAS with AVX512 and FMA on x86-64.
  • Intel Cooper Lake: as Skylake-X with improved BFLOAT16 support.
  • AMD Bobcat: Used GotoBLAS2 Barcelona codes.
  • AMD Bulldozer: x86-64 ?GEMM FMA4 kernels. (Thanks to Werner Saar)
  • AMD PILEDRIVER: Uses Bulldozer codes with some optimizations.
  • AMD STEAMROLLER: Uses Bulldozer codes with some optimizations.
  • AMD ZEN: Uses Haswell codes with some optimizations for Zen 2/3 (use SkylakeX for Zen4)

MIPS32

  • MIPS 1004K: uses P5600 codes
  • MIPS 24K: uses P5600 codes

MIPS64

  • ICT Loongson 3A: Optimized Level-3 BLAS and the part of Level-1,2.
  • ICT Loongson 3B: Experimental

ARM

  • ARMv6: Optimized BLAS for vfpv2 and vfpv3-d16 (e.g. BCM2835, Cortex M0+)
  • ARMv7: Optimized BLAS for vfpv3-d32 (e.g. Cortex A8, A9 and A15)

ARM64

  • ARMv8: Basic ARMV8 with small caches, optimized Level-3 and Level-2 BLAS
  • Cortex-A53: same as ARMV8 (different cpu specifications)
  • Cortex-A55: same as ARMV8 (different cpu specifications)
  • Cortex A57: Optimized Level-3 and Level-2 functions
  • Cortex A72: same as A57 ( different cpu specifications)
  • Cortex A73: same as A57 (different cpu specifications)
  • Cortex A76: same as A57 (different cpu specifications)
  • Falkor: same as A57 (different cpu specifications)
  • ThunderX: Optimized some Level-1 functions
  • ThunderX2T99: Optimized Level-3 BLAS and parts of Levels 1 and 2
  • ThunderX3T110
  • TSV110: Optimized some Level-3 helper functions
  • EMAG 8180: preliminary support based on A57
  • Neoverse N1: (AWS Graviton2) preliminary support
  • Neoverse V1: (AWS Graviton3) optimized Level-3 BLAS
  • Apple Vortex: preliminary support based on ThunderX2/3
  • A64FX: preliminary support, optimized Level-3 BLAS
  • ARMV8SVE: any ARMV8 cpu with SVE extensions

PPC/PPC64

  • POWER8: Optimized BLAS, only for PPC64LE (Little Endian), only with USE_OPENMP=1

  • POWER9: Optimized Level-3 BLAS (real) and some Level-1,2. PPC64LE with OpenMP only.

  • POWER10: Optimized Level-3 BLAS including SBGEMM and some Level-1,2.

  • AIX: Dynamic architecture with OpenXL and OpenMP.

    make CC=ibm-clang_r FC=xlf_r TARGET=POWER7 BINARY=64 USE_OPENMP=1 INTERFACE64=1 DYNAMIC_ARCH=1 USE_THREAD=1

IBM zEnterprise System

  • Z13: Optimized Level-3 BLAS and Level-1,2
  • Z14: Optimized Level-3 BLAS and (single precision) Level-1,2

RISC-V

  • C910V: Optimized Level-3 BLAS (real) and Level-1,2 by RISC-V Vector extension 0.7.1.

    make HOSTCC=gcc TARGET=C910V CC=riscv64-unknown-linux-gnu-gcc FC=riscv64-unknown-linux-gnu-gfortran

    (also known to work on C906 as long as you use only single-precision functions - its instruction set support appears to be incomplete in double precision)

  • x280: Level-3 BLAS and Level-1,2 are optimized by RISC-V Vector extension 1.0.

    make HOSTCC=gcc TARGET=x280 NUM_THREADS=8 CC=riscv64-unknown-linux-gnu-clang FC=riscv64-unknown-linux-gnu-gfortran
  • ZVL???B: Level-3 BLAS and Level-1,2 including vectorised kernels targeting generic RISCV cores with vector support with registers of at least the corresponding width; ZVL128B and ZVL256B are available. e.g.:

      make TARGET=RISCV64_ZVL256B CFLAGS="-DTARGET=RISCV64_ZVL256B" \
      BINARY=64 ARCH=riscv64 CC='clang -target riscv64-unknown-linux-gnu' \
      AR=riscv64-unknown-linux-gnu-ar AS=riscv64-unknown-linux-gnu-gcc \
      LD=riscv64-unknown-linux-gnu-gcc FC=riscv64-unknown-linux-gnu-gfortran \
      HOSTCC=gcc HOSTFC=gfortran -j

Support for multiple targets in a single library

OpenBLAS can be built for multiple targets with runtime detection of the target cpu by specifiying DYNAMIC_ARCH=1 in Makefile.rule, on the gmake command line or as -DDYNAMIC_ARCH=TRUE in cmake.

For x86_64, the list of targets this activates contains Prescott, Core2, Nehalem, Barcelona, Sandybridge, Bulldozer, Piledriver, Steamroller, Excavator, Haswell, Zen, SkylakeX, Cooper Lake, Sapphire Rapids. For cpu generations not included in this list, the corresponding older model is used. If you also specify DYNAMIC_OLDER=1, specific support for Penryn, Dunnington, Opteron, Opteron/SSE3, Bobcat, Atom and Nano is added. Finally there is an option DYNAMIC_LIST that allows to specify an individual list of targets to include instead of the default.

DYNAMIC_ARCH is also supported on x86, where it translates to Katmai, Coppermine, Northwood, Prescott, Banias, Core2, Penryn, Dunnington, Nehalem, Athlon, Opteron, Opteron_SSE3, Barcelona, Bobcat, Atom and Nano.

On ARMV8, it enables support for CortexA53, CortexA57, CortexA72, CortexA73, Falkor, ThunderX, ThunderX2T99, TSV110 as well as generic ARMV8 cpus. If compiler support for SVE is available at build time, support for NeoverseN2, NeoverseV1 as well as generic ArmV8SVE targets is also enabled.

For POWER, the list encompasses POWER6, POWER8 and POWER9. POWER10 is additionally available if a sufficiently recent compiler is used for the build.

on ZARCH it comprises Z13 and Z14 as well as generic zarch support.

The TARGET option can be used in conjunction with DYNAMIC_ARCH=1 to specify which cpu model should be assumed for all the common code in the library, usually you will want to set this to the oldest model you expect to encounter. Please note that it is not possible to combine support for different architectures, so no combined 32 and 64 bit or x86_64 and arm64 in the same library.

Supported OS

Usage

Statically link with libopenblas.a or dynamically link with -lopenblas if OpenBLAS was compiled as a shared library.

Setting the number of threads using environment variables

Environment variables are used to specify a maximum number of threads. For example,

export OPENBLAS_NUM_THREADS=4
export GOTO_NUM_THREADS=4
export OMP_NUM_THREADS=4

The priorities are OPENBLAS_NUM_THREADS > GOTO_NUM_THREADS > OMP_NUM_THREADS.

If you compile this library with USE_OPENMP=1, you should set the OMP_NUM_THREADS environment variable; OpenBLAS ignores OPENBLAS_NUM_THREADS and GOTO_NUM_THREADS when compiled with USE_OPENMP=1.

Setting the number of threads at runtime

We provide the following functions to control the number of threads at runtime:

void goto_set_num_threads(int num_threads);
void openblas_set_num_threads(int num_threads);

Note that these are only used once at library initialization, and are not available for fine-tuning thread numbers in individual BLAS calls. If you compile this library with USE_OPENMP=1, you should use the above functions too.

Reporting bugs

Please submit an issue in https://github.com/xianyi/OpenBLAS/issues.

Contact

Change log

Please see Changelog.txt to view the differences between OpenBLAS and GotoBLAS2 1.13 BSD version.

Troubleshooting

  • Please read the FAQ first.
  • Please use GCC version 4.6 and above to compile Sandy Bridge AVX kernels on Linux/MinGW/BSD.
  • Please use Clang version 3.1 and above to compile the library on Sandy Bridge microarchitecture. Clang 3.0 will generate the wrong AVX binary code.
  • Please use GCC version 6 or LLVM version 6 and above to compile Skylake AVX512 kernels.
  • The number of CPUs/cores should be less than or equal to 256. On Linux x86_64 (amd64), there is experimental support for up to 1024 CPUs/cores and 128 numa nodes if you build the library with BIGNUMA=1.
  • OpenBLAS does not set processor affinity by default. On Linux, you can enable processor affinity by commenting out the line NO_AFFINITY=1 in Makefile.rule. However, note that this may cause a conflict with R parallel.
  • On Loongson 3A, make test may fail with a pthread_create error (EAGAIN). However, it will be okay when you run the same test case on the shell.

Contributing

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  2. Fork the OpenBLAS repository to start making your changes.
  3. Write a test which shows that the bug was fixed or that the feature works as expected.
  4. Send a pull request. Make sure to add yourself to CONTRIBUTORS.md.

Donation

Please read this wiki page.

openblas's People

Contributors

bartoldeman avatar binebrank avatar brada4 avatar chipkerchner avatar fenrus75 avatar guowangy avatar hpanderson avatar imzhuhl avatar isuruf avatar jakirkham avatar jeromerobert avatar kseniyazaytseva avatar maamountki avatar martin-frbg avatar mhillenbrand avatar mmuetzel avatar mousius avatar mseminatore avatar qiyu8 avatar quickwritereader avatar sva-img avatar thrasibule avatar tiborgy avatar wangqian avatar wernsaar avatar wjc404 avatar xianyi avatar xiweigu avatar xoviat avatar zchothia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openblas's Issues

Release OpenBLAS

I feel that it would be useful if the openblas team makes a release - version 3.0 or something. There are a number of open source projects that will find it much easier to work with a released version. A number of important issues with GotoBLAS have been fixed, and an openblas release will be generally useful.

SEGFAULT in test/zblat2 on IA32 with gcc 4.6

I get the following:

OPENBLAS_NUM_THREADS=1 ./zblat1
Complex BLAS Test Program Results

Test of subprogram number 1 ZDOTC
make[1]: *** [level1] Segmentation fault (core dumped)
make[1]: *** Waiting for unfinished jobs....
OPENBLAS_NUM_THREADS=1 ./dblat2 < ./dblat2.dat
OPENBLAS_NUM_THREADS=1 ./cblat2 < ./cblat2.dat
OPENBLAS_NUM_THREADS=1 ./zblat2 < ./zblat2.dat
/bin/sh: line 1: 32249 Segmentation fault (core dumped) OPENBLAS_NUM_THREADS=1 ./zblat2 < ./zblat2.dat
make[1]: *** [level2] Error 139
make[1]: Leaving directory `/home/public/download/OpenBLAS/test'
make: *** [tests] Error 2

When I build with DEBUG=1, the problem goes away.

This is my CPU:
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 37
model name : Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz
stepping : 2
cpu MHz : 3197.934
cache size : 4096 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: /build/src/gcc-4.6-20110429/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --disable-multilib --disable-libstdcxx-pch --enable-checking=release
Thread model: posix
gcc version 4.6.0 20110429 (prerelease) (GCC)

cblas.h header is unusable in its current state

I tried to compile a few packages against openblas and all of those which use the headers provided by the cblas implementation rather than their own internal headers have failed.
The problem is that blasint is not defined in cblas.h - it comes form common.h. However unless you design a package from scratch it is not a header you will usually look for when compiling against cblas.

So, some final cblas.h headers should be produced that include a definition for blasint.

Cross compilation issue with OpenMP

Hi,

I was trying to compile the OpenBLAS using openMP forced with USE_OPENMP = 1 in Makefile.rule
The compiler I am using is the mingw one. When the option is not switched on it compiles without any issue but when setting this on it stops when trying to compile the file blas_server_omp.c as it does not know the file sys/mman.h.
If you modify the Makefile to include the /usr/include for this particular file it goes further but hangs also with a conflict on another file (I can reproduce if needed).

I made the change in the Makefile:
ifeq ($(USE_OPENMP), 1)
BLAS_SERVER = blas_server_omp.c
else
ifeq ($(OSNAME), WINNT)
BLAS_SERVER = blas_server_win32.c
endif

To:
ifeq ($(USE_OPENMP), 1)
BLAS_SERVER = blas_server_omp.c
ifeq ($(OSNAME), WINNT)
BLAS_SERVER = blas_server_win32.c
endif
ifeq ($(OSNAME), CYGWIN_NT)
BLAS_SERVER = blas_server_win32.c
endif
else
ifeq ($(OSNAME), WINNT)
BLAS_SERVER = blas_server_win32.c
endif

This allows to compile in my case but I think it is not very accurate... If someone has an idea to be better?

rotmg result error

Testing codes:

include < stdio.h >

extern void drotmg_(double * d1, double * d2, double * x1, double * y1, double * param);

int main()
{
double d1= 0.21149573940783739;
double d2= 0.046892057172954082;
double x1= -0.42272687517106533;
double y1=0.42211309121921659;
double param[5];
int i=0;

    drotmg_(&d1, &d2, &x1, &y1, param);

    printf("d1=%lf,\td2=%lf,\tx1=%lf\n",d1,d2,x1);
    for(i=0;i<5;i++){

            printf("param[%d]=%lf\n",i,param[i]);
    }

    return 0;

}

Outputs of OpenBLAS/GotoBLAS:
d1=0.008490, d2=642414.742549, x1=2.331497
param[0]=-1.000000
param[1]=-4.516826
param[2]=-0.000244
param[3]=1.000000
param[4]=-0.000244

Outputs of reference BLAS and MKL
d1=0.173205, d2=0.038402, x1=-0.516180
param[0]=0.000000
param[1]=0.000000
param[2]=0.998548
param[3]=-0.221394
param[4]=0.000000

Building dynamic arch with interface64 failed on amd64

I want to compile a current git checkout of OpenBLAS with DYNAMIC_ARCH=1 and INTERFACE64= 1on amd64 (CentOS 5.5, GCC 4.5.1) and it throws the following error. For INTERACE64=0 it works fine. The case DYNAMIC_ARCH=0 and INTERFACE64=1 works too.

......
cp Makefile.conf Makefile.conf_last
cp config.h config_last.h
make -j 16 -C kernel commonlibs || exit 1
make[1]: Entering directory /root/install/OpenBLAS/kernel' gcc -c -O2 -DEXPRECISION -m128bit-long-double -fopenmp -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DSMP_SERVER -DUSE_OPENMP -DMAX_CPU_NUMBER=24 -DASMNAME=lsame -DASMFNAME=lsame_ -DNAME=lsame_ -DCNAME=lsame -DCHAR_NAME=\"lsame_\" -DCHAR_CNAME=\"lsame\" -DTS= -I.. -DF_INTERFACE ../kernel/x86_64/lsame.S -o lsame.o gcc -c -O2 -DEXPRECISION -m128bit-long-double -fopenmp -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DSMP_SERVER -DUSE_OPENMP -DMAX_CPU_NUMBER=24 -DASMNAME=scabs1 -DASMFNAME=scabs1_ -DNAME=scabs1_ -DCNAME=scabs1 -DCHAR_NAME=\"scabs1_\" -DCHAR_CNAME=\"scabs1\" -DTS= -I.. -DCOMPLEX -UDOUBLE -DF_INTERFACE ../kernel/x86_64/cabs.S -o scabs1.o gcc -c -O2 -DEXPRECISION -m128bit-long-double -fopenmp -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DSMP_SERVER -DUSE_OPENMP -DMAX_CPU_NUMBER=24 -DASMNAME=dcabs1 -DASMFNAME=dcabs1_ -DNAME=dcabs1_ -DCNAME=dcabs1 -DCHAR_NAME=\"dcabs1_\" -DCHAR_CNAME=\"dcabs1\" -DTS= -I.. -DCOMPLEX -DDOUBLE -DF_INTERFACE ../kernel/x86_64/cabs.S -o dcabs1.o gcc -c -O2 -DEXPRECISION -m128bit-long-double -fopenmp -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DSMP_SERVER -DUSE_OPENMP -DMAX_CPU_NUMBER=24 -DASMNAME=qconjg -DASMFNAME=qconjg_ -DNAME=qconjg_ -DCNAME=qconjg -DCHAR_NAME=\"qconjg_\" -DCHAR_CNAME=\"qconjg\" -DTS= -I.. -DCOMPLEX -DXDOUBLE -DF_INTERFACE ../kernel/x86_64/qconjg.S -o qconjg.o gcc -c -O2 -DEXPRECISION -m128bit-long-double -fopenmp -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DSMP_SERVER -DUSE_OPENMP -DMAX_CPU_NUMBER=24 -DASMNAME=qcabs1 -DASMFNAME=qcabs1_ -DNAME=qcabs1_ -DCNAME=qcabs1 -DCHAR_NAME=\"qcabs1_\" -DCHAR_CNAME=\"qcabs1\" -DTS= -I.. -DCOMPLEX -DXDOUBLE -DF_INTERFACE ../kernel/x86_64/cabs.S -o qcabs1.o ar -ru ../libopenblasp-r0.1alpha2.1.a lsame.o scabs1.o dcabs1.o qconjg.o qcabs1.o make[1]: Leaving directory/root/install/OpenBLAS/kernel'
for d in PRESCOTT CORE2 PENRYN DUNNINGTON NEHALEM OPTERON OPTERON_SSE3 BARCELONA ATOM NANO ;
do make -j 16 GOTOBLAS_MAKEFILE= -C kernel TARGET_CORE=$d kernel || exit 1 ;
done
make: invalid option -- D
make: invalid option -- U
make: invalid option -- E
make: invalid option -- 6
make: invalid option -- 4
Usage: make [options] [target] ...
Options:
-b, -m Ignored for compatibility.
-B, --always-make Unconditionally make all targets.
-C DIRECTORY, --directory=DIRECTORY
Change to DIRECTORY before doing anything.
-d Print lots of debugging information.
--debug[=FLAGS] Print various types of debugging information.
-e, --environment-overrides
Environment variables override makefiles.
-f FILE, --file=FILE, --makefile=FILE
Read FILE as a makefile.
-h, --help Print this message and exit.
-i, --ignore-errors Ignore errors from commands.
-I DIRECTORY, --include-dir=DIRECTORY
Search DIRECTORY for included makefiles.
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
-k, --keep-going Keep going when some targets can't be made.
-l [N], --load-average[=N], --max-load[=N]
Don't start multiple jobs unless load is below N.
-L, --check-symlink-times Use the latest mtime between symlinks and target.
-n, --just-print, --dry-run, --recon
Don't actually run any commands; just print them.
-o FILE, --old-file=FILE, --assume-old=FILE
Consider FILE to be very old and don't remake it.
-p, --print-data-base Print make's internal database.
-q, --question Run no commands; exit status says if up to date.
-r, --no-builtin-rules Disable the built-in implicit rules.
-R, --no-builtin-variables Disable the built-in variable settings.
-s, --silent, --quiet Don't echo commands.
-S, --no-keep-going, --stop
Turns off -k.
-t, --touch Touch targets instead of remaking them.
-v, --version Print the version number of make and exit.
-w, --print-directory Print the current directory.
--no-print-directory Turn off -w, even if it was turned on implicitly.
-W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
Consider FILE to be infinitely new.
--warn-undefined-variables Warn when an undefined variable is referenced.

This program built for x86_64-redhat-linux-gnu
Report bugs to [email protected]
make[1]: Entering directory /root/install/OpenBLAS/kernel' ../Makefile.system:47: ../Makefile_kernel.conf: No such file or directory make[1]: *** No rule to make target../Makefile_kernel.conf'. Stop.
make[1]: Leaving directory `/root/install/OpenBLAS/kernel'
make: *** [libs] Error 1

My Makefile.rule contains the following:VERSION = 0.1alpha2.1

DYNAMIC_ARCH = 1
CC = gcc
FC = gfortran
BINARY=64
USE_OPENMP = 1
NUM_THREADS = 24
INTERFACE64 = 1
ifeq ($(DEBUG), 1)
COMMON_OPT += -g
else
COMMON_OPT += -O2
endif
COMMON_PROF = -pg

I realized this error a few weeks ago but I do not care about it, but now I need a working version.

Shared library placement on Mac OS X

The build process on OS X puts the shared library in exports, rather than in the top level directory. libgoto2.dylib also links to a non-existent file as a result. The following target in exports/Makefile needs to be fixed:

Current:

$(LIBDYNNAME) : ../$(LIBNAME) osx.def
$(PREFIX)gcc $(CFLAGS) -all_load -dynamiclib -o $(LIBDYNNAME) $&lt; -Wl,-exported_symbols_list,osx.def $(FE
XTRALIB)

Proposed fix:

$(LIBDYNNAME) : ../$(LIBNAME) osx.def
$(PREFIX)gcc $(CFLAGS) -all_load -dynamiclib -o ../$(LIBDYNNAME) $&lt; -Wl,-exported_symbols_list,osx.def $(FE
XTRALIB)

Implicit declaration of sched_yield warnings

This is just cosmetic, but when building with USE_THREAD=0, every function reports the following warning.

In file included from ../common.h:326,
from generic/ztrsm_uncopy_2.c:40:
../common_x86_64.h: In function ‘blas_lock’:
../common_x86_64.h:62: warning: implicit declaration of function ‘sched_yield’

Performance of dcopy()

I notice that the performance of DCOPY for copying large vectors with stride 1 (size 1000000) is considerably slower than that of memcpy. Is this a known issue?

x86 blanch build fails because a link order

Thank José Luis García Pallero for reporting the bug.
The reporting email is:

Hello,
I'm trying to compile the git version of x86 branch of OpenBLAS in an
intel xeon x5550 machine. The compiler is the last gcc 4.6.0 version
building by me. Apparently, the compilation process is OK and the
testing step works file (I'm compiling with NO_LAPACK=1), but in the
next step this order fails:

gcc -O2 -DEXPRECISION -m128bit-long-double -Wall -m64
-DF_INTERFACE_GFORT -fPIC -DSMP_SERVER -DMAX_CPU_NUMBER=8 -DASMNAME=
-DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME="_" -DCHAR_CNAME=""
-I.. -w -o linktest linktest.c ../libopenblas_nehalemp-r0.1alpha2.so
-L/opt/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.0
-L/opt/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64 -L/opt/mpc/lib -L/opt/mpfr/lib
-L/opt/gmp/lib -L.
-L/opt/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../.. -l -l
-lgfortran -lm -lquadmath -lm -lc && echo OK.
/usr/bin/ld: cannot find -l-l
collect2: ld devolvió el estado de salida 1
make[1]: *** [../libopenblas_nehalemp-r0.1alpha2.so] Error 1

I see the error "/usr/bin/ld: cannot find -l-l" and in the last part
of the gcc invocation you can see "-l -l -lgfortran -lm -lquadmath -lm
-lc". Are corrects the arguments "-l -l"?

Apparently, the error is in the shared library building. If I run the
compilation process, some steps works fine:

make libs: OK
make tests: OK
make shared: The error appears

Thanks


José Luis García Pallero

drmm error on Loongson3A

It failed on tests when you run "make tests".

DTRMM PASSED THE TESTS OF ERROR-EXITS

******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HALF ACCURATE *******
EXPECTED RESULT COMPUTED RESULT
1 -0.462537 -0.172827
2 0.466533 -0.412587
3 0.426573 0.169830E-01
4 0.456543 0.146853
5 0.186813 0.186813
6 -0.382617 -0.382617
7 -0.252747 -0.252747
THESE ARE THE RESULTS FOR COLUMN 3
******* DTRMM FAILED ON CALL NUMBER:
1988: DTRMM ('R','U','T','U', 7, 3, 1.0, A, 4, B, 8) .

Fail to build linux ia64, powerpc and sparc

Building with /usr/bin/make NO_LAPACK=1 DYNAMIC_ARCH=1;
It fails at the end of the build:
gcc -O2 -Wall -m32 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DNO_LAPACK -DSMP_SERVER -DMAX_CPU_NUMBER=2 -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME="_" -DCHAR_CNAME="" -DNO_AFFINITY -I.. -w -o linktest linktest.c ../libopenblasp-r0.1alpha2.2.so -L/lib/powerpc-linux-gnu -L/usr/lib/powerpc-linux-gnu -L/usr/lib/powerpc-linux-gnu/gcc/powerpc-linux-gnu/4.6.1 -L/usr/lib/powerpc-linux-gnu/gcc/powerpc-linux-gnu/4.6.1/../../.. -lgfortran -lm -lm -lc && echo OK.
../libopenblasp-r0.1alpha2.2.so: undefined reference to gotoblas_ATOM' ../libopenblasp-r0.1alpha2.2.so: undefined reference togotoblas_PRESCOTT'
../libopenblasp-r0.1alpha2.2.so: undefined reference to gotoblas_NEHALEM' ../libopenblasp-r0.1alpha2.2.so: undefined reference togotoblas_PENRYN'
../libopenblasp-r0.1alpha2.2.so: undefined reference to gotoblas_OPTERON' ../libopenblasp-r0.1alpha2.2.so: undefined reference togotoblas_NANO'
../libopenblasp-r0.1alpha2.2.so: undefined reference to gotoblas_CORE2' ../libopenblasp-r0.1alpha2.2.so: undefined reference togotoblas_OPTERON_SSE3'
../libopenblasp-r0.1alpha2.2.so: undefined reference to gotoblas_BARCELONA' ../libopenblasp-r0.1alpha2.2.so: undefined reference togotoblas_DUNNINGTON'
../libopenblasp-r0.1alpha2.2.so: undefined reference to `cpuid'
collect2: ld returned 1 exit status
make[2]: *** [../libopenblasp-r0.1alpha2.2.so] Error 1
make[1]: *** [shared] Error 2

Build logs:
https://buildd.debian.org/status/fetch.php?pkg=openblas&arch=powerpc&ver=0.1alpha2.2-1&stamp=1311606749
https://buildd.debian.org/status/fetch.php?pkg=openblas&arch=sparc&ver=0.1alpha2.2-1&stamp=1311588064
https://buildd.debian.org/status/fetch.php?pkg=openblas&arch=ia64&ver=0.1alpha2.2-1&stamp=1311587788

Support BLAS-like extensions

BLAS-like extensions,
e.g. mkl_?imatcopy and mkl_?omatcopy in Intel MKL

These functions support copy and transpose matrix.

Please provide an error message when the arch is not supported

For now, if the arch is not supported, the error message is:
/tmp/ccN4DEc6.o: In function main': getarch.c:(.text+0x7c): undefined reference toget_libname'
getarch.c:(.text+0xbc): undefined reference to `get_cpuconfig'
collect2: ld returned 1 exit status

it would be better to fail the build in the makefile with a message like:
"Could not find cpuid_xxxx.c"

thanks

Pathscale compilation

Hello,

I tried to compile OpenBLAS with the latest version of pathscale (available there: https://github.com/path64/compiler)

The compilation instruction is: make -j 1 AR=ar RANLIB=ranlib CC=pathCC FC=pathf90 BINARY=64 USE_THREAD=1 TARGET=NEHALEM

Here is the error log:
for d in interface driver/level2 driver/level3 driver/others kernel lapack ;
do if test -d $d; then
make -j 4 -C $d libs || exit 1 ;
fi;
done
make[1]: Entering directory /home/User/svn/Green/Simulateur/Versions/V1.5/Sources/Libs/OpenBLAS/interface' make[1]: warning: -jN forced in submake: disabling jobserver mode. pathCC -O2 -m64 -DF_INTERFACE_PATHSCALE -fPIC -DSMP_SERVER -DMAX_CPU_NUMBER=24 -DASMNAME=_saxpy -DASMFNAME=_saxpy_ -DNAME=saxpy_ -DCNAME=saxpy -DCHAR_NAME=\"saxpy_\" -DCHAR_CNAME=\"saxpy\" -I.. -I. -UDOUBLE -UCOMPLEX -c axpy.c -o saxpy.o pathCC -O2 -m64 -DF_INTERFACE_PATHSCALE -fPIC -DSMP_SERVER -DMAX_CPU_NUMBER=24 -DASMNAME=_sswap -DASMFNAME=_sswap_ -DNAME=sswap_ -DCNAME=sswap -DCHAR_NAME=\"sswap_\" -DCHAR_CNAME=\"sswap\" -I.. -I. -UDOUBLE -UCOMPLEX -c swap.c -o sswap.o pathCC -O2 -m64 -DF_INTERFACE_PATHSCALE -fPIC -DSMP_SERVER -DMAX_CPU_NUMBER=24 -DASMNAME=_scopy -DASMFNAME=_scopy_ -DNAME=scopy_ -DCNAME=scopy -DCHAR_NAME=\"scopy_\" -DCHAR_CNAME=\"scopy\" -I.. -I. -UDOUBLE -UCOMPLEX -c copy.c -o scopy.o pathCC -O2 -m64 -DF_INTERFACE_PATHSCALE -fPIC -DSMP_SERVER -DMAX_CPU_NUMBER=24 -DASMNAME=_sscal -DASMFNAME=_sscal_ -DNAME=sscal_ -DCNAME=sscal -DCHAR_NAME=\"sscal_\" -DCHAR_CNAME=\"sscal\" -I.. -I. -UDOUBLE -UCOMPLEX -c scal.c -o sscal.o swap.c: In function 'void sswap_(blasint*, float*, blasint*, float*, blasint*)': swap.c:104: error: invalid conversion from 'void*' to 'int (*)()' swap.c:104: error: initializing argument 12 of 'int blas_level1_thread(int, BLASLONG, BLASLONG, BLASLONG, void*, void*, BLASLONG, void*, BLASLONG, void*, BLASLONG, int (*)(), int)' scal.c: In function 'void sscal_(blasint*, float*, float*, blasint*)': scal.c:101: error: invalid conversion from 'void*' to 'int (*)()' scal.c:101: error: initializing argument 12 of 'int blas_level1_thread(int, BLASLONG, BLASLONG, BLASLONG, void*, void*, BLASLONG, void*, BLASLONG, void*, BLASLONG, int (*)(), int)' make[1]: *** [sswap.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [sscal.o] Error 1 axpy.c: In function 'void saxpy_(blasint*, float*, float*, blasint*, float*, blasint*)': axpy.c:106: error: invalid conversion from 'void*' to 'int (*)()' axpy.c:106: error: initializing argument 12 of 'int blas_level1_thread(int, BLASLONG, BLASLONG, BLASLONG, void*, void*, BLASLONG, void*, BLASLONG, void*, BLASLONG, int (*)(), int)' make[1]: *** [saxpy.o] Error 1 make[1]: Leaving directory/home/User/svn/Green/Simulateur/Versions/V1.5/Sources/Libs/OpenBLAS/interface'
make: *** [libs] Error 1

Thanks for help,
Fabien

ZDOTU: BLAS TEST failed on x86 32bits

Outputs:
Test of subprogram number 2 ZDOTU
FAIL

CASE N INCX INCY MODE I COMP(I) TRUE(I) DIFFERENCE SIZE(I)

2  1    1    1 9999  1                     -0.48000000D+00                     -0.60000000D-01 -0.4200D+00  0.9000D+00
2  1    1    1 9999  2                      0.00000000D+00                     -0.90000000D+00  0.9000D+00  0.9000D+00

Platform:
Intel Core 2 Q8400
Ubuntu 10.04 32bits

zdotc: BLAS TEST failed on x86 32bits

Outputs:
Test of subprogram number 1 ZDOTC
FAIL

CASE N INCX INCY MODE I COMP(I) TRUE(I) DIFFERENCE SIZE(I)

1  1    1    1 9999  1                      0.48000000D+00                      0.90000000D+00 -0.4200D+00  0.9000D+00
1  1    1    1 9999  2                      0.00000000D+00                      0.60000000D-01 -0.6000D-01  0.9000D+00

Platform:
Intel Core 2 Q8400
Ubuntu 10.04 32bits

Add an install target in makefile

After building, the library is in the top soruce dir. The user wants typing "make install" to install the library.
We should add an install target in makefile.

make shared NO_LAPACK=1 DYNAMIC_ARCH=1 is failing

With the command:
make shared NO_LAPACK=1 DYNAMIC_ARCH=1
openblas fails to build with:

gcc -O2 -DEXPRECISION -m128bit-long-double -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DSMP_SERVER -DMAX_CPU_NUMBER=8 -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME="_" -DCHAR_CNAME="" -I.. -w -o linktest linktest.c ../libopenblasp-r0.1alpha1.so -L/usr/lib/gcc/x86_64-linux-gnu/4.5.2 -L/usr/lib/gcc/x86_64-linux-gnu/4.5.2/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.5.2/../../.. -L/usr/lib/x86_64-linux-gnu -lgfortran -lm -lgfortran -lm -lc && echo OK.
../libopenblasp-r0.1alpha1.so: undefined reference to dneg_tcopy_OPTERON_SSE3' ../libopenblasp-r0.1alpha1.so: undefined reference todneg_tcopy_ATOM'
../libopenblasp-r0.1alpha1.so: undefined reference to xneg_tcopy_NANO' ../libopenblasp-r0.1alpha1.so: undefined reference toqlaswp_ncopy_OPTERON_SSE3'
../libopenblasp-r0.1alpha1.so: undefined reference to xlaswp_ncopy_ATOM' ../libopenblasp-r0.1alpha1.so: undefined reference toxlaswp_ncopy_OPTERON'
../libopenblasp-r0.1alpha1.so: undefined reference to claswp_ncopy_BARCELONA' ../libopenblasp-r0.1alpha1.so: undefined reference toclaswp_ncopy_PENRYN'
../libopenblasp-r0.1alpha1.so: undefined reference to zneg_tcopy_NEHALEM' ../libopenblasp-r0.1alpha1.so: undefined reference toslaswp_ncopy_OPTERON'
../libopenblasp-r0.1alpha1.so: undefined reference to qneg_tcopy_NEHALEM' ../libopenblasp-r0.1alpha1.so: undefined reference tocneg_tcopy_DUNNINGTON'
../libopenblasp-r0.1alpha1.so: undefined reference to xlaswp_ncopy_BARCELONA' ../libopenblasp-r0.1alpha1.so: undefined reference toqlaswp_ncopy_DUNNINGTON'
../libopenblasp-r0.1alpha1.so: undefined reference to xlaswp_ncopy_NANO' ../libopenblasp-r0.1alpha1.so: undefined reference tosneg_tcopy_PRESCOTT'
../libopenblasp-r0.1alpha1.so: undefined reference to zlaswp_ncopy_NEHALEM' ../libopenblasp-r0.1alpha1.so: undefined reference toclaswp_ncopy_OPTERON_SSE3'
../libopenblasp-r0.1alpha1.so: undefined reference to `slaswp_ncopy_NANO'

in the exports directory

make NO_LAPACK=1 DYNAMIC_ARCH=1
fails also here:

make[1]: Entering directory /home/sylvestre/dev/debian/debian-science/packages/openblas/build-area/plop/xianyi-OpenBLAS-72cb641/test' [...] gfortran -O2 -m128bit-long-double -Wall -m64 -o zblat2 zblat2.o ../libopenblasp-r0.1alpha1.a -lm -lpthread -lm -lpthread ../libopenblasp-r0.1alpha1.a(setparam_PRESCOTT.o):(.data.rel+0x268): undefined reference tosneg_tcopy_PRESCOTT'
../libopenblasp-r0.1alpha1.a(setparam_PRESCOTT.o):(.data.rel+0x270): undefined reference to slaswp_ncopy_PRESCOTT' ../libopenblasp-r0.1alpha1.a(setparam_PRESCOTT.o):(.data.rel+0x4c8): undefined reference todneg_tcopy_PRESCOTT'
../libopenblasp-r0.1alpha1.a(setparam_PRESCOTT.o):(.data.rel+0x4d0): undefined reference to `dlaswp_ncopy_PRESCOTT'
[...]

Provide a matrix transpose operation

It would be greatly beneficial if openblas could provide a user callable fast matrix transpose operation as part of the library. I am sure this capability exists internally.

Openblas fails to build under amd64

make DYNAMIC_ARCH=1 NO_LAPACK=1 fails


gcc -c -O2 -Wall -m64 -DF_INTERFACE_G77 -fPIC -DDYNAMIC_ARCH -DNO_LAPACK -DSMP_SERVER -DMAX_CPU_NUMBER=2 -DASMNAME=strmv_NUN -DASMFNAME=strmv_NUN_ -DNAME=strmv_NUN_ -DCNAME=strmv_NUN -DCHAR_NAME="strmv_NUN_" -DCHAR_CNAME="strmv_NUN" -I../.. -UDOUBLE -UCOMPLEX -UCOMPLEX -UDOUBLE -UTRANSA -UUNIT trmv_U.c -o strmv_NUN.o
trmv_U.c: In function 'strmv_NUU':
trmv_U.c:57:30: error: 'DTB_ENTRIES' undeclared (first use in this function)
trmv_U.c:57:30: note: each undeclared identifier is reported only once for each function it appears in

make[2]: *** [strmv_NUU.o] Error 1

Full log:
https://buildd.debian.org/status/fetch.php?pkg=openblas&arch=amd64&ver=0.1alpha2-1&stamp=1308832805

sgemm.o error

Folks:

I'm excited to use the new OpenBLAS, but I'm getting the same errors on both OpenBLAS and GotoBLAS2 1.13. I'm assuming I'm missing a dependency, any idea what it might be?


gcc -c -O2 -DEXPRECISION -m128bit-long-double -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DSMP_SERVER -DMAX_CPU_NUMBER= -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME="sgemm_" -DCHAR_CNAME="sgemm" -I.. -I. -UDOUBLE -UCOMPLEX gemm.c -o sgemm.o
gemm.c: In function ‘sgemm_’:
gemm.c:392: error: ‘GEMM_DEFAULT_OFFSET_A’ undeclared (first use in this function)
gemm.c:392: error: (Each undeclared identifier is reported only once
gemm.c:392: error: for each function it appears in.)
gemm.c:393: error: ‘SGEMM_DEFAULT_P’ undeclared (first use in this function)
gemm.c:393: error: ‘SGEMM_DEFAULT_Q’ undeclared (first use in this function)
gemm.c:393: error: ‘GEMM_DEFAULT_ALIGN’ undeclared (first use in this function)
gemm.c:393: error: ‘GEMM_DEFAULT_OFFSET_B’ undeclared (first use in this function)
make[1]: *** [sgemm.o] Error 1

calling cblas from C++ code

When using the cblas interface from C++ code, I get a bunch of 'undefined reference' errors at runtime when calling any of the cblas_* functions. To fix this, the cblas.h header file must be changed like this:

  • at the top, just after "#define CBLAS_H", add these lines:

    ifdef __cplusplus

    extern "C" { /* Assume C declarations for C++ */

    endif /* __cplusplus */

  • at the bottom, just before the "#endif", add:

    ifdef __cplusplus

    }

    endif /* __cplusplus */

Cheers,

Tasio

SEGFAULT of multi-threads dgemm on 8-ways Intel X7550

CPU: 8-ways Intel X7550
Ubuntu 10.10 Server amd64 (Linux 2.6.35)

call stack:
(gdb) bt
#0 0x0000000000403ce5 in blas_quickdivide (x=4294967295, y=4294967295) at ../../common_x86_64.h:158
#1 0x0000000000404c42 in gemm_driver (args=0x7ffff045cc40, range_m=0x0, range_n=0x0, sa=0x7f35c5235020, sb=0x7f35c5331020, mypos=0) at level3_thread.c:586
#2 0x0000000000405211 in dgemm_thread_nn (args=0x7ffff045cc40, range_m=0x0, range_n=0x0, sa=0x7f35c5235020, sb=0x7f35c5331020, mypos=0) at level3_thread.c:\

705
#3 0x0000000000402136 in dgemm_ (TRANSA=0x7ffff045cdbf "Nh˚\307\065\177", TRANSB=0x7ffff045cdbe "NNh˚\307\065\177", M=0x7ffff045cdb8, N=0x7ffff045cdb4, K=0\

x7ffff045cdb0, alpha=0x7ffff045cda8, a=0x7f35c33b0010, ldA=0x7ffff045cdb8, b=0x7f35c152b010, ldB=0x7ffff045cdb0, beta=0x7ffff045cda0, c=0x7f35bf6a6010, ldC=
0x7ffff045cdb8) at gemm.c:425

Prepare to release v0.1 alpha2

I have done the features in 0.1 alpha2. Now, we plans to release it.

To-do list:

  1. a new branch release-v0.1alpha2
  2. merge the codes from loongson3a branch and develop branch
  3. Test and fix the bugs.

Xianyi

dsdot error on x86_64

The test codes:
float x= 0.172555164;
float y= -0.0138700781;
int incx=1;
int incy=1;
int n=1;

double res1=0.0;
res1=dsdot_(&n, &x, &incx, &y, &incy);

The expect result is -2.393354e-03.
However, I got -5.966211e-24.

The result is wrong in rot, when INCX and INCY equal to 0.

José Luis García Pallero reported it on GotoBLAS mailing list.
The test code:

include<stdio.h>

//#include<common.h>
//#include<cblas.h>
void drot_(int_,double_,int_,double_,int_,double_,double*);

int main()
{

int N=4,incX=0,incY=0;

double c=0.25,s=0.5;

double x1[]={1.0,3.0,5.0,7.0};

double y1[]={2.0,4.0,6.0,8.0};

double x2=-0.21484375,y2=0.0390625;

drot_(&N,x1,&incX,y1,&incY,&c,&s);

printf("Results GOTO...: %11.8lf %11.8lf\n",x1[0],y1[0]);

printf("Correct results: %11.8lf %11.8lf\n",x2,y2);

return 0;

}

ZHERK and CHERK BLAS test error on Loongson3a

make BINARY=64 NO_LAPACK=1

CHERK
******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HALF ACCURATE *******
EXPECTED RESULT COMPUTED RESULT
1 ( 0.269730E-01, 0.00000 ) ( 0.269730E-01, -0.100000E+11)
2 ( 0.569431E-01, -0.148851 ) ( 0.569431E-01, -0.148851 )
THESE ARE THE RESULTS FOR COLUMN 1
******* CHERK FAILED ON CALL NUMBER:
479: CHERK ('L','N', 2, 1, 0.0, A, 3, 1.0, C, 3)

ZHERK
******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HALF ACCURATE *******
EXPECTED RESULT COMPUTED RESULT
1 ( 0.269730E-01, 0.00000 ) ( 0.269730E-01, -0.100000E+11)
2 ( 0.569431E-01, -0.148851 ) ( 0.569431E-01, -0.148851 )
THESE ARE THE RESULTS FOR COLUMN 1
******* ZHERK FAILED ON CALL NUMBER:
479: ZHERK ('L','N', 2, 1, 0.0, A, 3, 1.0, C, 3)

strmm error on loongson3a

It failed on tests when you run "make tests".

******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HALF ACCURATE *******
EXPECTED RESULT COMPUTED RESULT
1 0.554950E-01 0.529301E-01
THESE ARE THE RESULTS FOR COLUMN 2
******* STRMM FAILED ON CALL NUMBER:
614: STRMM ('R','U','N','U', 1, 2, 1.0, A, 3, B, 2)

Ztrmm fails on Nehalem

This is a report of an issue I reported with GotoBLAS some time ago - but unfortunately just after Kasishige left.

GotoBLAS gave wrong results (result arrays filled with zeroes) for a ztrmm call specificall and only on
Nehalem processors using the Nehalem-specific versions. Versions compiled for Penryn give correct results
on Nehalem. I see nothing in the bug or fix reports to suggest that this has been fixed yet in OpenBLAS.

----------original message-------------------------------------------------
I have just succeeded in tracking down the cause of a failure of our
electronic structure code CASTEP on some new Nehalem processors. It
seems that the Nehalem-specific ZTRMM code contains a bug.

With GotoBLAS 2.13 compiled with FC=ifort USE_THREAD=0 DYNAMIC_ARCH=1

the attached test case (same executable) has the following behaviour

a) On AMD Opteron - success
b) On Intel Core 2 Q6600 - success
c) On Intel Nehalem E5530 - Fails

The (attached) output file shows that the result is filled with zeros
outside the (252x5) leading block.

-----------------------Testcase------------------------------------------------------
Hmm. I can not find a mechanism to attach the testcase in Github. It can be picked up from

ftp://ftp.nd.rl.ac.uk:/scratch/KeithRefson/ztrmm-nehalem-fail.tgz

unpredictable behavior of SWAP with incX==0 and/or incY==0

OpenBLAS has problems with incX==0 and/or incY==0 for DSWAP and DAXPY (I don't know for SSWAP, SAXPY, and complex functions). But for DSWAP and DAXPY the erroneous behavior is random: sometimes runs as refblas and sometimes runs wrong.
platform: x86/x86 64bit
Reported by José Luis García Pallero

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.