What is the correct way to run compile and benchmarks from benchmark folder?

30 views
Skip to first unread message

Norbert X

unread,
Feb 23, 2021, 9:49:19 AM2/23/21
to OpenBLAS-users
Hello!

My CPU is Intel i7-3537u. 
I'm using Ubuntu 20.04 LTS, it ships OpenBLAS 0.3.8 < https://packages.ubuntu.com/source/focal/openblas >.
To compare performance of pthread, openmp and serial variants I want to run benchmarks from benchmark folder.
I can't find any documentation about this moment.

As I'm using Ubuntu - I started with packages from Ubuntu's repositories:

sudo apt-get build-dep openblas
cd ~/Downloads
apt-get source --build openblas



This build succeeds, deb-packages are produced. So I think that build-environment is configured correctly.

Then I try to compile benchmarks:

cd
openblas-0.3.8+ds/benchmarks
make

and make command fails with the following message:

$ make cc -O2 -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=4 -DMAX_PARALLEL_NUMBER=1 -DVERSION=\"0.3.8\" -DASMNAME=sgemm -DASMFNAME=sgemm_ -DNAME=sgemm_ -DCNAME=sgemm -DCHAR_NAME=\"sgemm_\" -DCHAR_CNAME=\"sgemm\" -DNO_AFFINITY -I.. -c -UCOMPLEX -UDOUBLE -o sgemm.o gemm.c
make: *** No rule to make target '../libopenblas_sandybridgep-r0.3.8.a', needed by 'sgemm.goto'. Stop.


Instead of apt-get source --build openblas
I tried also

DEB_CFLAGS_SET="-march=native -mtune=native" dpkg-buildpackage -uc -us -j8

without success.


What am I doing wrong?
Where can I find the mentioned libopenblas_sandybridgep-r0.3.8.a file? Why do I not have it compiled?
What is correct way to launch benchmarks from benchmark folder?

Prentice Bisbal

unread,
Feb 23, 2021, 4:08:06 PM2/23/21
to openbla...@googlegroups.com

The benchmarks are part of the source code, so they're expecting ALL  of OpenBLAS to be built and installed according to the configuration specified in the Makefiles. Since you're only trying to build the benchmarks, the rest of OpenBLAS hasn't been built and the resulting libraries aren't where the benchmarks' Makefile  are expecting them to be.

Specifically, the Makefile specifies that the object file  that it's trying to build, sgemm.o,  depends on the library libopenblas_sandybridgep-r0.3.8.a, which it expects to exist in the parent directory of benchmarks.

In short, the benchmarks aren't really meant to be built and used this way. If you go to the parent directory and do a 'make' there, it will build the library that's missing, but then the benchmarks will be testing the version of OpenBLAS you just built, and not the version installed by Ubuntu as a .deb package

You could fix this if you know how to read and edit Makefiles, which I'm assuming you don't know how to do. Instead, I would see if Ubuntu provides the benchmarks as a separate .deb package.

Prentice

--
You received this message because you are subscribed to the Google Groups "OpenBLAS-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openblas-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openblas-users/005aa7c9-6580-4054-9099-39413b079f33n%40googlegroups.com.

  
Reply all
Reply to author
Forward
0 new messages