Install gcc-9 on Coral Dev Board - google-coral

I want to install gcc-9 to run (E)XLA accelerated Linear Algebra on the CPU.
XLA requires GLIBCXX_3.4.26 which is only available for gcc > 8.
Debians testing package source does not seem to work, since it cannot find gcc-9 either.

Related

NVIDIA Nsight waring: OpenACC injection initialization failed. Is the PGI runtime version greater than 15.7?

I am trying to venture into accelerating my Fortran 2003 programs with OpenACC directives on my Ubuntu 18.04. workstation with Nvidia GeForce RTX 2070 card. To that end, I have installed Nvidia HPC-SDK version 20.7 which should comes with compilers I need (Fortran 2003 from Portland Group and Nvidia (both are version 20.7-0)) as well as profilers (nvprof and Nvidia Nsight Sytems (2020.3.1)).
After a few post-installation glitches, and owing mostly to the help from Robert Cravella (https://stackoverflow.com/users/1695960/robert-crovella) and Mat Colgrove (https://stackoverflow.com/users/3204484/mat-colgrove) I managed to get things going which made me very happy.
My workflow looks like this:
Compile my program:
pgfortran -acc -Minfo=accel -o my_program ./my_program.f90
I run it through profiler:
nsys profile ./my_program
And then import into nsight-sys with File -> Open and chose report1.qdrep
I believe this to be a proper workflow. However, while opening the report file, nsight-sys gives me the warning: "OpenACC injection initialization failed. Is the PGI runtime version greater than 15.7?" That's quite unfortunate, because I use OpenACC to accelerate my programs.
I am not quite sure what PGI runtime is, nor would I know how to check it or change it? I assume it is something with Portland Group (compiler), but I use the suite compilers shipped with Nvidia's HPC-SDK, so I wouldn't expect incompatibilities with the profiler tools shipped in the same package.
Is it an option, or possible at all, to update the PGI runtime thing?
And advice, please?
Cheers
Same answer as your previous post. There's a know issue with Nsight-Systems version 2020.3 which may sometimes cause an injection error when profiling OpenACC. I've been told that this was fixed in version 2020.4, hence the work around would be download and install 2020.4 or use a prior release.
https://developer.nvidia.com/nsight-systems
Version 2020.3 is what we shipped with the NVHPC 20.7 SDK. I'm not sure we have enough time to update to 2020.4 in our upcoming 20.9 release, but if not, we'll bundle it in a later release.
Thanks Mat,
In the meanwhile I managed to have everything running. I did as follows:
First installed CUDA toolkit, which came with the latest driver for my Nvidia RTX 2070 card, 11.1 to be precise. It needed a reboot, but that's OK. For CUDA toolkit to work, I had to set LD_LIBRARY_PATH to its libraries.
Then I installed Nvidia HPC-SDK, which I needed for Fortran 2003 compiler.
HPC-SDK is built for CUDA version 11.0 and comes with its own libraries and LD_LIBRARY_PATH should point to its libraries different from CUDA toolkit.
But, I kept the LD_LIBRARY_PATH to point to CUDA toolkit ones, and then compilers and profilers work in perfect harmony :-)
Thanks again, you and Robert helped me big time to get things running.

Raspberry Pi 4 with Buster Lite Chromium WebGL not hardware accelerated

Does anyone know how to get Chromium to be hardware accelerated for WebGL if you start with Buster Lite?
Hardware:
Raspberry Pi 4 w/ 2GB
Test1:
Buster w/ Desktop 2019-09-26
chrome://gpu shows WebGL: Hardware Accelerated and three.js renders fine and chromium shows minimal cpu usage.
Test2:
Buster Lite 2019-09-26
install:
$ sudo apt-get install --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox chromium-browser
Then make an auto start that launches chromium-browser and run $ startx.
chrome://gpu shows WebGL: software only, hardware acceleration unavailable and three.js renders very slowly. Chromium also shows > 200% cpu.
I think the issue might be related to mesa. In the 'desktop' version, chromium shows that it's using mesa, and the the 'lite' version, it does not. Mesa shows that it's installed on the 'lite' if I query for it in the console and I can run the gears demo on the 'lite' and it renders just fine.
I have the 'desktop' version implemented as a temporary solution, but I would really like to go back to using 'lite' with just chromium.
I installed libgl1-mesa-dri libgl1-mesa-glx libgles2 libgles2-mesa additionally and according to the chrome://gpu page HW acceleratated webgl become available.
Update:
I checked it second time, and it seems only libgles2 is enough to enable webGL HW acceleration

Using GPU in OpenCV

If I want to use my computer's GPU with OpenCV, is it necessary that I build OpenCV from source with CUDA enabled? Or can I install OpenCV with CUDA support via apt-get? I noticed the following 2 packages in apt-get:
libopencv-gpu-dev - development files for libopencv-gpu2.4v5
libopencv-gpu2.4v5 - computer vision GPU library
But I am not sure if these will work with OpenCV3 or if they are only compatible with OpenCV2. I know that the gpu module in Opencv2 was split up into multiple CUDA modules in OpenCV3.
Yes it is necessary that you build opencv from the source with CUDA option enabled. The apt-get packages won't work with OpenCV3 and above versions. I suggest you install the CUDA Toolkit first and then attempt installation of OpenCV or the GPU functions won't work.

How to install openCV 3.1 with full cuda toolkit support?

I am installing openCV 3.1 following this guide. However after running CMake I see the following output
NVIDIA CUDA
Use CUFFT: YES
Use CUBLAS: NO
USE NVCUVID: NO
NVIDIA GPU arch: 20 21 30 35
NVIDIA PTX archs: 30
Use fast math: NO
I see that CUBLAS, NVCUVID and fastmath is set to NO. But I have installed cuda toolkit 7.5, so I don't understand why is it still NO, and how can I make so to install with full gpu support?
I am using Ubuntu 16.04, OpenCV 3.1
The guide that you mentioned using does not appear to have a flag related to or set to turn on the fast math feature. As far as I am aware you need to specify this during the cuda toolkit build or it will not be included in the build.
For example if you are using NVCC you must use the --use_fast_math flag; as is indicated here. So it is likely that the CMAKE scripting doesn't have that flag set anywhere either.

Develop for stm32 on beaglebone

is it possible to compile stm32 code on beaglebone (possibly black)?
As it seems platform has to have access to arm-none-eabi-gcc to be able to compile for stm32?
Basically, yes you can.
In order to compile code for stm32 family of mcus you would need a cross-compiler. if you run linux on your beaglebone board you can simply download premade toolchain for your distribution. if you dont find any, you would just build a compiler from source by specifying host and target.
https://wiki.osdev.org/GCC_Cross-Compiler#Preparing_for_the_build this article will help you build a gcc cross compiler for every supported target and host. it takes less then 15 mins.
Few things to note here, once you build your cross compiler, you wont have any kind of libc shiped with it. so get one on github (there are few). your options would be libc or libc-nano (which talks for it self). And from there you will be able to compile code for your stm32 mcu.
For example i ran ubuntu server on my beaglebone black, so in order to compile for stm32 on that, i installed armv7-A gcc compiler, so i can compile for beaglebone it self. then i downloaded source at https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads compile the source and you will have an official arm toolchain for microcontrollers.

Resources