OpenCL Example Failing - c

I'm trying to go through the example at the below webpage:
https://github.com/KhronosGroup/OpenCL-Guide/blob/main/chapters/getting_started_linux.md
I know this example is for Ubuntu, but I used RHEL 8 and installed opencl-headers and ocl-icd-devel packages so it compiled fine, but I got
[19:25]ec2-user#ec2lm-0e2cec915$ ./HelloOpenCL
clGetPlatformIDs(-1001)
Anyone know what this code means? Could it be because I'm missing other drivers for openCL to interact with my CPU or GPU?

Related

Is there a way to use a tflite-runtime version higher than 2.5.0 on an armv7 development board

System information
Linux Ubuntu 18.04
armv7 board
python3.6
question description
I trained a model on my linux server (ubuntu18.04,Intel(R) Xeon(R) W-2145 CPU) and exported it to tflite mode, and the model on the server (tflite-runtime=2.10.0) works fine.
Now I want to run the model on an armv7 development board of zynq7000. The operating system running on my board version is ubuntu18.04, and python3.6 and tflite-runtime=2.5.0 is installed (2.5.0 seems is the highest version I can get on armv7), but when I run interpreter = tflite.Interpreter(model_path=my_model), it throws Segmentation fault (core dumped) error.
After my test, if I downgrade the tflite-runtime on my linux server to version 2.5.0, the same error will be thrown. So I think the reason for the error may be that the version of tflite-runtime is too low.
But I can't get a higher version of tflite-runtime on armv7 board, does anyone know a solution please?

Mplabx 5.15 on Ubuntu 18.04 can not use ICD 3

I keep getting this error with ICD 3 when attempting self test:
Could not connect to the selected hardware tool. Please make sure the tool is not being used by another project in MPLAB X.
The device works fine under Ubuntu 12.04. Mplab can see the ICD3 device because it gets the correct serial number. lsusb reports the same values that Mplab reports as well. I tried running Mplab as root and that made no difference - this is not a permissions problem.
I tried this solution: https://www.microchip.com/forums/m1051283.aspx but it did not work. I also tried to close all projects so I had in the projects bar, and got the same error.
I tried the udevadm as suggested by this comment: https://www.microchip.com/forums/m1083236.aspx an it shows Mplab is trying to talk to the ICD 3:
$ udevadm monitor --property
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent
KERNEL[3219.382129] bind /devices/pci0000:00/0000:00:16.2/usb3/3-1/3-1:1.0 (usb)
ACTION=bind
DEVPATH=/devices/pci0000:00/0000:00:16.2/usb3/3-1/3-1:1.0
DEVTYPE=usb_interface
DRIVER=usbfs
INTERFACE=255/0/0
MODALIAS=usb:v04D8p9009d0100dcFFdsc00dp00icFFisc00ip00in00
PRODUCT=4d8/9009/100
SEQNUM=3378
SUBSYSTEM=usb
TYPE=255/0/0
UDEV [3219.387110] bind /devices/pci0000:00/0000:00:16.2/usb3/3-1/3-1:1.0 (usb)
ACTION=bind
DEVPATH=/devices/pci0000:00/0000:00:16.2/usb3/3-1/3-1:1.0
DEVTYPE=usb_interface
DRIVER=usbfs
ID_USB_CLASS_FROM_DATABASE=Vendor Specific Class
ID_VENDOR_FROM_DATABASE=Microchip Technology, Inc.
INTERFACE=255/0/0
MODALIAS=usb:v04D8p9009d0100dcFFdsc00dp00icFFisc00ip00in00
PRODUCT=4d8/9009/100
SEQNUM=3378
SUBSYSTEM=usb
TYPE=255/0/0
USEC_INITIALIZED=3219386787
A few seconds later it unbinds. So far I'm just hearing crickets on the Microchip forum. Anyone else tried using ICD 3 under Ubuntu 18?
Mike
After much head beating, I found that there were a lot of .jar files in the microchip mplab directory. But Java was not installed on my version of Ubuntu. After installing openjdk (and placing the correct device for loop back) I got MPLAB to talk to the ICD 3.
I am really surprised this was not obvious. If you have any MPLAB problems under Ubuntu 18.04, check if java is installed! (sudo apt install default-jre)

How do I install Docker on an NVIDIA Tegra Jetson TK1 with a 32 bit ARM processor running Ubuntu 14.04?

Docker only supports 64 bit x86 Linux, but people have made images for the Raspberry Pi with a 32 bit ARM processor. Will these work with the TK1? I am new to Docker. I am trying to put Jupyterhub on my TK1 to take advantage of the GPU via Gnumpy package for Python.
I am trying to achieve something similar to your goal. However, I am "Work in Progress", so I will try to give my best, and I will come later to make some edits if needed.
First of all, there is a docker.io package (the official Docker package on Ubuntu distributions) at ports.ubuntu.com (which is the default on the Jetson Tegra K1). This means that you can apt-get install docker.io, but it won't work because the kernel is not ready for it.
I have heard that the kernel is quite limited, but fortunately there is a guy at the developer zone who has prepared some nice kernel:
https://devtalk.nvidia.com/default/topic/823132/-customkernel-the-grinch-21-3-3-for-jetson-tk1-developed/
For the last version (yesterday: 26 April 2015) there is an interesting thing:
Added Docker support: POSIX_MQUEUE, CGROUP_PERF, CFS_BANDWIDTH
... which should enable the docker. I have yet to test this last version, I plan to do it soon.

How to use bochs in ubuntu ?

I am making a simple operating system kernel and want to emulate it using bochs. Currently, I am using qemu as my emulator but want to switch over to bochs. I have downloaded and installed bochs in ubuntu but couldn't figure out a way to use it? Can anybody help me with that ? Any links or some way to get me started would be really helpful.
I needed the following .bochsrc run a minimal boot sector:
ata0-master: type=disk, path="main.img", mode=flat,
cylinders=1, heads=1, spt=1
boot: disk
display_library: sdl
megs: 128
More details at: https://stackoverflow.com/a/32871939/895245

Running a program compiled from clang+llvm on another machine

I am compiling a program through clang+llvm (version 3.1) and trying to run it on a computer which also has the same clang+llvm version. I'm compiling on Ubuntu 10, but the other computer where I'm trying to run has CentOS 5. There (in CentOS), I also encounter problems compiling through LLVM (a compiler pass is implemented in LLVM). That is why I thought about compiling on Ubuntu, take the exe from there and just run it on the CentOS machine.
However, when I try to do that, I get the following error.
./main: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by ./main)
./main: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./main)
How can I solve this. Please note that I do not have root accesses on that machine.
One solution would be to copy the library from your working Ubuntu machine to your CentOS machine. Put in your Home/Workdir/whereever(TM) and set your LD_PRELOAD variable to that library. But that can be quite tedious as it is possible that this is not the only library that is missing (and maybe libraries depend on other libraries, that you also need...).
This also only works, if both machines have the same architecture (e.g. it wont work if your ubuntu machine is 32 bit and your CentOS 64).
Centos 5 uses an older version of libstdc++ than Ubuntu 11.04 or 11.10, so can't use binaries from there.
Either compile on Centos 5, or find a older compile environment that does work. If you were using gcc, you could also investigate the LSB compiler environment.
Cross compilation is always a difficult issue. In your case you have different c++ library versions on the two machines. In case you do not need to do this often, I suggest you try and solve your compilation issue on CentOS. It's probably the easier way round.

Resources