MPI_Comm_create_group substitue in old versions of OpenMPI(1.6) - parallel-processing

I am trying to create a communicator over a group of ranks. In the newer versions of OpenMPI (after 1.7) this can be done using MPI_Comm_create_group.
Is there a method to do this same task in OpenMPI before 1.6?
Note: I cannot use MPI_Comm_create as all the ranks may not be able to call the function MPI_Comm_Create.

Related

When using FFTW in Julia can I link to a locally-compiled version of FFTW?

When I install Pkg.add("FFTW"), how does Julia link to FFTW? I guess it downloads a pre-compiled version because I didn't give it a path to link my local version and it didn't seem to take long enough to be compiling FFTW from source. Is that correct? If so, is there a way to set Julia to use a locally compiled and optimized version of FFTW? I ask because I have a simulation code with both a Julia and a C++ version, and the C++ one runs about 6-7x faster, even though I think both should be spending most of their time in FFTW calls. So I am wondering if the difference is that the Julia version is using a less well optimized build of FFTW.
Many Julia packages provide prebuilt libraries through the so called JLL. Julia also provides a mechanism to override these artifacts.
In particular, your ~/.julia/artifacts/Overrides.toml will look like
[f5851436-0d7a-5f13-b9de-f02708fd171a]
FFTW = "...."
where .... is the "prefix" where your FFTW is installed, i.e. the directory in which there is the lib/libfftw.... file. You can read more about overriding artifacts of JLL packages at https://juliapackaging.github.io/BinaryBuilder.jl/dev/jll/#Non-dev'ed-JLL-packages
If you happen to find that the slowdown is due to the different library, please do report it to https://github.com/JuliaPackaging/Yggdrasil/

Compile and use a custom version of libstdc++ as a regular user

I have to compile and run a modern program on a cluster with an outdated OS. The program employs some c++11 features and STL templates. The cluster's compiler toolchain (g++ v 4.4.7) supports almost all of c++11 features, but some important STL templates/classes are missing.
To make it work I'll have to either:
modify the program's source code, or
compile a newer version of STL library on a cluster and link against it instead of system-wide STL libs.
The 1'st route seems sub-optimal, because the program is currently in an active development by our lab, and it means we'll need to patch it by hand daily, or make a separate branch and regularly merge from trunk, or drop the support for c++11 features altogether.
So, is it possible to build a libstdc++ version that is newer than the one installed system-wide, and link against it? And if it is possible, how could it be done?

Which Boost package do I need for bpstl::allocator?

I have inherited some code which uses bpstl::allocator. Obviously, my predecessor had certain Boost libraries installed and I do not.
Which (Linux) package do I need to install in order for the code to compile?
I can't find a DoxyGen or other navigable Boost documentation online.
Likely, bpstl is just a namespace alias. If I were to guess, I'd say
boost pool
boost container
boost interprocess
There's not a wellknown library that uses bpstl as a namespace (not even obsolete, that I remember) so, in all likelihood, such aliases can be found in the adjacent code base (headers) next to that code you inherited. It's gonna take some archaeology, but grep your way to it!
On debian-like Linuxen, by far the easiest way to get some mainstream version of boost installed is by
sudo apt-get install libboost-all-dev
Boost "navigable" documentation online is here: http://www.boost.org/doc/libs/1_57_0

what does shared library .so.5 mean?

I have compile a shared library(libcurl). Finally I found it generated "libcurl.so.5".
".so" means a shared library. But what does the number 5 means?
How can I generate library without number 5? just like "libcurl.so"
Most fundamentally, it's simply a version number. If the version number increases from, say 5 to 6, then it's supposed to indicate that all previous programs that were linked against version 5 are binary-incompatible with version 6 and thus need to be recompiled. For example, if a function was removed from version 6 then clearly any application that used it wouldn't work any longer, so it's clearly unsafe for the application to automatically switch to the newer library version. Bug fixes to an existing function, on the other hand, wouldn't require that the application be recompiled or ported and thus it's safe to use the .5 version with dynamically loading even thought the application was compiled against "a previous version (which is, um, still 5)".
In practice it's a bit more messy, as different people use the version number in different ways (often increasing it when they really didn't need to).
The libtool project has a much more strict, and helpful, guide about when you should update the library version number.
In the end, you should not generate a library without the version number. It's a promise to your users about whether the library is binary compatible in the future or not.

Tutorial on building whole toolchain on CentOS

I am working on CentOS 6 machines, which has very old GCC/GlibC version. I want to build the whole glibc, binutils, gcc toolchain with latest or at least very recent versions in order to use c++11 support in latest gcc, and ld.gold in recent binutils, and possibly improvements in recent glibc.
I want to put the whole toolchain in some separate directory, and not to influence any existing system files. I also want to build gcc with --sys-root so that when using the gcc, I don't need to specify -I/some/directory/include and -L/some/directory/lib or whatever other parameters. Also the generated executable will automatically use the new ld-linux-xxxxx program loader which will automatically find the new libc.so.
Anyone knows if there exists some tutorial on this task?
The compiler is very dependent on glibc, altough you manage to build the compiler either in a chrooted system or equivalent, you will need to build also all libraries needed with the program you will build with this new compiler.
The best you can do is use a fresh new system (vm or whatever) or upgrade your existing one
You can download the latest toolchain from Openembedded or Yocto.
And here you don't have to do any package installation to your current system.
Just download the toolchain, source the environment and thats it you are ready to check the c++11 support.
The location to download the toolchain:
http://downloads.yoctoproject.org/releases/yocto/yocto-1.7/toolchain/ (Just select the architecture either 32bit or 64 bit based on your machine support)
If you need the latest toolchain, you'd better migrate to Fedora.
If you can't/won't, the best bet is to get the pieces as source RPMs for CentOS and Fedora, unpack them and fix up the CentOS by pilfering the sources and patches from Fedora, take care it doesn't overrule the system packages, correct versions and fix to install elsewhere (don't mess up your system too much! /usr/local comes to mind). The pieces are at least binutils, gcc.
I do not knwo Why you need this ? If this is needed that to compile for another computer, I would suggest using a virtual machine running the same OS as target. much more easier !!

Resources