OpenBLAS icon indicating copy to clipboard operation
OpenBLAS copied to clipboard

Compilation Error on Sapphire Rapids: Possible Parallel Build Conflict

Open sandlbn opened this issue 1 year ago • 3 comments

I'm encountering a compilation issue with OpenBLAS on the Sapphire Rapids platform, using the latest code from the develop branch. My compilation command is:

make CC=gcc FC=gfortran BINARY=64 USE_OPENMP=1 USE_THREAD=1

While the initial part of the build succeeds, I encounter the following error subsequently. It appears potentially related to Issue #2973 on OpenBLAS's GitHub, suggesting a problem with parallel builds. However, upon reviewing the code, it appears that my code include measures to disable parallel building. Could you provide any insights or suggest where I might further investigate this issue?

Here is the error:

/usr/bin/ld: /tmp/ccJiptB5.o: in function `main':
linktest.c:(.text.startup+0xfa8): undefined reference to `slagge_'
/usr/bin/ld: linktest.c:(.text.startup+0xfaf): undefined reference to `slagsy_'
/usr/bin/ld: linktest.c:(.text.startup+0xfb6): undefined reference to `slahilb_'
/usr/bin/ld: linktest.c:(.text.startup+0xfbd): undefined reference to `slakf2_'
/usr/bin/ld: linktest.c:(.text.startup+0xfc4): undefined reference to `slaran_'
/usr/bin/ld: linktest.c:(.text.startup+0xfcb): undefined reference to `slarge_'
/usr/bin/ld: linktest.c:(.text.startup+0xfd2): undefined reference to `slarnd_'
/usr/bin/ld: linktest.c:(.text.startup+0xfd9): undefined reference to `slaror_'
/usr/bin/ld: linktest.c:(.text.startup+0xfe0): undefined reference to `slarot_'
/usr/bin/ld: linktest.c:(.text.startup+0xfe7): undefined reference to `slatm1_'
/usr/bin/ld: linktest.c:(.text.startup+0xfee): undefined reference to `slatm2_'
/usr/bin/ld: linktest.c:(.text.startup+0xff5): undefined reference to `slatm3_'
/usr/bin/ld: linktest.c:(.text.startup+0xffc): undefined reference to `slatm5_'
/usr/bin/ld: linktest.c:(.text.startup+0x1003): undefined reference to `slatm6_'
/usr/bin/ld: linktest.c:(.text.startup+0x100a): undefined reference to `slatm7_'
/usr/bin/ld: linktest.c:(.text.startup+0x1011): undefined reference to `slatme_'
/usr/bin/ld: linktest.c:(.text.startup+0x1018): undefined reference to `slatmr_'
/usr/bin/ld: linktest.c:(.text.startup+0x101f): undefined reference to `slatms_'
/usr/bin/ld: linktest.c:(.text.startup+0x1026): undefined reference to `slatmt_'
/usr/bin/ld: linktest.c:(.text.startup+0x1bc5): undefined reference to `dlagge_'
/usr/bin/ld: linktest.c:(.text.startup+0x1bcc): undefined reference to `dlagsy_'
/usr/bin/ld: linktest.c:(.text.startup+0x1bd3): undefined reference to `dlahilb_'
/usr/bin/ld: linktest.c:(.text.startup+0x1bda): undefined reference to `dlakf2_'
/usr/bin/ld: linktest.c:(.text.startup+0x1be1): undefined reference to `dlaran_'
/usr/bin/ld: linktest.c:(.text.startup+0x1be8): undefined reference to `dlarge_'
/usr/bin/ld: linktest.c:(.text.startup+0x1bef): undefined reference to `dlarnd_'
/usr/bin/ld: linktest.c:(.text.startup+0x1bf6): undefined reference to `dlaror_'
/usr/bin/ld: linktest.c:(.text.startup+0x1bfd): undefined reference to `dlarot_'
/usr/bin/ld: linktest.c:(.text.startup+0x1c04): undefined reference to `dlatm1_'
/usr/bin/ld: linktest.c:(.text.startup+0x1c0b): undefined reference to `dlatm2_'
/usr/bin/ld: linktest.c:(.text.startup+0x1c12): undefined reference to `dlatm3_'
/usr/bin/ld: linktest.c:(.text.startup+0x1c19): undefined reference to `dlatm5_'
/usr/bin/ld: linktest.c:(.text.startup+0x1c20): undefined reference to `dlatm6_'
/usr/bin/ld: linktest.c:(.text.startup+0x1c27): undefined reference to `dlatm7_'
/usr/bin/ld: linktest.c:(.text.startup+0x1c2e): undefined reference to `dlatme_'
/usr/bin/ld: linktest.c:(.text.startup+0x1c35): undefined reference to `dlatmr_'
/usr/bin/ld: linktest.c:(.text.startup+0x1c3c): undefined reference to `dlatms_'

sandlbn avatar Feb 21 '24 20:02 sandlbn

Is the build directory local to your system, or is it mounted from elsewhere which might throw off timestamps etc ? Also how big is your hardware ? You could try setting MAKE_NB_JOBS to a small number to reduce any risk of races. (But this is a bit strange indeed, not supposed to happen anymore.) Do you see any earlier messages about compiling any of these "undefined" symbols in your build log ?

martin-frbg avatar Feb 21 '24 22:02 martin-frbg

Thanks for the quick reply. Setting MAKE_NB_JOBS to 1 helps now that the build is complete.

sandlbn avatar Feb 21 '24 22:02 sandlbn

curious how that got broken again (apparently)... how many cores does your machine have, and which version of make ?

martin-frbg avatar Feb 21 '24 22:02 martin-frbg

Closing as not reproducible with the available information

martin-frbg avatar Mar 11 '24 07:03 martin-frbg