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

Out of memory error during build #54

Closed
remiruzn opened this issue Apr 12, 2021 · 3 comments
Closed

Out of memory error during build #54

remiruzn opened this issue Apr 12, 2021 · 3 comments

Comments

@remiruzn
Copy link

How can i install openCV with cuda support on Jetson nano with 16 gb sd card inside? If i try use script not enough memory error appear.

@mdegans mdegans changed the title Jetson nano 16 gb sd card. Out of memory error during build Apr 12, 2021
@mdegans
Copy link
Owner

mdegans commented Apr 12, 2021

Try building without the gui on. To switch to the command line:

Temporary:

sudo systemctl isolate multi-user.target

Persistent across reboots:

sudo systemctl set-default multi-user.target

Once the build is done, just substitute graphical.target instead of multi-user.target to go back.

@remiruzn
Copy link
Author

remiruzn commented Apr 13, 2021

`
[ 43%] Built target opencv_alphamat
[ 43%] Linking CXX shared library ../../lib/libopencv_cudafilters.so
[ 45%] Built target opencv_cudafilters
[ 46%] Building NVCC (Device) object modules/cudaimgproc/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_bilateral_filter.cu.o
: fatal error: when writing output to /tmp/tmpxft_000078b9_00000000-5_bilateral_filter.cpp4.ii: No space left on device
compilation terminated.
CMake Error at cuda_compile_1_generated_bilateral_filter.cu.o.RELEASE.cmake:221 (message):
Error generating
/tmp/build_opencv/opencv/build/modules/cudaimgproc/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_bilateral_filter.cu.o

modules/cudaimgproc/CMakeFiles/opencv_cudaimgproc.dir/build.make:337: recipe for target 'modules/cudaimgproc/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_bilateral_filter.cu.o' failed
make[2]: *** [modules/cudaimgproc/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_bilateral_filter.cu.o] Error 1
CMakeFiles/Makefile2:3695: recipe for target 'modules/cudaimgproc/CMakeFiles/opencv_cudaimgproc.dir/all' failed
make[1]: *** [modules/cudaimgproc/CMakeFiles/opencv_cudaimgproc.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
Do you wish to remove temporary build files in /tmp/build_opencv ?
`
Building without gui.
Can i build jetson with 16 gb sd card inside from flash card pluged in usb port?

@mdegans
Copy link
Owner

mdegans commented May 27, 2021

@remiruzn

You could add a swap file on an external disk, even usb, sure, but it will probably build slower than just turning the GUI off temporarily. Swap is slow on fast SSDs. MicroSD cards are generally even slower than spinning disks, so it'll probably hurt performance if you set that up.

@mdegans mdegans closed this as completed May 27, 2021
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

2 participants