Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

transpose test failure when using OpenBLAS due to use of domatcopy #147

Open
lkuper opened this issue Jun 7, 2017 · 1 comment
Open

Comments

@lkuper
Copy link
Contributor

lkuper commented Jun 7, 2017

When using ParallelAccelerator with OpenBLAS on either Mac or Linux, ParallelAccelerator fails to compile one of the transpose tests. This is happening because ParallelAccelerator is generating code that uses domatcopy, which is a BLAS extension that is in MKL but not supported by OpenBLAS (there's an open issue about it here: OpenMathLib/OpenBLAS#51).

On Mac the issue actually manifests as a linker error (this is under Julia 0.5.2 with GCC 7.1.0 and OpenBLAS):

julia> Pkg.test("ParallelAccelerator")
[lots of stuff elided]
testing transpose...
Undefined symbols for architecture x86_64:
  "_cblas_domatcopy", referenced from:
      pptranspose_tp1169(j2c_array<double>&, j2c_array<double>*) in cgen_output71.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
OptFramework failed to optimize function TestTranspose.##transpose_t#1169 in optimization pass ParallelAccelerator.Driver.toCGen with error ErrorException("failed process: Process(`g++ -g -shared -fopenmp -std=c++11 -o /var/folders/jk/d5ymgqj577xdc5n_zcz6pzxr0000gq/T/tmpDPoGSE/libcgen_output71.so.1.0 /var/folders/jk/d5ymgqj577xdc5n_zcz6pzxr0000gq/T/tmpDPoGSE/cgen_output71.o -lblas -lm`, ProcessExited(1)) [1]")
Done testing transpose.
[etc.]

On Ubuntu it looks like a compiler error (this is under Julia 0.5.1 with GCC 5.4.0 and OpenBLAS):

julia> Pkg.test("ParallelAccelerator")
[lots of stuff elided]
testing transpose...
/tmp/tmp2b7M8Y/cgen_output71.cpp: In function ‘void pptranspose_tp1169(j2c_array<double>&, j2c_array<double>*)’:
/tmp/tmp2b7M8Y/cgen_output71.cpp:26:68: error: ‘cblas_domatcopy’ was not declared in this scope
              A.data, A.ARRAYSIZE(1), SSAValue0.data, A.ARRAYSIZE(2));
                                                                    ^
/tmp/tmp2b7M8Y/cgen_output71.cpp: In function ‘void pptranspose_tp1169_unaliased(j2c_array<double>&, j2c_array<double>*)’:
/tmp/tmp2b7M8Y/cgen_output71.cpp:37:68: error: ‘cblas_domatcopy’ was not declared in this scope
              A.data, A.ARRAYSIZE(1), SSAValue0.data, A.ARRAYSIZE(2));
                                                                    ^
OptFramework failed to optimize function TestTranspose.##transpose_t#1169 in optimization pass ParallelAccelerator.Driver.toCGen with error ErrorException("failed process: Process(`g++ -O3 -fopenmp -std=c++11 -g -fpic -c -o /tmp/tmp2b7M8Y/cgen_output71.o /tmp/tmp2b7M8Y/cgen_output71.cpp`, ProcessExited(1)) [1]")
Done testing transpose.
[etc.]

We should consider not generating code that uses domatcopy when MKL isn't available.

@lkuper
Copy link
Contributor Author

lkuper commented Jun 15, 2017

Here's what the error looks like on Travis (Travis Linux builds are now using OpenBLAS): https://travis-ci.org/IntelLabs/ParallelAccelerator.jl/jobs/243061897#L546-L554

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant