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

Building ngraph-bridge fails on command 'make -j8' #505

Closed
zap-wizard opened this issue Apr 24, 2020 · 2 comments
Closed

Building ngraph-bridge fails on command 'make -j8' #505

zap-wizard opened this issue Apr 24, 2020 · 2 comments

Comments

@zap-wizard
Copy link

zap-wizard commented Apr 24, 2020

I build ngraph-bridge with following command:
python build_ngtf.py --use_prebuilt_tensorflow --build_plaidml_backend

It runs for few hours, but then suddenly fails:

[ 96%] Linking CXX shared library ../../libcpu_backend.dylib
[ 96%] Built target cpu_backend
make: *** [all] Error 2
Traceback (most recent call last):
  File "build_ngtf.py", line 525, in <module>
    main()
  File "build_ngtf.py", line 402, in main
    build_ngraph(build_dir, ngraph_src_dir, ngraph_cmake_flags, verbosity)
  File "/Users/username/ngraph-bridge/tools/build_utils.py", line 93, in build_ngraph
    command_executor(cmd, verbose=True)
  File "/Users/username/ngraph-bridge/tools/build_utils.py", line 60, in command_executor
    raise Exception("Error running command: " + cmd)
Exception: Error running command: make -j8

What the command make -j8 should do? Why is it missing the target parameter?

I'm using MacOS X High Sierra 10.13.16

@zap-wizard zap-wizard changed the title How can I build to a conda environment? Building ngraph-bridge fails on command 'make -j8' Apr 25, 2020
@zap-wizard
Copy link
Author

zap-wizard commented Apr 25, 2020

Digging little further into the problem, I have now edited my build_utils.py file, so that its easier to debug.

Added Popen and PIPE to be imported from subprocess.
line=24

from subprocess import check_output, call, Popen, PIPE

Added the additional error message ( " Error: " + Popen(shlex.split(cmd), stdout=PIPE, stderr=PIPE).communicate()[1].decode('utf-8') ).
line=60

if (call(shlex.split(cmd), stdout=stdout, stderr=stderr) != 0):
        raise Exception("Error running command: " + cmd + " Error: " + Popen(shlex.split(cmd), stdout=PIPE, stderr=PIPE).communicate()[1].decode('utf-8'))

So now we can see why the command make -j8 fails.

Running the same command as before:
python build_ngtf.py --use_prebuilt_tensorflow --build_plaidml_backend

Again, it ran for a while, then got this error message:

[ 96%] Linking CXX shared library ../../libcpu_backend.dylib
[ 96%] Built target cpu_backend
make: *** [all] Error 2
Traceback (most recent call last):
  File "build_ngtf.py", line 525, in <module>
    main()
  File "build_ngtf.py", line 402, in main
    build_ngraph(build_dir, ngraph_src_dir, ngraph_cmake_flags, verbosity)
  File "/Users/username/ngraph-bridge/tools/build_utils.py", line 93, in build_ngraph
    command_executor(cmd, verbose=True)
  File "/Users/username/ngraph-bridge/tools/build_utils.py", line 60, in command_executor
    raise Exception("Error running command: " + cmd + " Error: " + Popen(shlex.split(cmd), stdout=PIPE, stderr=PIPE).communicate()[1].decode('utf-8'))
Exception: Error running command: make -j8 Error: /Users/username/ngraph-bridge/build_cmake/ngraph/src/ngraph/runtime/plaidml/plaidml_translate.cpp:105:13: warning: enumeration value 'PLAIDML_DATA_BFLOAT16' not handled in switch [-Wswitch]
    switch (dt)
            ^
/Users/username/ngraph-bridge/build_cmake/ngraph/src/ngraph/runtime/plaidml/plaidml_translate.cpp:105:13: note: add missing switch cases
    switch (dt)
            ^
/Users/username/ngraph-bridge/build_cmake/ngraph/src/ngraph/runtime/plaidml/plaidml_translate.cpp:124:1: error: control may reach end of non-void function [-Werror,-Wreturn-type]
}
^
1 warning and 1 error generated.
make[2]: *** [src/ngraph/runtime/plaidml/CMakeFiles/plaidml_backend.dir/plaidml_translate.cpp.o] Error 1
make[1]: *** [src/ngraph/runtime/plaidml/CMakeFiles/plaidml_backend.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2

It looks like the problem is with plaidml...

Any help is appreciated!

@zap-wizard
Copy link
Author

zap-wizard commented Apr 25, 2020

Now that I know this is a plaidml problem, I found out that this issue is a duplicate of #447. Also it seems like there's an solution there 😄

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

No branches or pull requests

1 participant