Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#28104 closed defect (fixed)

Openblas build failure

Reported by: vbraun Owned by:
Priority: major Milestone: sage-9.0
Component: packages: standard Keywords:
Cc: jpflori Merged in:
Authors: Volker Braun Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: c2f75ca (Commits, GitHub, GitLab) Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by vbraun)

On some arch openblas fails to select a sgemm kernel implementation:

gcc -O2 -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DNO_AVX512 -DNO_WARMUP -DMAX_CPU_NUMBER=1 -DMAX_PARALLEL_NUMBER=1 -DUSE_TLS -DVERSION=\"0.3.6\" -DASMNAME=sgemm_kernel -DASMFNAME=sgemm_kernel_ -DNAME=sgemm_kernel_ -DCNAME=sgemm_kernel -DCHAR_NAME=\"sgemm_kernel_\" -DCHAR_CNAME=\"sgemm_kernel\" -DNO_AFFINITY -I.. -UDOUBLE  -UCOMPLEX -c -UDOUBLE -UCOMPLEX ../kernel/x86_64/ -o sgemm_kernel.o
gcc: warning: ../kernel/x86_64/: linker input file unused because linking not done

Should have been ../kernel/x86_64/<implementation>.c

Upstream bug report: https://github.com/xianyi/OpenBLAS/issues/2176

This ticket fixes a secondary issue, namely we already build openblas with TARGET=ATOM as a fallback if autodetection fails. But building a different configuration on a dirty build dir is not supported, and can lead to linking errors

/usr/bin/ld: ../libopenblas_atom-r0.3.6.a(ssymv_U.o): relocation R_X86_64_32S against undefined symbol `PREFETCHSIZE' can not be used when 
making a shared object; recompile with -fPIC

where build artifacts are mixed. We should run "make clean" first.

Attachments (5)

config.h (681 bytes) - added by pipedream 2 years ago.
config.2.h (681 bytes) - added by pipedream 2 years ago.
Makefile.conf (1.4 KB) - added by pipedream 2 years ago.
Makefile.conf_last (1.4 KB) - added by pipedream 2 years ago.
openblas-0.3.6.p0.log (4.7 MB) - added by zimmerma 2 years ago.

Change History (23)

comment:1 Changed 2 years ago by vbraun

  • Description modified (diff)

comment:2 Changed 2 years ago by pipedream

This is on a kvm-qemu virtual machine with CPU set to "Hypervisor default"

0 root@muizenberg:~#grep odel /proc/cpuinfo

model : 6

model name : QEMU Virtual CPU version 2.5+

Last edited 2 years ago by pipedream (previous) (diff)

comment:3 Changed 2 years ago by vbraun

Can you also add your Makefile.conf and config.h from the openblas build directory?

comment:4 Changed 2 years ago by pipedream

Am I looking in the right place?

/srv/sage-8.8/build/pkgs/openblas#find
.
./spkg-install
./patches
./patches/openblas-0.2.19-SMP_conditional.patch
./SPKG.txt
./package-version.txt
./checksums.ini
./type
./dependencies
./spkg-check
./write_pc_file.py
Last edited 2 years ago by pipedream (previous) (diff)

comment:5 Changed 2 years ago by vbraun

Run ./sage -p -s openblas and then look into the build directory..

Changed 2 years ago by pipedream

Changed 2 years ago by pipedream

Changed 2 years ago by pipedream

comment:6 Changed 2 years ago by vbraun

We build with TARGET=ATOM after the first attempt fails, I think the relevant file would be Makefile.conf_last. Can you upload that too?

Changed 2 years ago by pipedream

comment:7 Changed 2 years ago by vbraun

No thats not it...

comment:8 Changed 2 years ago by vbraun

  • Branch set to u/vbraun/openblas_build_failure

comment:9 Changed 2 years ago by vbraun

  • Authors set to Volker Braun
  • Commit set to c2f75ca37a719e8b0453e3a2af27fd0f2eacafae
  • Description modified (diff)
  • Status changed from new to needs_review

This ticket fixes the TARGET=ATOM fallback build configuraion


New commits:

c2f75caRun "make clean" after failed openblas build

comment:10 Changed 2 years ago by vbraun

  • Description modified (diff)

comment:11 Changed 2 years ago by vbraun

  • Description modified (diff)

Changed 2 years ago by zimmerma

comment:12 Changed 2 years ago by zimmerma

on my machine (Debian bullseye/sid) I have another build failure with openblas (see attached file openblas-0.3.6.p0.log). The failure is /usr/bin/ld: cannot find -l4. Should I open a new ticket? This is with Sage 8.9.

comment:13 Changed 2 years ago by vbraun

  • Cc jpflori added

Depends on whether this ticket fixes it, I'd say.

Somebody please press the positive review button here so we can merge this no-brainer

comment:14 Changed 2 years ago by chapoton

  • Reviewers set to Frédéric Chapoton
  • Status changed from needs_review to positive_review

comment:15 Changed 2 years ago by chapoton

  • Milestone changed from sage-8.9 to sage-9.0

comment:16 Changed 2 years ago by vbraun

  • Branch changed from u/vbraun/openblas_build_failure to c2f75ca37a719e8b0453e3a2af27fd0f2eacafae
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:17 Changed 2 years ago by zimmerma

  • Commit c2f75ca37a719e8b0453e3a2af27fd0f2eacafae deleted

Depends on whether this ticket fixes it, I'd say.

no it doesn't. I'll open a new ticket.

comment:18 Changed 2 years ago by zimmerma

the new ticket is #28768

Note: See TracTickets for help on using tickets.