[intelmpi]
mpi_dir = $(I_MPI_ROOT)\intel64
mpicc = %(mpi_dir)s\bin\mpicc.bat
mpicxx = %(mpi_dir)s\bin\mpicxx.bat
include_dirs = %(mpi_dir)s\include
libraries = impi.lib
library_dirs = %(mpi_dir)s\lib
python setup.py build --mpi=intelmpi
I'm trying to build mpi4py with Intel MPI on Windows 10.
I first tried to install with pip but the installation kept defaulting to MSMPI, even though I removed it entirely.
I also tried passing "MPICC=" flag. This didn't help either.So I cloned the repo from bitbucket and I'm trying to build using setup. I added the following block to mpi.cfg:
[intelmpi]
mpi_dir = $(I_MPI_ROOT)\intel64
mpicc = %(mpi_dir)s\bin\mpicc.bat
mpicxx = %(mpi_dir)s\bin\mpicxx.bat
include_dirs = %(mpi_dir)s\include
libraries = impi.lib
library_dirs = %(mpi_dir)s\libwhere I_MPI_ROOT evaluates to the location of intel MPI on my system.I called:Building fails. Checking the errors, there's a couple of things that catch my eye.
python setup.py build --mpi=intelmpi
First, the mpi compiler wrappers are not found:
error: $(I_MPI_ROOT)\intel64\bin\mpicc.bat' not found
error: '$(I_MPI_ROOT)\intel64\bin\mpicxx.bat' not found
I checked, the paths are correct. Using the full absolute path rather than $(I_MPI_ROOT) didn't help.
The script continues anyway, trying to build dependencies using the Visual C compiler on my system. Not sure if that is normal or a result from not finding the MPI compilers. Anyway, it fails on the first library, since library "lmpe.lib", cannot be found. Is this library supposed to be included with the MPI distribution?
Thanks for your reply. I dove into it and found a few issues related to distutil functions.First, the split_quoted() function doesn't handle backslash path separators. It works fine with forward slashes. Second, the find_executable() function only finds .exe files, nothing else. This is a very old issue.I modified find_exe() in mpiconfig.py to fix the second problem. Now the compiler wrappers are recognized but still the MSVC compiler is used.
Looking at the documentation for compilers in distutils, it seems that solving this would either require creating a subclass for intel compilers, or manually specifying the compiler options, like you suggested.
Instead I downloaded and installed Intel distribution for Python. This includes a version of mpi4py built with Intel compilers, which works out of the box (unrelated problems aside).
Still, since I don't like being tied to specific distribution, maybe I'll try to fix the problems at some point in the future.
[intelmpi]
mpi_dir = $I_MPI_ROOT/intel64
include_dirs = %(mpi_dir)s/include
libraries = impi
library_dirs = %(mpi_dir)s/lib/release
An addition:The argument --mpi cannot be passed to setup.py with the "install" command. As a result, setup will default to MSMPI if it finds this, and rebuild if necessary. It seems the only way to install with Intel MPI is to remove MSMPI from the system.
Co-authored-by: Maarten Braakhekke <maarten....@gmail.com>
Sure I'd be happy to help out. However, I've passed the point where I can keep doing this in the boss' time ;-), so it'll be a bit slower. I'll get back to you.
There is no directory $I_MPI_ROOT/intel32 on my system. During the installation it is suggested that libraries for 32bit would also be installed, but I can't find them. I'll look into it because I also want to be able to build for 32bit.
I finally got around to trying building with the settings you posted. As we discussed previously there is no intel32 directory. The last version of Intel MPI to support 32bit is 4.1 and this is not available for download any more. See my post on the Intel forum.W.r.t. 64bit, the [intelmpi-windows-64bit] section you posted contained a typo--"intel32" should "intel64". Fixing that, it builds fine with passing --mpi=intelmpi. I also tried replacing the forward slashes with backward--this works too. I guess backward slashes are only an issue for specifying the compiler.
Fine with adding my name to the Git commit message--thanks.
If you have a version that searches for the $I_MPI_ROOT env variable I can test it. I think this variable added with the installation. I can check this.
Both of the commands work.I've never encountered the abbreviation "impi" before, so it might not be immediately obvious to people that it's Intel. But it's not a big deal--up to you.
Regarding the %I_MPI_ROOT% variable, there's an option "Intel MPI Environment Variables" (or something). I assume this needs to be selected to set it. But this is the case by default.
Let's go for intelmpi. A google search for "impi" resulted in one page on Intel MPI in the first 6 pages.
--
You received this message because you are subscribed to the Google Groups "mpi4py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpi4py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mpi4py/86e5e762-c0d8-4a0c-8283-ad6924ea6a08n%40googlegroups.com.
With both build commands ("impi" replaced by "intelmpi" for the first) mpi4py builds fine.
However, the optional libraries do not build. This was previously also the case but I forgot to mention this. I assume this is OK but I though I'd mention it anyway.