Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The compiling failed with openblas #5522

Closed
qingqing01 opened this issue Nov 9, 2017 · 8 comments · Fixed by #5552 or #5567
Closed

The compiling failed with openblas #5522

qingqing01 opened this issue Nov 9, 2017 · 8 comments · Fixed by #5552 or #5567
Labels

Comments

@qingqing01
Copy link
Contributor

qingqing01 commented Nov 9, 2017

Error:

[ 98%] Built target softmax_with_cross_entropy_op
/home/xxx/.third_party/install/openblas/lib/libopenblas.a(memory.o): In function `openblas_fork_handler':
memory.c:(.text+0x190): undefined reference to `pthread_atfork'

From this link https://github.com/xianyi/OpenBLAS/wiki/faq :

It seems that needs to link the pthread library:

How to solve undefined reference errors when statically linking against libopenblas.a

On Linux, if OpenBLAS was compiled with threading support (USE_THREAD=1 by default), custom programs statically linked against libopenblas.a should also link to the pthread library e.g.:

gcc -static -I/opt/OpenBLAS/include -L/opt/OpenBLAS/lib -o my_program my_program.c -lopenblas -lpthread

@tensor-tang
Copy link
Contributor

tensor-tang commented Nov 9, 2017

I encounter the same issue

@luotao1
Copy link
Contributor

luotao1 commented Nov 9, 2017

@helinwang Do we need add openblas (WITH_MKLDNN=OFF WITH_MKLML=OFF WITH_GPU=OFF ) in our teamcity? Since this issue and #5523 are both compiled fail with openblas version.

Current CPU version in teamcity is WITH_MKLDNN=ON WITH_MKLML=ON.

@helinwang
Copy link
Contributor

helinwang commented Nov 9, 2017

@luotao1 sure, I can do that. But when I tried the following build command on the develop branch I got:

$ docker run --rm -i -v `pwd`/Paddle:/paddle -e WITH_GPU=OFF -e WITH_AVX=ON -e WITH_TESTING=OFF -e WITH_DEB=ON -e WITH_MKLDNN=OFF -e WITH_MKLML=OFF -e WITH_GOLANG=ON -e PADDLE_VERSION=0.10.0 -e RUN_TEST=OFF paddlepaddle/paddle:latest-dev
CMake Error at cmake/external/openblas.cmake:118 (IF):
  if given arguments:

    "EQUAL" "MKLML"

  Unknown arguments specified
Call Stack (most recent call first):
  CMakeLists.txt:123 (include)

Maybe we need to fix our develop branch first before it is turned on for every pull request CI (or perhaps I did not use the correct command)?

@tensor-tang
Copy link
Contributor

@helinwang that is the issue #5523 , and I gave a PR #5521 , you can help review it.

@NHZlX
Copy link
Contributor

NHZlX commented Nov 10, 2017

Is this error fixed? I meet the same problem..

@luotao1
Copy link
Contributor

luotao1 commented Nov 10, 2017

I am working on it, and don't fix it sucessfully.
The reason caused is 0ede2a7 and #5441
If I delete USE_NO_KERNEL_OP(fill_constant), I can build successfully. But the unit test fails.
@reyoung can you help to see it as well ?

@luotao1
Copy link
Contributor

luotao1 commented Nov 10, 2017

@helinwang This issue is fixed by #5552 , you could add openblas version in the teamcity. Thanks very much!

@helinwang
Copy link
Contributor

@luotao1 thanks! done.

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

Successfully merging a pull request may close this issue.

5 participants