Hi, Francois.
Disclaimer: my Windows expertise is almost NULL. Any
comments/suggestions from your Windows-user perspective will be highly
appreciated.
> I am trying to build mpi4py on windows, but I can't find any mpi C
> compiler on windows. After installing MPICH2, I do not get any mpicc
> in the bin directory, and I can barely find topics on internet that
> mention mpicc on windows.
>
These 'mpicc' compiler wrappers are not available on Windows, then we
have to "manually" pass include dirs, libraries, and library dirs...
And you should be able to use either MSVC or MinGW ...
> If mpicc indeed does not exist on windows, is there an alternate way
> of building and installing mpi4py on windows ?
Of course, and it is more or less straightforward, as described below...
>
> Any help is greatly appreciated.
> Best,
>
Look at the mpi.cfg file, it should have a section like this:
[mpich2_win]
mpi_dir = $ProgramFiles\MPICH2
include_dirs = %(mpi_dir)s\include
libraries = mpi
library_dirs = %(mpi_dir)s\lib
If you installed MPICH2 in the standard location (i.e, "C:\Program
Files"), that's enough... if not, you have to adjust it...
BTW, this is documented at
http://mpi4py.scipy.org/docs/usrman/install.html#building . This way
is rather general and OS-agnostic, perhaps these docs should have a
more specific instructions for POSIX / OS X / Windows. Contributions
welcome!
Now, all you need to do:
$ python setup.py build --mpi=mpich2_win
After that, you could install system-wide:
$ python setup.py install
or install just for your user if you have Python 2.6
$ python setup.py install --user
of perhaps make a binary MSI installer to make it easy to install
mpi4py in other machines/nodes using 'msiexec' in a batch file (never
used it, google for it):
$ python setup.py bdist_msi
of make an older-format, legacy binary installer:
$ python setup.py bdist_wininst
I think is easy enough, and you have fairly many options for the install step.
PS: In case of trouble, keep comming.
Regards
--
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
I have exactly the same problem in a Dell notebook at home with Vista.
> My machine is an Intel quad core with vista 32bit on it. I see there are a
> few issues discussed on the web about how vista has a pretty tightened
> security, and I had to disable some administrator things in the user
> settings in order to get mpiexec to be able to connect to my computer.
My user has admin rights, but I cannot make all work out of the box.
First I have to open a console with admin privs, next execute "smpd
-stop", next 'smpd -start'... After that, I'm able to use mpiexec...
I've decided to NOT disable security stuff in Vista, just because I do
not trust MS a single bit, Win always had and have a lot of holes, and
I do not want to get my system hacked when my girlfriend visit a
random website or click on an "Accept" button she should not have to
:-)...
>I really have no idea, sorry...
> Could that be a similar issue ?
>
OK.. Wait a minute... I never ever tried mpi4py inside cygwin.
>>
>> Mmm.. then yes, it should be a issue with raise SystemExit and the
>> automatic call to MPI_Finalize()... Could you try my previous
>> suggestion?
>>
> I tried using the following syntax, but in vain.
> if rank==0:
> M = np.zeros([h,w], dtype='i')
> M[indices, :] = cdata
>
> from matplotlib import pyplot as plt
> plt.figure(rank)
> plt.imshow(M, aspect='equal')
> plt.spectral()
> plt.show()
> comm.Barrier()
> When I abort manually, the three other processes do not say anything, while
> proc 0 mentions 'mpiexec aborting job'... When I used raise SystemExit, it
> would do the same thing.
Mmm... this is very strange... Can plot in sequential outside cygwin?
>
> Did the plots work on your laptop with vista ?
>
I never made any plotting with matplotlib on XP/Vista, whatever WinDog...
>
> As far as security, all I disabled was the
> screen going dark all the time in order to ask the administrator (i.e. the
> same person !) if he agrees with the user's decision; I believe softwares
> that are not completely up-to-date with win's new security barriers might
> not do it and therefore might hang.... however the firewall is still turned
> on for sure.
>
Mmm... I still fail to see you issues related to a security problem...
Once mpiexec started the parallel run and the first MPI communication
call success, all should work.
AFAIK, python.exe should be the only executable involved... Just in
case, you could try authorize any other exe you may have in
C:\Python2X
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "mpi4py" group.
To post to this group, send email to mpi...@googlegroups.com
To unsubscribe from this group, send email to mpi4py+un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mpi4py?hl=en
-~----------~----~----~----~------~----~------~--~---
A follow-up on this, just in case you are still interested ...
you have to run like this (run mpiexec -help2 for explanations on
-localroot flag):
mpiexec -localroot -n 5 python demos\mandelbrot\mandelbrot.py
--
Lisandro Dalcin