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

Output window freezes! #3

Open
smmmmi opened this issue Apr 15, 2018 · 2 comments
Open

Output window freezes! #3

smmmmi opened this issue Apr 15, 2018 · 2 comments

Comments

@smmmmi
Copy link

smmmmi commented Apr 15, 2018

On Ubuntu 16.04, after building, and using this command below the output window appears and freezes...

./PRiMEStereoMatch image -l "/media/mohammad/새 볼륨/STEREO/PRiMEStereoMatch/data/Art/view1.png" -r "/media/mohammad/새 볼륨/STEREO/PRiMEStereoMatch/data/Art/view5.png" -a STEREO_SGBM
./PRiMEStereoMatch: /usr/local/cuda/lib64/libOpenCL.so.1: no version information available (required by ./PRiMEStereoMatch)

OpenCL Platform Information:

  1. Device: GeForce GTX 1060 3GB
    1.0 Device Type: GPU
    1.1 Hardware version: OpenCL 1.2 CUDA
    1.2 Software version: 384.111
    1.3 OpenCL C version: OpenCL C 1.2
    1.4 Parallel compute units: 9
    1.5 Max Work Group Size: 0
    1.6 Max Work Item Dimensions: 3
    1.7 Max Global Memory Size: 3158900736
    1.8 Image Support?: Yes

Starting Stereo Matching Application.
Input Source: Images
Parsing command-specific arguments.
User Dataset filenames provided.
Image command arguments parsed.
Global arguments:
Matching Algorithm: STEREO_SGBM
Loading User as the default dataset.
Loaded Left: /media/mohammad/새 볼륨/STEREO/PRiMEStereoMatch/data/Art/view1.png
Loaded Right: /media/mohammad/새 볼륨/STEREO/PRiMEStereoMatch/data/Art/view5.png
Setting up pthreads function constructors
Setting up OpenCL Environment
Number of devices available of each type:
CL_DEVICE_TYPE_CPU: 0
CL_DEVICE_TYPE_GPU: 1
CL_DEVICE_TYPE_ACCELERATOR: 0
Setting up OpenCL function constructors
Build log:

CVC_cl: OpenCL kernels created.
Build log:

CVF_cl: OpenCL kernel versions created in context.
Allocated OpenCL Buffers
Build log:

DispSel_cl: OpenCL kernels created.
Construction Complete
End of Preprocessing
StereoMatch Application Initialised
HCI: Error threshold set to 4.
DE Time: 49.15 ms
DE Time: 49.15 ms

image

BTW runninag as sudo since it gives OpenCL error: CL_OUT_OF_RESOURCES error if not.

@CLeechELEC
Copy link
Collaborator

CLeechELEC commented Apr 17, 2018

Thank you for raising this issue, it is not one that I have come across before.
Is the bug repeatable or not?
Passing -a STEREO_SGBM as the algorithm makes the program use the OpenCV stereosgbm functions. This version does not have thread control or an explicit opencl implementation (stereosgbm may still use the GPU, through the TAPI, depending on how you have installed OpenCV).

I am working on an improved OpenCL implementation of the CVF at the moment, to solve the CL_OUT_OF_RESOURCES error and improve the execution time.
You shouldn't need to run with sudo. This may be just be masking the same problem and causing the program to crash. By using sudo you are just giving it permission to allocate memory where it shouldn't.
However, I can say for certain whetehr this is the source of the bug,
In the meantime, you can hard code the construction of sm to only use the pthread functions by passing 0 to the gotOpenCLDev field: StereoMatch *sm = new StereoMatch(argc, argv, 0);
This will stop the OpenCL compiler and OpenCL functions from being run.

@smmmmi
Copy link
Author

smmmmi commented Apr 26, 2018

Thanks for replying.
No difference without sudo. I reinstalled ubuntu (for another reason) and same error came up no CL_OUT_OF_RESOURCES this time, however:

1-Passing -a STEREO_SGBM gave the same error. (without sudo)
2-Passing -a STEREO_GIF gave the same things plus the ones pasted below: (without sudo)

HCI: Error threshold set to 4.
Here
Here
Here
Here
OpenCL error: CL_INVALID_COMMAND_QUEUE
Failed waiting for kernel execution to finish. /media/mohammad/E/NewVolume/STEREO/PRiMEStereoMatch/src/CVF_cl.cpp:312
Segmentation fault (core dumped)

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