Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
6059 Discussions

Docker Openvino c++ compiled code throws bad allocation

ashleysmart
Beginner
335 Views

Hi,

I downloaded the current windows docker distrubtion of the openvino toolkit and then using choco installed MSBuild, and cmake(and a few other parts like gtest and boost). Once done I created a basic cmake file with some tests ie:

#pragma warning(push, 0)
#include <inference_engine.hpp>
#include <opencv2/opencv.hpp>
#pragma warning(pop)

#include <gtest/gtest.h>

TEST(ThirdParty, OpenCVIsAlive)
{
    std::string opencvInfo =
        cv::getBuildInformation();
    ASSERT_TRUE(opencvInfo.size() > 0);
}

TEST(ThirdParty, InferenceEngineIsAlive)
{
    EXPECT_NO_THROW({
            InferenceEngine::Core core;
        });
}

Much to my alarm the 'InferenceEngine::Core core;' line actually throws a "bad alloaction" execption and the 'cv::getBuildInformation();' aborts(i think).. 

 

Can anyone explain what i have done wrong? It seems i cant build and link c++ againest the docker installed openvino toolkit?? 

 

Thanks in advance,
Ash

 

0 Kudos
3 Replies
ashleysmart
Beginner
333 Views

For more background: my cmakelist.txt links the opencv and inference engine etc using these lines

 

set(INTEL_OPENVINO_DIR $ENV{INTEL_OPENVINO_DIR})
set(ngraph_DIR ${INTEL_OPENVINO_DIR}\\deployment_tools\\ngraph\\cmake)
set(InferenceEngine_DIR ${INTEL_OPENVINO_DIR}\\deployment_tools\\inference_engine\\share)
set(TBB_DIR ${INTEL_OPENVINO_DIR}\\windows\\inference_engine\\external\\tbb\\cmake)
set(OpenCV_DIR ${INTEL_OPENVINO_DIR}\\opencv\\cmake)

 

Iffa_Intel
Moderator
309 Views

Hi,

 

I did a quick check to verify the OpenVINO IECore import inside the docker. 

If everything had been set up properly, it should work without any error prompted (whether in C++ or Python).

You may refer to my attachments.

 

Any chance that you forgot to run the setupvars.bat?. This initialization script is the one that would link the OpenVINO libraries altogether.

 

 

Sincerely,

Iffa

Iffa_Intel
Moderator
281 Views

Greetings,


Intel will no longer monitor this thread since we have provided a solution. If you need any additional information from Intel, please submit a new question. 



Sincerely,

Iffa


Reply