Parallel STL algorithms requiring tbb or not? - g++

I remember that g++ 9.3.0 required to link against libtbb to use parallel STL algorithms, otherwise it gave compilation errors. I have a docker container using an ubuntu image where I have installed g++-10 only and I can use the algorithms without writing -ltbb. How can I explain this? I searched everywhere and there is no libtbb anywhere, so I am assuming g++-10 no longer needs it? Where can I read some documentation about this fact that it does not need it or is required up to version x.x.x? Thanks for clarifying.

Related

WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions

I was trying to install pymc3 with Miniconda in Windows. The installation was certainly non-trivial and took me many hours of trouble-shooting to understand what is going on.
I have read many posts from different people on this question and found this guide to be quite helpful:
pymc3 installation guide in Windows
After following through the steps recommended here, I still came across the warning when importing pymc3 as pm in a jupyter-notebook:
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
Below are some solutions that I have tested and did not work to remove this warning:
conda install -c conda forge libpython blas mkl-service m2w64-toolchain in addition to the packages bundled with pymc3 (theano-pymc3 and arviz) in the first conda environment.
Downloaded GCC compiler and make sure it is on the global path in the correct order as suggested by the first guideline and the official guideline Official pymc3 installation in the second conda environment and installed without m2w64-toolchain.
I have also tried using the GCC compiler from Rtools and updated the path in the environment variable in the 3rd conda environment.
I think I have exhausted all the different options I have read and still didn't manage to remove this warning. Is there anything that I have missed out in trouble-shooting this warning?
I understand that this warning doesn't stop the computation, and would only affect the computational performance. Because I have quite a large dataset, I would certainly appreciate a feasible solution to fix this problem :)
Thank you for any feedback!
According to https://zhuanlan.zhihu.com/p/394033647
to create .theanorc.txt
may solve this problem

What do valgrind additional packages do?

When I installed valgrind, it suggested to install also the following packages:
valgrind-dbg valgrind-mpi kcachegrind alleyoop valkyrie
Can somebody explain, in plain English, what each of them for?
I am assuming you're running debian or a debian-based distribution, such as ubuntu, so a quick visit to debian package archive will give us some basic information about these packages.
In summary, most of those are tools that help processing valgrind output.
valgrind-dbg contains the debug symbols for valgrind. Useful to pinpoint a problem with valgrind itself in the case it crashes. Check debian documentation for more details. Also this answer might be useful.
valgrind-mpi is a helper library for profiling/debugging applications that use the MPI api. If your application does not use it, it's likely irrelevant for you.
valkyrie is a graphical tool for parsing and analysing the output of memcheck (valgrind is composed of several tools, and memcheck is one of them). It will show the memory errors detected by memcheck alongside the code that generated them.
alleyoop seems to do the same thing as valkyrie but with a different, GNOME based, interface.
kcachegrind is a graphical tool for parsing and visualisation of the output of the callgrind tool, another tool of the valgrind suite.
There's likely other graphical tools for parsing valgrind output in a variaty of formats, these are just the ones that apt recommends installing.

SCIP-SDP through Matlab

I am I trying to install SCIP-SDP. As I am not a Linux user, I have found the instructions for installing SCIP very confusing, and have not managed to install it.
I have then chosen to use SCIP through Matlab by using Opti. I have managed to solve some LPs with SCIP through Opti. Is it possible to use SCIP-SDP through Opti? If so, could you please give me some guidelines on how to do it?
There exists an interface from the optitoolbox to SCIP-SDP, but this is quite old and will only work with SCIP-SDP 1.0, but since I haven't used the toolbox myself, I can't give you any more details. There is also the possibility to use SCIP-SDP via the neos-server, but this is also only SCIP-SDP 2.0 (and you should give a settings file, since the default settings are sometimes a little bit strange). For the most current version, you will unfortunately need to install it through the console, and this is really only tested on Linux. Perhaps you could try to use a virtual machine? If there are any specific problems with installing SCIP or SCIP-SDP (preferably on Linux), then feel free to ask, either here or via mail.

Docker images with architecture optimisation?

Some libraries such as BLAS/LAPACK or certain optimisation libraries get optimised for the local machine architecture upon compilation time. Lets take OpenBlas as an example. There exist two ways to create a Docker container with OpenBlas:
Use a Dockerfile in which you specify a git clone of the OpenBlas library together with all necessary compilation flags and build commands.
Pull and run someone else's image of Ubuntu + OpenBlas from the Docker Hub.
Option (1) guarantees that OpenBlas is build and optimised for your machine. What about option (2)? As a Docker novice, I see images as something fixed and static, so running this image would not be optimised to my machine (which might be AMD-based instead of the maintainer's Intel CPU). What left me confused is that the image ipython/scipyserver does clone the latest OpenBlas master from Github during build.
I seem to misunderstand the concept of Docker images and/or automated builds, and I would very much appreciate a clarification.
No, I think you're pretty much right.
The image you link to is an automated build, so OpenBlas will be getting compiled using the kernel and architecture of the Docker build server. I did notice the build script sets the following flags when building OpenBlas:
DYNAMIC_ARCH=1 NO_AFFINITY=1 NUM_THREADS=32
Which presumably makes the install portable at a performance cost. An alternative would be to have a separate image for various build configurations.

Cygwin & OCaml: OPAM + Batteries

I extensively use Cygwin on a Windows 8 environment (I do not want to go ahead and boot/load Linux directly on the machine). I use the OCamlIDE plug-in for Eclipse and have experienced relatively no problems using this workflow setup.
However, I would like to use Batteries so that I may make use of use of its dynamic arrays among a few other interesting features that will speed up my development process.
I have tried this method: http://ocaml.org/install.html, but I get the following error:
$ sh ./opam_installer.sh /usr/local/bin
No file yet for i686:CYGWIN_NT-6.2-WOW64
What am I missing and how would I configure Cygwin so that it can accept the Opam installer? When I tried yet a different way of building Opam, I got:
'i686-w64-mingw32-gcc' is not recognized as an internal or external command,
as a Makefile error and reason for building failure. It seems something is wrong related to mingw32-gcc, what do I need to install and/or configure for my Cygwin to get it to compile/build things properly. I have wget and curl installed as well.
My overall question: What is the best way to get Batteries installed on my system with the minimum of time spent tracing all of its dependencies by hand? Is there a way I can just build the library module, such as BatDynArray and the includes:
include BatEnum.Enumerable
include BatInterfaces.Mappable
That way I can just call them directly in my code with open...;; and/or include...;;;
OCaml works beautifully on Windows with WODI, which is a Cygwin-based distribution that includes Batteries and tons of other useful packages (which are a pain to install manually on Windows).
I urge you to take a shot at WODI, which I believe to be an indispensable tool for the
rest of us, the forgotten souls, who have to deal with Windows.
First of all, include does not do what you think it does. open Batteries should be exactly what you're looking for. OPAM is not yet solid on windows (maybe Thomas could give an update on where things stand).
Frankly, I would recommend to install a linux on a VM, you should be able to get started with OPAM instantly then. Otherwise, take a look at this package manager for OCaml which focuses on cross platform support: http://yypkg.forge.ocamlcore.org/. I've never tried it myself however. The last package manger you could try is GODI, I'm not sure about its windows support though.
Finally, if none of these options work then it should be possible to install batteries from the source. All you need is OCaml and make. And if there are problems with this approach then you should definitely follow up on them either here or on the bug tracker because batteries does intend to support windows AFAIK.