You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
undefined reference to `clagge_' , no ar -ru in TESTING/MATGEN #1213
Trying to build 0.2.18 on RHEL 6.8, gcc 4.4.7, gfortran, E5-2695 v4, with the referenced error (among others). Referencing issues 441 and and 1070 neither of which were helpful to resolve, other than they seem to be the same list of errors due to ar -ru not running before exiting TESTING/MATGEN. Built same rev successfully on same OS, same gcc, with E5-2699. Don't know if it's a processor issue or an installed lib issue, but by comparing the make logs I was definitely seeing that ar -ru is not being run before leaving TESTING/MATGEN (as referenced in 441).
Unfortunately I don't have direct access to the failed machine as it's offsite, but I'd like to know possible causes for make not calling ar -ru before leaving the directory, and whether there's been any changes in 0.2.19 that could possibly alleviate this?
I'm in the process of getting the 'rpm -qa' results from the machine in question, as well as the kernel version. The successful build machine had kernel 2.6.32-573.el6.x86_64.
Could you provide the build log from the machine that is giving you problems (best from a fresh compile after issuing make clean first just in case...). Seeing that you mentioned issue 441, perhaps a close look at that make.inc file would help as well.
You need later binutils for Haswell or anything AVX2 like your Broadwell (Xeon ... v4) https://github.com/xianyi/OpenBLAS/wiki/faq#binutils
0.2.19 or devel highly recommended for correct CPUID detection. if not possible, use TARGET=HASWELL build parameter (in conjunction with later binutils)
2699v3 pre-dates 0.2.18 and is correctly identified, though should barf out during build for old binutils.
I will try to get the build log sometime in the next couple days, there's some work obstacles to overcome there, but doable. As far as the new binutils, I've seen those references, but have been building with NO_AVX2=1 in the Makefile.rule to overcome. This has worked on other flavor Xeon's as well, I'll try to gather a more comprehensive list (no TARGET designations were required). My make.inc matches those in issue 441, with the exception of -DMAX_CPU_NUMBER=XX matching my particular architecture, and then I think the auto-recognized TARGET it was shooting for was sandy_bridge. but I will post that as well.
You just change parameters, build a bit further, then change parameters again, then wonder why tests dont work. If you are fine with losing half of speed by not using AVX2 you can install package - yum install epel-release ; yum install openblas-devel
Please run 'make clean', then start 'script' and after that run 'make' , preferably wrap make with 'scl'
Both your processors are perfectly detected by 0.2.19.
Is there a special reason why you want to build 0.2.18 specifically ? While I cannot promise that your actual build problem has been fixed by any of the 400+ commits in the year since 0.2.18 was released, updating to the current "develop" snapshot would get you at least a newer LAPACK version and a fix for a Makefile glitch that would make the LAPACK bits run significantly slower than their stock netlib counterpart.
There's buacracy and infrastucture in the way of just grabbing the latest rev and trying it out. I was exploring other options as that churns through the machine, which could be weeks. I just successfully compiled on rhel 6.7 with the 2695 v4 (different machine) so at this point I'm tracing the rpm log to see if there are any critical differences. Still working to get the make log uploaded as well.
Nothing changes in 6U9 regarding compilers. You need devtoolset 2.1 or better for AVX2 support (i.e build better version than RPM), ignoring AVX2 - Fedora EPEL RPM (mostly paid by Red Hat) should be enough.
I see. You will probably want to apply the trivial fix from #1050 for the LAPACK optimization issue to the 0.2.18 Makefile.system if you can sneak that past your bureaucrats.
Will be adding make log hopefully next week, 7/5. At this point I've been able to compare side by side make logs, and OpenBLAS directory structures post-make for successful vs unsuccessful attempts, and make literally cd's in to TESTING/MATGEN, compiles the fortran .f's to .o's with gfortran, then leaves the directory without the ar -ru / ranlib steps... although those same steps are completed successfully in other directories ( ar and ranlib are accessible). This causes the gcc linktest.c step to fail, right at the end of make. The libopenblas_sandybridgep-r0.2.18.a is created in root directory from all the other steps, but running a 'nm libopenblas_sandybridgep-r0.2.18.a | grep clagg' clearly shows the clagg missing symbol (as well as the other 73 .o symbols generated from the TESTING/MATGEN make step), whereas they're present in the successful build. Taking another look at issue 1070, my list of files matches that exactly, and I also see that issue 1070 is related to 0.2.19. I get the whole binutils, gcc, etc, etc, but it's literally working on an almost exact copy binutils 2.20, gcc 4.4.7 machine. Any guesses as to what could cause make to skip the ar -ru / ranlib steps? In a pinch, I guess I could copy that step from a successful build, do it manually on the bad machine and then re-run make?
I think I can squeeze in the issue 1050 fix, thanks for pointing that out.
Maybe share CPUIDs and build command line at least?
Wild guess based on lax input is that you are doing something wrong and leaving some important details.
You see Fedora and EPEL packages are built for at least last 5 years without much of noise.
No ultimate resolution, but some hints, that don't appear to point at an OpenBLAS problem, but more of a build system/file system issue. Doing the manual ar -ru command (copied from a successful build) inside the TESTING/MATGEN folder, then re-running make from the top resulted in a successful build. All other attempts were unsuccessful (haswell, 0.2.19, etc, etc). Oddly enough, and this is what gives some hints, running 'make -d' would cause it to pass from a fresh untar. The -d does spuge some major garbage, but obviously its changing the timing of things, and what appears to be happening is that make is determining due to the timestamp of the target .a file, that the ar -ru command doesn't need run (when ran without -d). Another oddity with this system as opposed to my typical install was that UTC time was the default time base. So while the file system was a root partition (ie I couldn't move it off an NFS and blame the NFS), I'd say there was still something strange about files and timebase management. Can't say definitively, but these were the symptoms, and I'd spent enough time with it. Still haven't run in to it again on even another 5 different system builds with 0.2.18. If I get a chance to get back to it, I may try to see if the admin would experimentally allow me to change the system time to see if that effects anything.
NFS server sets atime based on local time, not client time. If it is ahead by .01 second most makefiles will fail or at least barf a warning. You can try MAKE_NB_JOBS=1 to make it compile one file at a time so that times do not clash. Problem is inherent to make and NFS, not specific to OpenBLAS or other packages. Did I say mail root and EPEL already?
fyi, the same problem can also occur when the underlying filesystem is an ext3 (which seems to be the default for /tmp on RHEL-6) or any other filesystem which does not support sub-second resolution of timestamps together with a fast enough CPU and/or enough cores. See also the discussion here: spack/spack#9308 (comment)
The problem pertains make itself, it is not avoidable by changing userland software, even less by changing its input data files.
You can convert ext2 to ext4 (later being rhel6 default) with tune2fs xor mount /tmp as RAM disk aka tmpfs.
Probably related to #1682 as well (parallel make subprocesses trying to write to the single libopenblas.a file at the same time - the original netlib LAPACK Makefiles expect to create separate library files for lapack, lapacke and tmglib by default)
@brada4 I know, there is nothing OpenBLAS could do to work around that problem except providing a way to disable parallel builds, which you already do. Unfortunately some people have to work with the systems they are given and are unable to change it. But since OpenBLAS enables parallel builds by default, it might be worthwile to add a FAQ entry for it.
Building on filesystems with missing sub-second timestamp resolution (ext2/3, converted ext4)
and shared network filesystems (NFS) is discouraged and may lead to spurious errors
like missing symbols due to the parallel build process.
If you have to build OpenBLAS on such a filesystem and encounter errors like
`undefined reference to clagge_ `, set `MAKE_NB_JOBS=1` to disable parallel
builds prior to reporting an issue. See also Issue 1213 (and others) for a discussion.
GNU make issues warning that your build is incomplete. NFS timestamps are set from NFS server clock to remote filesystem resolution which may drift apart, if timestamps get over .1s in the past make issues a warning.
I wonder if same warning happens in ext2 case.
After seeing the new comments here, I conferred with the admin at the site and they do indeed use ext3 there with the problematic system, and all of the systems I've been building on otherwise (successfully) are ext4. I will be back to that system toward the end of this month and can try the new directive.
In Makefile.rule, there's a "NO_PARALLEL_MAKE" and a "MAKE_NB_JOBS", I'm assuming the former would ignore the latter, and the above suggestion can be accomplished with the proper setting of either of these flags?
And just to clarify since this was referenced in pull request #9308, this scenario is NOT an NFS build. I had expressed doubt at one point, and I probably wasn't very clear when stating that had been ruled out in my 9/6/17 post.
Do you get warning about incomplete build at the end of make comand like with nfs and server clock drifting off?
NFS time is to nanosecond, thus false statement wa already proposed.
Activity
martin-frbg commentedon Jun 27, 2017
Could you provide the build log from the machine that is giving you problems (best from a fresh compile after issuing
make cleanfirst just in case...). Seeing that you mentioned issue 441, perhaps a close look at that make.inc file would help as well.brada4 commentedon Jun 27, 2017
You need later binutils for Haswell or anything AVX2 like your Broadwell (Xeon ... v4)
https://github.com/xianyi/OpenBLAS/wiki/faq#binutils
0.2.19 or devel highly recommended for correct CPUID detection. if not possible, use TARGET=HASWELL build parameter (in conjunction with later binutils)
2699v3 pre-dates 0.2.18 and is correctly identified, though should barf out during build for old binutils.
mstaylor97 commentedon Jun 27, 2017
I will try to get the build log sometime in the next couple days, there's some work obstacles to overcome there, but doable. As far as the new binutils, I've seen those references, but have been building with NO_AVX2=1 in the Makefile.rule to overcome. This has worked on other flavor Xeon's as well, I'll try to gather a more comprehensive list (no TARGET designations were required). My make.inc matches those in issue 441, with the exception of -DMAX_CPU_NUMBER=XX matching my particular architecture, and then I think the auto-recognized TARGET it was shooting for was sandy_bridge. but I will post that as well.
brada4 commentedon Jun 27, 2017
You just change parameters, build a bit further, then change parameters again, then wonder why tests dont work. If you are fine with losing half of speed by not using AVX2 you can install package -
yum install epel-release ; yum install openblas-develPlease run 'make clean', then start 'script' and after that run 'make' , preferably wrap make with 'scl'
Both your processors are perfectly detected by 0.2.19.
martin-frbg commentedon Jun 29, 2017
Is there a special reason why you want to build 0.2.18 specifically ? While I cannot promise that your actual build problem has been fixed by any of the 400+ commits in the year since 0.2.18 was released, updating to the current "develop" snapshot would get you at least a newer LAPACK version and a fix for a Makefile glitch that would make the LAPACK bits run significantly slower than their stock netlib counterpart.
mstaylor97 commentedon Jun 29, 2017
There's buacracy and infrastucture in the way of just grabbing the latest rev and trying it out. I was exploring other options as that churns through the machine, which could be weeks. I just successfully compiled on rhel 6.7 with the 2695 v4 (different machine) so at this point I'm tracing the rpm log to see if there are any critical differences. Still working to get the make log uploaded as well.
brada4 commentedon Jun 29, 2017
Nothing changes in 6U9 regarding compilers. You need devtoolset 2.1 or better for AVX2 support (i.e build better version than RPM), ignoring AVX2 - Fedora EPEL RPM (mostly paid by Red Hat) should be enough.
martin-frbg commentedon Jun 29, 2017
I see. You will probably want to apply the trivial fix from #1050 for the LAPACK optimization issue to the 0.2.18 Makefile.system if you can sneak that past your bureaucrats.
mstaylor97 commentedon Jun 30, 2017
make.inc file contents:
FORTRAN = gfortran
OPTS = -Wall -m64 -fPIC
POPTS = -Wall -m64 -fPIC -pg -fno-inline
NOOPT = -O0 -Wall -m64 -fPIC
PNOOPT = -Wall -m64 -fPIC -pg -fno-inline -O0
LOADOPTS = -Wall -m64 -fPIC -lm -lpthread -lgfortran
CC = gcc
override CFLAGS = -O2 -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC
-DNO_AVX2 -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=72 -DASMNAME= -DASMFNAME=_
-DNAME=_ -DCNAME= -DCHAR_NAME="_" -DCHAR_CNAME="" -DNO_AFFINITY -I. -DHAVE_LAPACK_CONFIG_H
ARCH = ar
ARCHFLAGS = -ru
RANLIB = ranlib
LAPACKLIB = ../libopenblas_sandybridgep-r0.2.18.a
TMGLIB = ../libopenblas_sandybridgep-r0.2.18.a
BLASLIB = ../../../libopenblas_sandybridgep-r0.2.18.a
LAPACKELIB = ../libopenblas_sandybridgep-r0.2.18.a
LAPACKLIB_P = ../libopenblas_sandybridgep-r0.2.18_p.a
SUFFIX = o
PSUFFIX = po
CEXTRALIB = -lm -lpthread -lgfortran
TIMER = INT_ETIME
LOADER = gfortran -pthread
BUILD_DEPRECATED = 1
SHELL = /bin/sh
PLAT = _LINUX
DRVOPTS = $(NOOPT)
ARCHFLAGS= -ru
#RANLIB = ranlib
mstaylor97 commentedon Jun 30, 2017
Will be adding make log hopefully next week, 7/5. At this point I've been able to compare side by side make logs, and OpenBLAS directory structures post-make for successful vs unsuccessful attempts, and make literally cd's in to TESTING/MATGEN, compiles the fortran .f's to .o's with gfortran, then leaves the directory without the ar -ru / ranlib steps... although those same steps are completed successfully in other directories ( ar and ranlib are accessible). This causes the gcc linktest.c step to fail, right at the end of make. The libopenblas_sandybridgep-r0.2.18.a is created in root directory from all the other steps, but running a 'nm libopenblas_sandybridgep-r0.2.18.a | grep clagg' clearly shows the clagg missing symbol (as well as the other 73 .o symbols generated from the TESTING/MATGEN make step), whereas they're present in the successful build. Taking another look at issue 1070, my list of files matches that exactly, and I also see that issue 1070 is related to 0.2.19. I get the whole binutils, gcc, etc, etc, but it's literally working on an almost exact copy binutils 2.20, gcc 4.4.7 machine. Any guesses as to what could cause make to skip the ar -ru / ranlib steps? In a pinch, I guess I could copy that step from a successful build, do it manually on the bad machine and then re-run make?
I think I can squeeze in the issue 1050 fix, thanks for pointing that out.
martin-frbg commentedon Jun 30, 2017
Beats me. Wonder what happens when you cd to TESTING/MATGEN on the "bad" machine, then do "make clean" and "make" there.
brada4 commentedon Jul 1, 2017
Maybe share CPUIDs and build command line at least?
Wild guess based on lax input is that you are doing something wrong and leaving some important details.
You see Fedora and EPEL packages are built for at least last 5 years without much of noise.
martin-frbg commentedon Jul 1, 2017
@brada4 I really wish you would refrain from making trollish comments like this.
brada4 commentedon Jul 1, 2017
Sorry for that @martin-frbg
NO_AVX2 is needed because or RHEL6
0.2.18 on any Broadwell will need TARGET=HASWELL, this is pretty much in line with 'cannot build on other computer'
martin-frbg commentedon Jul 1, 2017
@brada4 right, but neither of these would explain why it fails in TESTING/MATGEN of all places.
10 remaining items
brada4 commentedon Sep 6, 2017
I have seen unstable file access when antivirus intercepts file access on Windows NFS server... Solution was obvious one.
mstaylor97 commentedon Sep 6, 2017
No ultimate resolution, but some hints, that don't appear to point at an OpenBLAS problem, but more of a build system/file system issue. Doing the manual ar -ru command (copied from a successful build) inside the TESTING/MATGEN folder, then re-running make from the top resulted in a successful build. All other attempts were unsuccessful (haswell, 0.2.19, etc, etc). Oddly enough, and this is what gives some hints, running 'make -d' would cause it to pass from a fresh untar. The -d does spuge some major garbage, but obviously its changing the timing of things, and what appears to be happening is that make is determining due to the timestamp of the target .a file, that the ar -ru command doesn't need run (when ran without -d). Another oddity with this system as opposed to my typical install was that UTC time was the default time base. So while the file system was a root partition (ie I couldn't move it off an NFS and blame the NFS), I'd say there was still something strange about files and timebase management. Can't say definitively, but these were the symptoms, and I'd spent enough time with it. Still haven't run in to it again on even another 5 different system builds with 0.2.18. If I get a chance to get back to it, I may try to see if the admin would experimentally allow me to change the system time to see if that effects anything.
brada4 commentedon Sep 6, 2017
NFS server sets atime based on local time, not client time. If it is ahead by .01 second most makefiles will fail or at least barf a warning. You can try MAKE_NB_JOBS=1 to make it compile one file at a time so that times do not clash. Problem is inherent to make and NFS, not specific to OpenBLAS or other packages. Did I say
mail rootand EPEL already?dev-zero commentedon Sep 26, 2018
fyi, the same problem can also occur when the underlying filesystem is an
ext3(which seems to be the default for/tmpon RHEL-6) or any other filesystem which does not support sub-second resolution of timestamps together with a fast enough CPU and/or enough cores. See also the discussion here: spack/spack#9308 (comment)brada4 commentedon Sep 27, 2018
The problem pertains
makeitself, it is not avoidable by changing userland software, even less by changing its input data files.You can convert ext2 to ext4 (later being rhel6 default) with
tune2fsxor mount /tmp as RAM disk aka tmpfs.martin-frbg commentedon Sep 27, 2018
Probably related to #1682 as well (parallel
makesubprocesses trying to write to the single libopenblas.a file at the same time - the original netlib LAPACK Makefiles expect to create separate library files for lapack, lapacke and tmglib by default)dev-zero commentedon Sep 27, 2018
@brada4 I know, there is nothing OpenBLAS could do to work around that problem except providing a way to disable parallel builds, which you already do. Unfortunately some people have to work with the systems they are given and are unable to change it. But since OpenBLAS enables parallel builds by default, it might be worthwile to add a FAQ entry for it.
brada4 commentedon Sep 27, 2018
What would you write there?
dev-zero commentedon Oct 1, 2018
Something like:
brada4 commentedon Oct 1, 2018
GNU make issues warning that your build is incomplete. NFS timestamps are set from NFS server clock to remote filesystem resolution which may drift apart, if timestamps get over .1s in the past make issues a warning.
I wonder if same warning happens in ext2 case.
brada4 commentedon Oct 1, 2018
In NFS case one would 'mail root' and tell to enable NTP
mstaylor97 commentedon Oct 1, 2018
After seeing the new comments here, I conferred with the admin at the site and they do indeed use ext3 there with the problematic system, and all of the systems I've been building on otherwise (successfully) are ext4. I will be back to that system toward the end of this month and can try the new directive.
In Makefile.rule, there's a "NO_PARALLEL_MAKE" and a "MAKE_NB_JOBS", I'm assuming the former would ignore the latter, and the above suggestion can be accomplished with the proper setting of either of these flags?
And just to clarify since this was referenced in pull request
#9308,this scenario is NOT an NFS build. I had expressed doubt at one point, and I probably wasn't very clear when stating that had been ruled out in my 9/6/17 post.dev-zero commentedon Oct 1, 2018
@mstaylor97 just in case your admins think about converting that filesystem to
ext4: they have to reformat it completely, see https://utcc.utoronto.ca/~cks/space/blog/linux/Ext3ToExt4Limitationbrada4 commentedon Oct 2, 2018
Do you get warning about incomplete build at the end of make comand like with nfs and server clock drifting off?
NFS time is to nanosecond, thus false statement wa already proposed.