[Pympi-users] pyMPI tested with python 2.4 on Sun
Status: Alpha
Brought to you by:
patmiller
From: Julian C. <rjc...@cs...> - 2005-01-28 18:25:26
|
Long post regarding building pyMPI on solaris. Last week Pat Miller (via email) suggested aiming for a stable release of pyMPI to coincide with python 2.4. This would allow new users to install a version known to work with 2.4 across a variety of platforms. To this end I decided to test pyMPI against 2.4 on Solaris. Here's the summary in case anyone is interested: This is for building pyMPI 2.1 with python 2.4 (30Nov04) on Solaris 2.8. Everything was installed into my home directories, not to /usr/bin etc. 1. Building Python 2.4 was easily the hardest part. I could not get configure, make to run with gcc, so used the Sun CC compiler instead. I've had zero problems with gcc and previous versions of python on Sun( except for TCL/TK which gets me every time). If you have similar problems try ./configure --without-gcc. Also be aware that you need to separately change the linker command as well to cc, otherwise it will attempt to use g++. 2. I used mpich 1.2.6 for the mpi part. This built very easily, with no problems that I remember. I also used the Sun CC compiler for this. I tested it with "mpirun -np 4 cpi" (cpi is in examples/basic) 3. I downloaded pyMPI2.1b4 and also configured it using ./configure --without-gcc. I had some problems with the pyMPI configure as follows: a) I had not done make install for python, so the python-2.4/lib dir did not exist (used in $PYLIBDIR for checking if site-packages exists). Fixed after installing python properly. b) pyMPI configure expected to find config.c in the main python-2.4 dir. The python configure script actually moved this file to the Modules/ dir. Had to copy config.c back from Modules/ into main python dir c) Had to move pyconfig.c into Include/, because that's where python.h etc needed it for compilation during the configure test of h files. The actual error from config.log for the record is: #include <Python.h> configure:5259: result: no configure:5263: checking Python.h presence configure:5270: /home/jcook/mpich/mpich-1.2.6/bin/mpicc -E -w -I/home/jcook/python/Python-2. 4/Include conftest.c "/home/jcook/python/Python-2.4/Include/Python.h", line 8: cannot find include file: "pyconfig.h" "/home/jcook/python/Python-2.4/Include/pyport.h", line 4: cannot find include file: "pyconfig.h" 4. The actual make was error free. The only step that appears to be missing is the setup.py step i.e. "python setup.py build" . I could not see the setup.py file anywhere? There is a softload_setup.py file, but I don t know what it does. 5. I tested it on a 4 cpu server. mpi had autogenerated a machines.solaris file for me. Everything ran fine for non-interactive tests e.g. ale{jcook}60% mpirun -np 4 /home/jcook/python/Python-2.4/bin/pyMPI pyPI.py Try computing with 1 rectangles CPU's: 4 0.0 0.0 0.0 Error is 3.2 Try computing with 2 rectangles CPU's: 4 ... etc etc 6. To run interactive, you have to configure pyMPI using "./configure --without-gcc --with-isatty". This will allow you to get to the python prompt. Notice in this release that you get an unintended extra new line, which is a known bug: ale{jcook}66% mpirun -np 4 /home/jcook/python/Python-2.4/bin/pyMPI Python 2.4 (pyMPI 2.1b4) on sunos5 Type "help", "copyright", "credits" or "license" for more information. Python 2.4 (pyMPI 2.1b4) on sunos5 Type "help", "copyright", "credits" or "license" for more information. Python 2.4 (pyMPI 2.1b4) on sunos5 Type "help", "copyright", "credits" or "license" for more information. Python 2.4 (pyMPI 2.1b4) on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import mpi >>> print mpi.rank,mpi.size 0 4 1 4 3 4 2 4 >>> The only irritating issue here is the 4x credits, which I wasn't expecting. This would obviously be a larger problem when you go to 50 nodes. If anyone knows a fix for this let me know. Julian Cook |