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
As reported in issues #2236 and #2237 version 0.3.7 has problems with PGI.
Now that I have access to PGI 19.10, which fixes the MMX instructions problems, I tried again to build 0.3.7 after applying changes in #2223 (#2240 is no longer needed due to fixes in 19.10). I have tried both the llvm and nollvm compilers. They both produce the same result.
The invalid base+index expression error was mentioned in the discussion in #2237here.
Does anyone know if a solution to the invalid base+index expression error was ever found? Or if there were other modifications found that were needed to get a clean build with PGI 19.10?
I just tried the current develop (8d2a796) with several compilers and the only one that succeeded was gcc-4.8.5. All the rest died with some version of undefined reference error, I think during builds for tests. It does appear, though, that the invalid base+index expression is gone.
Your PGI seems to be looking for things from libpgmp.so but I wonder why and how it manages to
do this selectively for only some of the tests. Even less sure what to make of the other two - the gcc8/9 linktest seems to be missing all functions from the (netlib) LAPACK "matgen" helpers for the included regression tests that should be exactly the same as seen by gcc-4.8.5, Intel seems to have hit a mutilated reference to xerbla somewhere that nobody else noticed)
BTW the trsm_uncopy_4.c that seemed to cause the assembler error should be unchanged from 0.3.7 (note the "invalid operand for instruction" would have been generated by pgcc itself from the C source !) so either the compiler options are different now (in a way we neglected to document in the earlier tickets) or your build is (sometimes?) using an older assembler (or even an older pgcc).
Anything special about that system, like network file systems mounted on demand or from a distributed storage that could be out of sync ?
Hmm. I can force the "invalid base+index" on Haswell by removing the -D__MMX__ -Mnollvm from the CFLAGS in Makefile.system (the bits from #2240, so apparently it is not fixed completely despite #2237 (comment)@cparrott73 )
I don't believe the fix was propagated to the NoLLVM compilers, but I would have to double check with our developer here. In general, the NoLLVM compilers are deprecated and will not see any new releases after 20.4 or so.
Okay, sorry about that - I guess I misread the above. I assume you are referring to the inline assembly issue above, then? I'll probably need to file a new bug report on that one. I'll work to reproduce it here first.
Build of current (unmodified) "develop" with the NoLLVM compiler works, but the openblas_utest binary gets built as a dummy binary with none of the tests. (I think this is a regression, but cannot be sure and would need to reinstall PGI 19.4 first to confirm). Building with the LLVM version appeared to work for the most part but here the openblas_utest binary segfaults on startup in _mp_preinit2 (in what was not supposed to be an OpenMP build)
And I just confirmed that a gcc 9.2.0 build is not missing any bits from MATGEN/TESTING in linktest here. No icc on that system at the moment to reproduce any "xerbl_"
Thank you very much. BTW I can also reproduce the link error (undefined references to _mp_penter etc as noted above) when trying to compile with USE_OPENMP=1. Symbols mp_penter, mp_lcpu, mp_ncpus and mp_pexit do not appear to be defined in any of the libraries installed with 19.10 ?
I am getting some strange inconsistent behavior. The gcc failures puzzled me so I reran them and am now seeing them succeed/fail randomly. I suspect it might be an issue with parallel make, but I'm not 100% sure. I'm running my make command with -j1 to try to eliminate build issues, but it appears that the tests use -j 80 despite my efforts:
[Christopher.W.Harrop@Hera:hfe04 xml]$ grep "make " ../log/openblas/openblas_8d2a796_gcc*.log
../log/openblas/openblas_8d2a796_gcc_4.8.5.log:+ make -j1 CC=gcc CXX=g++ FC=gfortran F90=gfortran F77=gfortran
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:+ make -j1 CC=gcc CXX=g++ FC=gfortran F90=gfortran F77=gfortran
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:cd x86_64 && make ../slaswp_plus.o
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:cd x86_64 && make ../slaswp_minus.o
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:cd x86_64 && make ../dlaswp_plus.o
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:cd x86_64 && make ../dlaswp_minus.o
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:cd x86_64 && make ../claswp_plus.o
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:cd x86_64 && make ../claswp_minus.o
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:cd x86_64 && make ../zlaswp_plus.o
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:cd x86_64 && make ../zlaswp_minus.o
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:make -C SRC
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:make -C TESTING/MATGEN
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:make -C LAPACKE
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:make -C src
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:make -C utils
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:make -j 80 -C test all
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:make -j 80 -C utest all
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:make -j 80 -C ctest all
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:To install the library, you can run "make PREFIX=/path/to/your/installation install".
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:+ make -j1 CC=gcc CXX=g++ FC=gfortran F90=gfortran F77=gfortran PREFIX=/scratch2/BMC/gsd-hpcs/Christopher.W.Harrop/bass-develop/opt/OpenBLAS/8d2a796/gcc/8.3.0 install
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:make -j 80 -f Makefile.install install
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:Generating OpenBLASConfig.cmake in /scratch2/BMC/gsd-hpcs/Christopher.W.Harrop/bass-develop/opt/OpenBLAS/8d2a796/gcc/8.3.0/lib/cmake/openblas
../log/openblas/openblas_8d2a796_gcc_8.3.0.log:Generating OpenBLASConfigVersion.cmake in /scratch2/BMC/gsd-hpcs/Christopher.W.Harrop/bass-develop/opt/OpenBLAS/8d2a796/gcc/8.3.0/lib/cmake/openblas
This might be affecting my other builds too. I'm going to go digging to see if I can turn off the parallel make.
Explicitly appending the OpenMP runtime libraries on the compile line here is redundant - they are implied by -mp being present when linking. In fact, there is actually an alternate OpenMP implentation, which is available in 19.10 as libnvomp. libnvomp will be the default in the 20.x releases, so explicitly appending these libraries will break then.
If you want to test it out with 19.10, you can specify -mp=nvomp instead of just -mp on the command line.
Also the AVX512 code in sgemm_kernel_direct_skylakex.c fails to compile ("Illegal use of symbol __mm512 ... Type not specified, int assumed"), -tp skylake and/or -mavx512f -mavx512vl does not help. From https://www.pgroup.com/userforum/viewtopic.php?t=6686 this could be related to TPR27520 which was supposed to be fixed post 19.9 ?
Regarding #4 - we are aware of the issue. I have raised it with our developers, and unfortunately, the work to be done here to support the required AVX512 intrinsic functions has not yet found its way to the top of their list of priorities. Is there any way we could work around this issue with inline assembly in OpenBLAS for PGI for these kernels?
Unfortunately I am away from my SkylakeX system right now, so I am not sure about the extent of the problem - if it just the functions used in sgemm_kernel_direct_skylakex (where compilation aborted), it should be possible to undefine the related parameter in param.h. Otherwise OpenBLAS needs to be built with NO_AVX512=1 which would make it use the Haswell kernels.
I had the same issue with 0.3.9. It's an invisible Unicode character 0xFEFF ("zero width no-break space" / Unicode byte order mark). I deleted it with a hex editor (ghex) and OpenBLAS 0.3.9 compiles using the nollvm version!
Edit: I'm on a Zen2 system.
Edit 2: clarified version. OpenBLAS 0.3.10 still fails to build, see comment below
Ha, good catch, thanks. file tells me that some of the Haswell/Zen strsm kernel files are also affected, will clean them up later when I am a bit more awake
By the way, any reason why the default flags for PGI compiler requires the NoLLVM version -Mnollvm and the -tp p7-64 flag? I should probably put this in another issue, but currently I'm trying to build 0.3.10 with PGI 20.1 on Summit (POWER9) to no avail, since both flags are not applicable...
Simply because nobody has tried building with PGI on POWER yet, and the flags you mentioned are required to get a usable build on x86_64.
There is probably something else going wrong earlier however, as POWER architecture should get its compiler arguments from Makefile.power
Ha, good catch, thanks. file tells me that some of the Haswell/Zen strsm kernel files are also affected, will clean them up later when I am a bit more awake
I'm building 0.3.10 on Zen2. It still has the unstripped version. Makes sense, since #2687 was merged right after the release 😅
Anyway, the build fails at the testing routines. Looks like the error has to deal with name mangling?
/home/wyp/compile/OpenBLAS-0.3.10/test/./zblat1.f:252: undefined reference to `dznrm2_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./zblat1.f:256: undefined reference to `dzasum_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./zblat1.f:260: undefined reference to `zscal_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./zblat1.f:265: undefined reference to `zdscal_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./zblat1.f:270: undefined reference to `izamax_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./zblat1.f:293: undefined reference to `zdscal_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./zblat1.f:306: undefined reference to `zdscal_'
/usr/bin/ld: zblat1.o: in function `check1_':
zblat1.f:(.text+0x7f4): undefined reference to `zdscal_'
/usr/bin/ld: zblat1.o: in function `check1_':
/home/wyp/compile/OpenBLAS-0.3.10/test/./zblat1.f:288: undefined reference to `zscal_'
/usr/bin/ld: zblat1.o: in function `check2_':
/home/wyp/compile/OpenBLAS-0.3.10/test/./zblat1.f:535: undefined reference to `zdotc_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./zblat1.f:539: undefined reference to `zdotu_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./zblat1.f:543: undefined reference to `zaxpy_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./zblat1.f:547: undefined reference to `zcopy_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./zblat1.f:551: undefined reference to `zswap_'
make[1]: *** [Makefile:167: zblat1] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: cblat1.o: in function `check1_':
/home/wyp/compile/OpenBLAS-0.3.10/test/./cblat1.f:252: undefined reference to `scnrm2_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./cblat1.f:256: undefined reference to `scasum_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./cblat1.f:260: undefined reference to `cscal_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./cblat1.f:265: undefined reference to `csscal_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./cblat1.f:270: undefined reference to `icamax_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./cblat1.f:293: undefined reference to `csscal_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./cblat1.f:306: undefined reference to `csscal_'
/usr/bin/ld: cblat1.o: in function `check1_':
cblat1.f:(.text+0x7c6): undefined reference to `csscal_'
/usr/bin/ld: cblat1.o: in function `check1_':
/home/wyp/compile/OpenBLAS-0.3.10/test/./cblat1.f:288: undefined reference to `cscal_'
/usr/bin/ld: cblat1.o: in function `check2_':
/home/wyp/compile/OpenBLAS-0.3.10/test/./cblat1.f:535: undefined reference to `cdotc_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./cblat1.f:539: undefined reference to `cdotu_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./cblat1.f:543: undefined reference to `caxpy_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./cblat1.f:547: undefined reference to `ccopy_'
/usr/bin/ld: /home/wyp/compile/OpenBLAS-0.3.10/test/./cblat1.f:551: undefined reference to `cswap_'
make[1]: *** [Makefile:164: cblat1] Error 2
Make was invoked with make CC=pgcc FC=pgfortran USE_OPENMP=1
Full build log here
Try the attached patch. It should work if you aren't using OpenMP.
If you are using OpenMP, you will need to recompile a handful of C files containing OpenMP directives with pgcc -mp, e.g. driver/others/blas_server_omp.c.
I actually don't have this in my patch anymore, as our current development compilers will actually support the GOMP OpenMP interface when they are released, making such recompilations unnecessary. (i.e. you can compile the C OpenMP files with gcc -fopenmp and they will work just fine with our compilers in the near future.)
Note the changes to f_check are probably not needed for the current release compilers, but our current development compilers produce objects that are more GNU-like, and cause f_check to incorrectly conclude they need the G77 interface. This patch includes a fix for that.
Oh, that f_check fix might be problematic for existing releases. We added support for -fopenmp in the compilers under development, which is aliased to -mp. You might need to change it to the latter if the release you have chokes on the former.
In addition to the above patch (which has been merged as #2727), looks like one of the recent pull requests linked to #2718 fixed the compilation problem. It might have been #2731. The current development version compiles successfully on Zen2! As before, I used make CC=pgcc FC=pgfortran USE_OPENMP=1. @peterukk Can you try compiling again?
Activity
martin-frbg commentedon Feb 4, 2020
Weird I'm fairly certain I test-build on SkylakeX when 19.10 became available. Can you try with a snapshot of the current develop branch ?
christopherwharrop-noaa commentedon Feb 4, 2020
I just tried the current develop (8d2a796) with several compilers and the only one that succeeded was gcc-4.8.5. All the rest died with some version of
undefined referenceerror, I think during builds for tests. It does appear, though, that theinvalid base+index expressionis gone.PGI 19.10 failed with:
gcc 8.3.0 and 9.2.0 failed with:
Intel 17.0.5.239, 18.0.5.274, and 19.0.5.281 all failed during testing with
martin-frbg commentedon Feb 4, 2020
Your PGI seems to be looking for things from libpgmp.so but I wonder why and how it manages to
do this selectively for only some of the tests. Even less sure what to make of the other two - the gcc8/9 linktest seems to be missing all functions from the (netlib) LAPACK "matgen" helpers for the included regression tests that should be exactly the same as seen by gcc-4.8.5, Intel seems to have hit a mutilated reference to xerbla somewhere that nobody else noticed)
christopherwharrop-noaa commentedon Feb 4, 2020
I had set
USE_OPENMP=1in mymakecommand. I am going to remove that and try them all again to see if that makes any difference.martin-frbg commentedon Feb 4, 2020
BTW the trsm_uncopy_4.c that seemed to cause the assembler error should be unchanged from 0.3.7 (note the "invalid operand for instruction" would have been generated by pgcc itself from the C source !) so either the compiler options are different now (in a way we neglected to document in the earlier tickets) or your build is (sometimes?) using an older assembler (or even an older pgcc).
Anything special about that system, like network file systems mounted on demand or from a distributed storage that could be out of sync ?
martin-frbg commentedon Feb 4, 2020
Hmm. I can force the "invalid base+index" on Haswell by removing the -D__MMX__ -Mnollvm from the CFLAGS in Makefile.system (the bits from #2240, so apparently it is not fixed completely despite #2237 (comment) @cparrott73 )
cparrott73 commentedon Feb 4, 2020
I don't believe the fix was propagated to the NoLLVM compilers, but I would have to double check with our developer here. In general, the NoLLVM compilers are deprecated and will not see any new releases after 20.4 or so.
martin-frbg commentedon Feb 4, 2020
@cparrott73 it works with both options set but fails without, so it seems to be the llvm variant is the one that is (still?) having problems here.
cparrott73 commentedon Feb 4, 2020
Okay, sorry about that - I guess I misread the above. I assume you are referring to the inline assembly issue above, then? I'll probably need to file a new bug report on that one. I'll work to reproduce it here first.
martin-frbg commentedon Feb 4, 2020
Build of current (unmodified) "develop" with the NoLLVM compiler works, but the openblas_utest binary gets built as a dummy binary with none of the tests. (I think this is a regression, but cannot be sure and would need to reinstall PGI 19.4 first to confirm). Building with the LLVM version appeared to work for the most part but here the openblas_utest binary segfaults on startup in _mp_preinit2 (in what was not supposed to be an OpenMP build)
And I just confirmed that a gcc 9.2.0 build is not missing any bits from MATGEN/TESTING in linktest here. No icc on that system at the moment to reproduce any "xerbl_"
cparrott73 commentedon Feb 4, 2020
I have opened TRS#28084 on this issue against PGI 19.10 here. I will let you know when I have more information.
martin-frbg commentedon Feb 4, 2020
Thank you very much. BTW I can also reproduce the link error (undefined references to _mp_penter etc as noted above) when trying to compile with USE_OPENMP=1. Symbols mp_penter, mp_lcpu, mp_ncpus and mp_pexit do not appear to be defined in any of the libraries installed with 19.10 ?
christopherwharrop-noaa commentedon Feb 4, 2020
I am getting some strange inconsistent behavior. The gcc failures puzzled me so I reran them and am now seeing them succeed/fail randomly. I suspect it might be an issue with parallel make, but I'm not 100% sure. I'm running my make command with
-j1to try to eliminate build issues, but it appears that the tests use-j 80despite my efforts:This might be affecting my other builds too. I'm going to go digging to see if I can turn off the parallel make.
martin-frbg commentedon Feb 4, 2020
You should be able to override this in Makefile.rule if commandline or CFLAGS has no effect.
cparrott73 commentedon Feb 4, 2020
I'll take a look at the OpenMP issue here, but just FYI:
Explicitly appending the OpenMP runtime libraries on the compile line here is redundant - they are implied by
-mpbeing present when linking. In fact, there is actually an alternate OpenMP implentation, which is available in 19.10 aslibnvomp.libnvompwill be the default in the 20.x releases, so explicitly appending these libraries will break then.If you want to test it out with 19.10, you can specify
-mp=nvompinstead of just-mpon the command line.6 remaining items
martin-frbg commentedon Feb 7, 2020
cparrott73 commentedon Feb 7, 2020
Regarding #4 - we are aware of the issue. I have raised it with our developers, and unfortunately, the work to be done here to support the required AVX512 intrinsic functions has not yet found its way to the top of their list of priorities. Is there any way we could work around this issue with inline assembly in OpenBLAS for PGI for these kernels?
martin-frbg commentedon Feb 7, 2020
Unfortunately I am away from my SkylakeX system right now, so I am not sure about the extent of the problem - if it just the functions used in sgemm_kernel_direct_skylakex (where compilation aborted), it should be possible to undefine the related parameter in param.h. Otherwise OpenBLAS needs to be built with NO_AVX512=1 which would make it use the Haswell kernels.
peterukk commentedon Jun 15, 2020
I just tried to compile v0.3.10 on a Zen1 system with PGI compilers and got the following error when running
make CC=pgcc FC=pgfortran:martin-frbg commentedon Jun 15, 2020
Does the start of that file in your copy look the same as here ? https://github.com/xianyi/OpenBLAS/blob/develop/kernel/x86_64/sgemm_kernel_8x4_haswell_2.c
(Not sure what to make of the numeric representation, probably something got converted to UTF8 or UTF16 when it should not have been ?)
wyphan commentedon Jun 25, 2020
I had the same issue with 0.3.9. It's an invisible Unicode character
0xFEFF("zero width no-break space" / Unicode byte order mark). I deleted it with a hex editor (ghex) and OpenBLAS 0.3.9 compiles using the nollvm version!Edit: I'm on a Zen2 system.
Edit 2: clarified version. OpenBLAS 0.3.10 still fails to build, see comment below
martin-frbg commentedon Jun 26, 2020
Ha, good catch, thanks.
filetells me that some of the Haswell/Zen strsm kernel files are also affected, will clean them up later when I am a bit more awakewyphan commentedon Jul 15, 2020
By the way, any reason why the default flags for PGI compiler requires the NoLLVM version
-Mnollvmand the-tp p7-64flag? I should probably put this in another issue, but currently I'm trying to build 0.3.10 with PGI 20.1 on Summit (POWER9) to no avail, since both flags are not applicable...Edit: typo
Edit 2: it's issue #2718
martin-frbg commentedon Jul 15, 2020
Simply because nobody has tried building with PGI on POWER yet, and the flags you mentioned are required to get a usable build on x86_64.
There is probably something else going wrong earlier however, as POWER architecture should get its compiler arguments from Makefile.power
wyphan commentedon Jul 17, 2020
I'm building 0.3.10 on Zen2. It still has the unstripped version. Makes sense, since #2687 was merged right after the release 😅
Anyway, the build fails at the testing routines. Looks like the error has to deal with name mangling?
Make was invoked with
make CC=pgcc FC=pgfortran USE_OPENMP=1Full build log here
Edit: add Zen2 build log
cparrott73 commentedon Jul 18, 2020
Try the attached patch. It should work if you aren't using OpenMP.
If you are using OpenMP, you will need to recompile a handful of C files containing OpenMP directives with pgcc -mp, e.g. driver/others/blas_server_omp.c.
I actually don't have this in my patch anymore, as our current development compilers will actually support the GOMP OpenMP interface when they are released, making such recompilations unnecessary. (i.e. you can compile the C OpenMP files with gcc -fopenmp and they will work just fine with our compilers in the near future.)
Note the changes to f_check are probably not needed for the current release compilers, but our current development compilers produce objects that are more GNU-like, and cause f_check to incorrectly conclude they need the G77 interface. This patch includes a fix for that.
oblas.diff.txt
cparrott73 commentedon Jul 18, 2020
Oh, that f_check fix might be problematic for existing releases. We added support for -fopenmp in the compilers under development, which is aliased to -mp. You might need to change it to the latter if the release you have chokes on the former.
wyphan commentedon Jul 24, 2020
In addition to the above patch (which has been merged as #2727), looks like one of the recent pull requests linked to #2718 fixed the compilation problem. It might have been #2731. The current development version compiles successfully on Zen2! As before, I used
make CC=pgcc FC=pgfortran USE_OPENMP=1.@peterukk Can you try compiling again?