Code for Tensorrt runs okay in px2 but fails to initialize in qnx

The failure information in qnx says:

Process 8314966 (nvmipp_raw) terminated SIGSEGV code=1 fltno=11 ip=000000007995f288(/usr/local/cuda-10.0/lib/libnvparsers.so.4.1.4@_ZN11CaffeParser5parseEPKcS1_RN8nvinfer118INetworkDefinitionENS2_8DataTypeE+0x0000000000000058) mapaddr=00000000000bc288. ref=0000000000000088
Memory fault (core dumped)

In my program, the tensorrt accelerated neural net is created, after which the following piece is executed:

ICaffeParser *parser = createCaffeParser();
IBinaryProtoBlob *mean_blob = parser->parseBinaryProto(mean_file.c_str());
parser->destroy();
memcpy(data,mean_blob->getData(),width_*height_*num_channels_*sizeof(float));
mean_blob->destroy();

Some notes about the whole program:
The whole program will create 3 tensorrt entities to do inference in 3 neural nets. I create the first neural net, and then use the former code to read the binary mean file. Then I create two other neural nets using tensorrt.

Please help me ^*^.

Sorry, I didn’t post the issue in standard form…

Hardware: qnx
GPU: CUDA 10.0
Tensorrt: 2.0

If someone needs a example code for this issue, I’d like to upload one. Thanks

Hello,

To help us debug, can you upload or DM me a repro package of your project?

Thanks.
NVIDIA ENTERPRISE SUPPORT

Thanks for your kind reply. I’ve solved this problem. And I find the bug: The tensorrt version are different in qnx and px2. However, I build the program with the same NvInfer.h NvCaffeParser.h header files, which is wrong since the px2’s tensorrt is v2 and qnx’s tensorrt is v4.

Deshun