OpenBLAS: Still can't compile 0.3.7 with PGI (19.10)
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.
Now, the compile fails with (for example):
pgcc -c -O2 -DMAX_STACK_ALLOC=2048 -mp -tp p7-64 -DF_INTERFACE_PGI -fPIC -DNO_AVX512 -DSMP_SERVER -DUSE_OPENMP -DNO_WARMUP -DMAX_CPU_NUMBER=80 -DMAX_PARALLEL_NUMBER=1 -DVERSION=\"0.3.7\" -DASMNAME=dtrsm_iun\
ucopy -DASMFNAME=dtrsm_iunucopy_ -DNAME=dtrsm_iunucopy_ -DCNAME=dtrsm_iunucopy -DCHAR_NAME=\"dtrsm_iunucopy_\" -DCHAR_CNAME=\"dtrsm_iunucopy\" -DNO_AFFINITY -I.. -DDOUBLE -UCOMPLEX -DDOUBLE -UCOMPLEX -UOU\
TER -ULOWER -DUNIT generic/trsm_uncopy_4.c -o dtrsm_iunucopy.o
<inline asm>:2:13: error: invalid operand for instruction
addq $128, %dl
^~~
<inline asm>:5:15: error: invalid base+index expression
vmulpd -128(%dl), %xmm0, %xmm4
The invalid base+index expression error was mentioned in the discussion in #2237 here.
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?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 34 (4 by maintainers)
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
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