How to make mpi4py to use MPI Version 3.0 - mpi

I have recently installed mpi4py version 2.0.0 for python3. I want this API to use MPI version 3.0, but by default it is using MPI version 2.0. How can I make it use MPI version 3.0.
PS: I installed mpi4py using "pip3 install mpi4py".

mpi4py is merely a wrapper for you to call MPI functions in Python. Those MPI functions (and the version of the MPI standard implemented) are provided by the MPI implementation (e.g. openmpi or mpich) you installed on your machine, not mpi4py.
So what you need to do:
Make sure you have installed a proper MPI implementation which supports/implements MPI standard 3
Make sure mpi4py selects that implementation, which is usually been done by changing that MPI implementation to the default one (or you can simply remove all other MPI implementations you installed)
Make sure mpi4py works properly with that MPI implementation (usually by rebuilding and reinstalling mpi4py)
I'm not sure about before, but at least openmpi 2.1.1 support MPI 3.

Related

installing OpenMPI or MPICH2 in MSYS2-MinGW

I want to use any of the FLOSS implementations of MPI (i.e., OpenMPI or MPICH2) with my MSYS-MinGW environment and compilers. Please consider that I'm aware of the Microsoft MPI SDK mingw64/mingw-w64-x86_64-msmpi which you may find with
pacman -Ss msmpi
and install with
pacman -S msmpi
but I want to know if I can install any of the open-source implementations. I tried searching
pacman -Ss mpi
but there are too many results to check manually, and openmpi or mpich2 search queries do not return any results. So my questions are:
are any of the FLOSS implementations of MPI shipped with MinGW or MSYS2
if not how one can install them?
P.S.1. Cygwin does have some openmpi related packages, so it is a wonder why MSYS2, AFIK being a Cygwin fork, doesn't!
P.S.2. MPICH2 binaries are available here but they are way way behind the latest builds for other platforms. That's just sad!
P.S.3. Surprise that Microsoft's MPI implementation is actually open-source! It seems to be a fork of MPICH or at least compatible with it.
MSYS2's main objective is to provide you with an environment to build native Windows applications.
As such, it's natural that it will export bindings to the native Microsoft MPI implementation, while not providing ports of other MPI implementations such as OpenMPI or MPICH which have dependencies on a full POSIX layer.
From How does MSYS2 differ from Cygwin:
MSYS2 tries to provide an environment for building native Windows software. MSYS2 provides a large collection of packages containing such software, and libraries for their development. As a large portion of the software uses GNU build tools which are tightly coupled to the unix world, this environment is also POSIX-compatible, and is in fact based on Cygwin.
Cygwin tries to bring a POSIX-compatible environment to Windows so that most software that runs on unices will build and run on Cygwin without any significant modifications. Cygwin provides a large collection of packages containing such software, and libraries for their development.
There are more details on that page on how MSYS2 leverages Cygwin and a POSIX-compatible layer mainly to offer ports of tools needed in a build environment, mainly to support POSIX-like build systems (such as autoconf, make, meson, etc.), while mainly aiming at exposing these tools to support building Windows native binaries and porting applications to run natively on Windows.

Julia wrapper for Cuba and fork on Windows?

According to its developer, the Cuba library (for numerical integration) will not run(?) on a Windows machine since the OS is missing the function fork(2).
Windows users: Cuba 3 and up uses fork(2) to parallelize the execution threads. This POSIX function is not part of the Windows API, however, and is furthermore used in an essential way such that it cannot be worked around simply with CreateProcess etc. The only feasible emulation seems to be available through Cygwin.
See [http://www.feynarts.de/cuba/][1].
Since Cuba.jl is just a wrapper for the Cuba library, does this mean that Windows users must install Cygwin in order to use this Julia package?
You don't have to install Cygwin to use Cuba.jl, a normal Windows system is sufficient. The package is tested on AppVeyor without any problem

How to use cl2.hpp with AMD GPU and rocm

I've been developing with OpenCL on my Laptop for a while now, but want to move to my more powerful desktop pc with an AMD GPU. I followed the breadcrumbs through APP SDK (which is apparently gone) through amdgpu-pro drivers (which completely crash my system) and landed on rocm. I can't install the drivers on my kernel, but the rocm-dev seems to work fine. Unfortunately I can't seem to be able to use Khronos' cl2.hpp anymore, as it doesn't seem tk link to any cl calls. I would like to still be able to work with the Intel CPU on my laptop without completely rewriting my code. Is it possible to easily integrate cl2.hpp into my rocm installation?
Found it. I wasn't linking against the libOpenCL.so correctly. I am using cmake and set OpenCL_LIBRARY to the amdgpu-pro lib directory rather than the actual library file. Apparently FIND (OpenCL) doesn't work with the /opt paths rocm and amdgpu provide.

Can iarbuild run in parallel mode?

I am using iarbuild in command line to build my projects on a 8-core PC. The build speed is quite slow and it smells the multicore PC's is not fully utilized. Is there a build option that can make the build running in parallel mode? (Like in GNU make, there is a -j option)
I had an email from IAR last week
New version of IAR Embedded Workbench for ARM
Version 7.40 is now available
• Parallel build
The compiler can now run in several parallel processes to better use the available processor cores in the PC. To control parallel build, choose Tools>Options>Project>Enable parallel build.
I believe that this is also becoming available for other targets as I have seen similar for the MSP430.

gethostname() function missing in openMPI

I had to replace mpich2 with OpenMPI due to dependency of OpenFOAM on OpenMPI.
Earlier (when using mpich2) in my code I was using gethostname() function to get the name of the machine for debugging purpose. However this function does not seem to be a standard MPI function, and is not working anymore with OpenMPI libraries. Is there any other function for getting the host name in OpenMPI, or MPI standard? I am using mpicc for compiling and mpirun for running the code.
Thanks,
Sourabh
gethostname() is defined in unistd.h that was included by mpi.h, in the previous version. That's not a feature you should rely on, since you should always explicitly include the files which define the symbols you use. Clearly you were relying on it without realizing.
However if your MPI code is supposed to run on POSIX systems only, its safe to add
#include <unistd.h>
gethostname() is POSIX2001.1 standard.
However the MPI portable solution is MPI_Get_processor_name() as shown in the comment by High Performance Mark

Resources