This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 562504 - Review Request: mpi4py - Python bindings of the Message Passing Interface (MPI)
Review Request: mpi4py - Python bindings of the Message Passing Interface (MPI)
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Susi Lehtola
Fedora Extras Quality Assurance
:
Depends On:
Blocks: Python3F13
  Show dependency treegraph
 
Reported: 2010-02-06 22:16 EST by Thomas Spura
Modified: 2012-08-19 13:52 EDT (History)
5 users (show)

See Also:
Fixed In Version: mpi4py-1.2.1-2.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-02-26 09:20:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
susi.lehtola: fedora‑review+
limburgher: fedora‑cvs+


Attachments (Terms of Use)

  None (edit)
Description Thomas Spura 2010-02-06 22:16:43 EST
Spec URL: http://tomspur.fedorapeople.org/review/mpi4py.spec
SRPM URL: http://tomspur.fedorapeople.org/review/mpi4py-1.2-1.fc12.src.rpm
Description:
This package is constructed on top of the MPI-1/MPI-2 specification and
provides an object oriented interface which closely follows MPI-2 C++
bindings. It supports point-to-point (sends, receives) and collective
(broadcasts, scatters, gathers) communications of any picklable Python
object as well as optimized communications of Python object exposing the
single-segment buffer interface (NumPy arrays, builtin bytes/string/array
objects).



######################

rpmlint:
$ rpmlint mpi4py-1.2-1.fc12.src.rpm x86_64/*
mpi4py.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python2.6/site-packages/mpi4py/include/mpi4py/mpi4py.MPI_api.h
mpi4py.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python2.6/site-packages/mpi4py/include/mpi4py/mpi4py.h
mpi4py.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python2.6/site-packages/mpi4py/include/mpi4py/mpi4py.MPI.h
python3-mpi4py.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python3.1/site-packages/mpi4py/include/mpi4py/mpi4py.MPI_api.h
python3-mpi4py.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python3.1/site-packages/mpi4py/include/mpi4py/mpi4py.MPI.h
python3-mpi4py.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python3.1/site-packages/mpi4py/include/mpi4py/mpi4py.h
4 packages and 0 specfiles checked; 0 errors, 6 warnings.

This is expected.

###########################

Builds in koji:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1967154

###########################

Some notes:

- I disabled the docs package, because rpmlint complained about some non-udf8 errors in *.zip files and so on. I just commented the creation of the package out and not deleted that, just in case a reviewer wants to have this doc package.
  The docs are olso online at: http://mpi4py.scipy.org/docs/usrman/index.html

- This package also enables a python3 subpackage. I didn't contact upstream, if they also support python3 build, but on pypi, this package is in the section for python3 packages. So I assume, they support it:
http://pypi.python.org/pypi/mpi4py

- I don't know how to run the testsuite, because "mpd &" would be required. This means, I need to run mpd within the spec file to enable a mpi daemon on the building system and I don't know, how to safely kill it after the testsuite.
  I run the suite here on my system and it passes perfectly.
  (The testsuite does not pass on python3, because there is no python3-numpy or similar yet.)
Comment 1 Susi Lehtola 2010-02-07 05:10:24 EST
Read the MPI packaging guidelines, and try again. Make subpackages (compile against) at least for Open MPI and MPICH2.

http://fedoraproject.org/wiki/PackagingDrafts/MPI

(The guidelines were approved by FESCo in August, but spot still hasn't had time to integrate them with the rest of the guidelines.)
Comment 2 Thomas Spura 2010-02-07 10:22:00 EST
The example in the guidelines is nonsense for this python build :'(

I completely rewrote dobuildX and added doinstallX for both python2 and python3.
Don't know if this requires different guidelines :(


From the logs, it builds with
/usr/lib64/mpich2/bin/mpicc
/usr/lib64/openmpi/bin/mpicc
/usr/bin/mpicc

but there is a warning, that:
*** WARNING: identical binaries are copied, not linked:
        /usr/lib64/python2.6/site-packages/mpi4py-mpich2/MPE.so
   and  /usr/lib64/python2.6/site-packages/mpi4py/MPE.so
extracting debug info from /home/tom/rpmbuild/BUILDROOT/mpi4py-1.2-2.fc12.x86_64/usr/lib64/python2.6/site-packages/mpi4py-mpich2/MPI.so
*** WARNING: identical binaries are copied, not linked:
        /usr/lib64/python2.6/site-packages/mpi4py-mpich2/MPI.so
   and  /usr/lib64/python2.6/site-packages/mpi4py/MPI.so
extracting debug info from /home/tom/rpmbuild/BUILDROOT/mpi4py-1.2-2.fc12.x86_64/usr/lib64/python2.6/site-packages/mpi4py-mpich2/dl.so
*** WARNING: identical binaries are copied, not linked:
        /usr/lib64/python2.6/site-packages/mpi4py-mpich2/dl.so
Same for python3.1.

So I guess, grepping the right compiler did not work.

Do you have a solution for that?

(Note: Because did not work atm, I didn't add proper desctiptions.)

Builds in koji, with all python3-* subpackages:


###########################
current TODO list:
- properly build with mpi variants (don't know how)
- add good descriptions
- what to do with lam?
  can this left out?
- didn't look for rpmlint. There are enought other problems
- How to enable the testsuite "mpd&..."?


Spec URL: http://tomspur.fedorapeople.org/review/mpi4py.spec
SRPM URL: http://tomspur.fedorapeople.org/review/mpi4py-1.2-2.fc12.src.rpm
Comment 3 Thomas Spura 2010-02-07 10:22:57 EST
Forgot the koji build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1967451
Comment 4 Susi Lehtola 2010-02-07 12:21:01 EST
LAM has been obsoleted long ago and dropped from rawhide, so drop it.

**

The correct locations for the modules are
 %{python_sitearch}/openmpi/
for the Open MPI library and and
 %{python_sitearch}/mpich2/
for the MPICH2 library.

Is there *really* a *serial* version of the library?

**

The -mpi package must be named -openmpi.

**

Drop the optional compilers support, it's only meant for MPI compiler packages (e.g. openmpi and mpich2).

**

Is the egg independent of the MPI library used?

**

I don't like the use of
 %{_builddir}/$MPI_COMPILER
please create the temporary directories inside the same buildroot, e.g.
 mv build $MPI_COMPILER
Comment 5 Thomas Spura 2010-02-07 16:21:21 EST
Next try ;)

(In reply to comment #4)
> LAM has been obsoleted long ago and dropped from rawhide, so drop it.

Done

> The correct locations for the modules are
>  %{python_sitearch}/openmpi/
> for the Open MPI library and and
>  %{python_sitearch}/mpich2/
> for the MPICH2 library.
> 
> Is there *really* a *serial* version of the library?

No, I deleted that part again, just building the parallel versions.

> The -mpi package must be named -openmpi.

Done

> Drop the optional compilers support, it's only meant for MPI compiler packages
> (e.g. openmpi and mpich2).

Done

> Is the egg independent of the MPI library used?

Yes, but now it's shipped in every supbackage

> I don't like the use of
>  %{_builddir}/$MPI_COMPILER
> please create the temporary directories inside the same buildroot, e.g.
>  mv build $MPI_COMPILER    

Now I move build around, should be better now.

- koji build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1967719

- rpmlint complains about devel-file-in-non-devel-package and no-documentation.
  Rest is ok.

Remaining 'maybe' TODO: enable testsuite

Spec URL: http://tomspur.fedorapeople.org/review/mpi4py.spec
SRPM URL: http://tomspur.fedorapeople.org/review/mpi4py-1.2-3.fc12.src.rpm
Comment 6 Susi Lehtola 2010-02-07 16:36:45 EST
The subpackages need to Requires: mpi4py-common, since the license etc is in -common.

Move the large documentation stuff into -doc.

**

The names of the python3 versions are IMHO a bit odd, but this seems to be the way python3 is packaged in Fedora.

**

After you've added the docs and enabled running the testsuite I'll do the review.
Comment 7 Thomas Spura 2010-02-07 18:28:22 EST
(In reply to comment #6)
> The subpackages need to Requires: mpi4py-common, since the license etc is in
> -common.
> 
> Move the large documentation stuff into -doc.

Done

> The names of the python3 versions are IMHO a bit odd, but this seems to be the
> way python3 is packaged in Fedora.

Also don't know a better way. packages like mpi4py-openmpi-python3 are not better.


- Testsuite is enabled, and fails within 2 tests for openmpi. For mpich2 both tests pass. (Both for python2 and python3)
  The failing is reported upstream at:
  http://code.google.com/p/mpi4py/issues/detail?id=14

New koji build is failing, because mpd can not be started:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1967879

Don't know how to to that part better. Here locally it works.
Maybe it's not possible to do that in the buildsystem.
Do you have an idea? Did you have a similar case?


Spec URL: http://tomspur.fedorapeople.org/review/mpi4py.spec
SRPM URL: http://tomspur.fedorapeople.org/review/mpi4py-1.2-4.fc12.src.rpm
Comment 8 Susi Lehtola 2010-02-08 02:23:36 EST
 %check
 mpd --daemon
 %{_openmpi_load}
 PYTHONPATH=%{buildroot}%{python_sitearch}/openmpi \
     python test/runalltest.py
 %{_openmpi_unload}

mpd is the MPICH2 manager (Open MPI does not need one); move the mpd statement to the MPICH2 section. Looks like the build is failing since MPICH2 is not working for some reason.

Furthermore the %check is ran in the build dir, so PYTHONPATH should be set to
 PYTHONPATH=openmpi/
for the Open MPI version etc.
Comment 9 Susi Lehtola 2010-02-08 02:32:03 EST
Doesn't work locally, either:

+ mpd --daemon
configuration file /builddir/.mpd.conf not found
A file named .mpd.conf file must be present in the user's home
directory (/etc/mpd.conf if root) with read and write access
only for the user, and must contain at least a line with:
MPD_SECRETWORD=<secretword>
One way to safely create this file is to do the following:
  cd $HOME
  touch .mpd.conf
  chmod 600 .mpd.conf
and then use an editor to insert a line like
  MPD_SECRETWORD=mr45-j9z
into the file.  (Of course use some other secret word than mr45-j9z.)
error: Bad exit status from /var/tmp/rpm-tmp.L5Y4a4 (%check)
    Bad exit status from /var/tmp/rpm-tmp.L5Y4a4 (%check)
RPM build errors:


You should run the mpd command right after %{_mpich2_load}. The MPICH2 package is still blatantly in violation of the guidelines, which is why you can run MPICH2 commands without loading the MPICH2 module.
Comment 10 Thomas Spura 2010-02-08 14:02:40 EST
(In reply to comment #8)
> Furthermore the %check is ran in the build dir, so PYTHONPATH should be set to
>  PYTHONPATH=openmpi/
> for the Open MPI version etc.    

If ever, than it should be PYTHONPATH=openmpi/lib.linux-x86_64-2.6, so maybe PYTHONPATH=openmpi/lib.linux-* ?

I don't like that '*' and would prefer running it, when installed.
Or how do you like the '*' from above?

(In reply to comment #9)
> Doesn't work locally, either:
> 
> + mpd --daemon
> configuration file /builddir/.mpd.conf not found
> A file named .mpd.conf file must be present in the user's home
> directory (/etc/mpd.conf if root) with read and write access
> only for the user, and must contain at least a line with:
> MPD_SECRETWORD=<secretword>
> One way to safely create this file is to do the following:
>   cd $HOME
>   touch .mpd.conf
>   chmod 600 .mpd.conf
> and then use an editor to insert a line like
>   MPD_SECRETWORD=mr45-j9z
> into the file.  (Of course use some other secret word than mr45-j9z.)
> error: Bad exit status from /var/tmp/rpm-tmp.L5Y4a4 (%check)
>     Bad exit status from /var/tmp/rpm-tmp.L5Y4a4 (%check)
> RPM build errors:

ok, I already have such a file here :(

I don't want to add such a file on the buildsystem and without it won't work.
How about disabling the mpich2 testsuite, till there is a 'sane' possibility?

> You should run the mpd command right after %{_mpich2_load}. The MPICH2 package
> is still blatantly in violation of the guidelines, which is why you can run
> MPICH2 commands without loading the MPICH2 module.    

Done, works for me locally, but in koji fails becaus openmpi can't be initialized...

+ PYTHONPATH=/builddir/build/BUILDROOT/mpi4py-1.2-5.fc13.x86_64/usr/lib64/python2.6/site-packages/openmpi
+ python test/runalltest.py
[x86-03.phx2.fedoraproject.org:18162] [[INVALID],INVALID] ORTE_ERROR_LOG: Not found in file ess_hnp_module.c at line 161
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems.  This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):
  orte_plm_base_select failed
  --> Returned value Not found (-13) instead of ORTE_SUCCESS
--------------------------------------------------------------------------
[x86-03.phx2.fedoraproject.org:18162] [[INVALID],INVALID] ORTE_ERROR_LOG: Not found in file runtime/orte_init.c at line 132
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems.  This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):
  orte_ess_set_name failed
  --> Returned value Not found (-13) instead of ORTE_SUCCESS
--------------------------------------------------------------------------
[x86-03.phx2.fedoraproject.org:18162] [[INVALID],INVALID] ORTE_ERROR_LOG: Not found in file orted/orted_main.c at line 323
[x86-03.phx2.fedoraproject.org:18161] [[INVALID],INVALID] ORTE_ERROR_LOG: Unable to start a daemon on the local node in file ess_singleton_module.c at line 381
[x86-03.phx2.fedoraproject.org:18161] [[INVALID],INVALID] ORTE_ERROR_LOG: Unable to start a daemon on the local node in file ess_singleton_module.c at line 143
[x86-03.phx2.fedoraproject.org:18161] [[INVALID],INVALID] ORTE_ERROR_LOG: Unable to start a daemon on the local node in file runtime/orte_init.c at line 132
RPM build errors:
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems.  This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):
  orte_ess_set_name failed
  --> Returned value Unable to start a daemon on the local node (-128) instead of ORTE_SUCCESS


Don't know what to do here, except disabling the tests complete...

Disabled for now:
Spec URL: http://tomspur.fedorapeople.org/review/mpi4py.spec
SRPM URL: http://tomspur.fedorapeople.org/review/mpi4py-1.2-5.fc12.src.rpm
Comment 11 Susi Lehtola 2010-02-08 14:16:12 EST
Does the check work in your local build?

Check what libraries the python modules link to. My guess is that you've linked also the Open MPI version against mpich2, and it fails due to that.
Comment 12 Thomas Spura 2010-02-08 14:41:25 EST
(In reply to comment #11)
> Does the check work in your local build?

Yes.

> 
> Check what libraries the python modules link to. My guess is that you've linked
> also the Open MPI version against mpich2, and it fails due to that.    

rpmbuild says nope:
Processing files: mpi4py-openmpi-1.2-5.fc12.x86_64
Provides: MPE.so()(64bit) MPI.so()(64bit) dl.so()(64bit) mpi4py-runtime = 1.2-5.fc12
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(VersionedDependencies) <= 3.0.3-1
Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.4)(64bit) libdl.so.2()(64bit) libdl.so.2(GLIBC_2.2.5)(64bit) libm.so.6()(64bit) libmpi.so.0()(64bit) libnsl.so.1()(64bit) libopen-pal.so.0()(64bit) libopen-rte.so.0()(64bit) libpthread.so.0()(64bit) libpython2.6.so.1.0()(64bit) libutil.so.1()(64bit) python(abi) = 2.6 rtld(GNU_HASH)
Processing files: mpi4py-mpich2-1.2-5.fc12.x86_64
Provides: MPE.so()(64bit) MPI.so()(64bit) dl.so()(64bit) mpi4py-runtime = 1.2-5.fc12
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(VersionedDependencies) <= 3.0.3-1
Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.4)(64bit) libmpich.so.1.2()(64bit) libpthread.so.0()(64bit) libpthread.so.0(GLIBC_2.2.5)(64bit) libpython2.6.so.1.0()(64bit) librt.so.1()(64bit) python(abi) = 2.6 rtld(GNU_HASH)


From opempi %build:
/usr/lib64/openmpi/bin/mpicc -fPIC -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/include/python2.6 -c _configtest.c -o _configtest.o

From mpich2 %build:
/usr/lib64/mpich2/bin/mpicc -fPIC -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/include/python2.6 -c _configtest.c -o _configtest.o

If there is a bug in /usr/lib64/openmpi/bin/mpicc that links against mpich2, rpm would not detect the R: libmpi.so.0()(64bit)
Comment 13 Lisandro Dalcin 2010-02-16 12:20:53 EST
Hi, I'm the author of mpi4py and a Fedora user since the project started. I would like to make some comments on the way mpi4py is being packaged and propose some cleanups in the spec file.

First of all, I'm preparing a bug-fix release being tracked in https://mpi4py.googlecode.com/svn/branches/release-1.2 . Up to now, the accumulated fixes are all related to the custom distutils-based buildsystem and the removal of a hidden file in the documentation (I actually noticed this after looking at mpi4py.spec). Additionally, I've disabled some failing tests for Open MPI (after discussing about the failure in the Open MPI devel ML). Hopefully, I'll make a bug-fix release soon, and we will have time to get mpi4py-1.2.1 in Fedora 13.

1) Please DO NOT REMOVE all empty pyx/pxd files!!. In particular, the files '__init__.pyx' and '__init__.pxd' located at 'src/include/mpi4py' DO ARE REQUIRED for Cython support (i.e. for accessing mpi4py internals at the C level when using Cython's "cimport" statement). If these empty files cause any issue, they could be added a single comment line, let say "# placeholder" or something like that.

2) I would remove the whole 'docs/source/slides' directory. BTW, the contents of 'docs/source/usrman' are the reST sources from which the 'docs/usrman/*' HTML documentation (and 'docs/mpi4py.pdf') are generated (using Sphinx and Latex)... So perhaps the whole directory 'docs/source' could be removed, though the  almost-plain-text reST sources at 'docs/source/usrman' could be handy.

3) mpi4py's custom, distutils-based buildsystem (conf/mpidistutils.py) already handles MPI compiler wrappers mpicc/mpicxx (as long as they can be found in $PATH), so there is not need to "export CC=mpicc CXX=mpicxx".


4) mpi4py DO SUPPORT Python 3. Moreover, the testsuite should also run and all tests pass. Of course, about half the tests will not run because of missing numpy, but the other half will use Python's builtin "array.array" instances.
Comment 14 Thomas Spura 2010-02-16 13:14:41 EST
(In reply to comment #13)
> Hi, I'm the author of mpi4py and a Fedora user since the project started. I
> would like to make some comments on the way mpi4py is being packaged and
> propose some cleanups in the spec file.

I could not find you in FAS, so I assume, you are not in the packager group. If so, you could co-maintain this package (or I co-maintain it ;) ).

> 1) Please DO NOT REMOVE all empty pyx/pxd files!

Didn't know that about the cython support. Atm, I just use python.
I deleted that part.

> 2) I would remove the whole 'docs/source/slides' directory. BTW, the contents
> of 'docs/source/usrman' are the reST sources from which the 'docs/usrman/*'
> HTML documentation (and 'docs/mpi4py.pdf') are generated (using Sphinx and
> Latex)... So perhaps the whole directory 'docs/source' could be removed, though
> the  almost-plain-text reST sources at 'docs/source/usrman' could be handy.

docs/source deleted.

> 3) mpi4py's custom, distutils-based buildsystem (conf/mpidistutils.py) already
> handles MPI compiler wrappers mpicc/mpicxx (as long as they can be found in
> $PATH), so there is not need to "export CC=mpicc CXX=mpicxx".

According to http://fedoraproject.org/wiki/PackagingDrafts/MPI
that should be there. Furthermore this does not destroy something, so I leave it there, untill Jussi disagrees.

> 4) mpi4py DO SUPPORT Python 3. Moreover, the testsuite should also run and all
> tests pass. Of course, about half the tests will not run because of missing
> numpy, but the other half will use Python's builtin "array.array" instances.    

Yes, unfortunately there were some issues on the buildsystem with the tests.
The mpich tests can't be run, because of the mpd issue, so I'll run them here locally and try to run the rest olso on the buildsystem, but they failed completely:
"""
It looks like orte_init failed for some reason; your parallel process is
likely to abort.  There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems.  This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):
  orte_plm_base_select failed
  --> Returned value Not found (-13) instead of ORTE_SUCCESS
"""

-> Disabled completely. Furthermore the testsuite runs just fine on my system.

Thanks for your suggestions and infomations :)

Spec URL: http://tomspur.fedorapeople.org/review/mpi4py.spec
SRPM URL: http://tomspur.fedorapeople.org/review/mpi4py-1.2-6.fc12.src.rpm
Comment 15 Susi Lehtola 2010-02-16 13:50:30 EST
(In reply to comment #14)
> > 3) mpi4py's custom, distutils-based buildsystem (conf/mpidistutils.py) already
> > handles MPI compiler wrappers mpicc/mpicxx (as long as they can be found in
> > $PATH), so there is not need to "export CC=mpicc CXX=mpicxx".
> 
> According to http://fedoraproject.org/wiki/PackagingDrafts/MPI
> that should be there. Furthermore this does not destroy something, so I leave
> it there, untill Jussi disagrees.

As long as the build uses mpicc and mpicxx everything is fine. Still, having the declarations explicitly doesn't hurt you at all..
Comment 16 Susi Lehtola 2010-02-20 01:42:55 EST
Sorry, I've been busy for some time. Here's the review:

rpmlint output:
mpi4py-mpich2.x86_64: W: no-documentation
mpi4py-mpich2.x86_64: E: non-standard-executable-perm /usr/lib64/python2.6/site-packages/mpich2/mpi4py/dl.so 0775
mpi4py-mpich2.x86_64: E: non-standard-executable-perm /usr/lib64/python2.6/site-packages/mpich2/mpi4py/MPE.so 0775
mpi4py-mpich2.x86_64: E: zero-length /usr/lib64/python2.6/site-packages/mpich2/mpi4py/include/mpi4py/__init__.pxd
mpi4py-mpich2.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python2.6/site-packages/mpich2/mpi4py/include/mpi4py/mpi4py.MPI_api.h
mpi4py-mpich2.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python2.6/site-packages/mpich2/mpi4py/include/mpi4py/mpi4py.MPI.h
mpi4py-mpich2.x86_64: E: non-standard-executable-perm /usr/lib64/python2.6/site-packages/mpich2/mpi4py/MPI.so 0775
mpi4py-mpich2.x86_64: E: zero-length /usr/lib64/python2.6/site-packages/mpich2/mpi4py/include/mpi4py/__init__.pyx
mpi4py-mpich2.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python2.6/site-packages/mpich2/mpi4py/include/mpi4py/mpi4py.h
mpi4py-openmpi.x86_64: W: no-documentation
mpi4py-openmpi.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python2.6/site-packages/openmpi/mpi4py/include/mpi4py/mpi4py.MPI_api.h
mpi4py-openmpi.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python2.6/site-packages/openmpi/mpi4py/include/mpi4py/mpi4py.h
mpi4py-openmpi.x86_64: E: non-standard-executable-perm /usr/lib64/python2.6/site-packages/openmpi/mpi4py/MPI.so 0775
mpi4py-openmpi.x86_64: E: zero-length /usr/lib64/python2.6/site-packages/openmpi/mpi4py/include/mpi4py/__init__.pyx
mpi4py-openmpi.x86_64: E: non-standard-executable-perm /usr/lib64/python2.6/site-packages/openmpi/mpi4py/MPE.so 0775
mpi4py-openmpi.x86_64: E: non-standard-executable-perm /usr/lib64/python2.6/site-packages/openmpi/mpi4py/dl.so 0775
mpi4py-openmpi.x86_64: E: zero-length /usr/lib64/python2.6/site-packages/openmpi/mpi4py/include/mpi4py/__init__.pxd
mpi4py-openmpi.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python2.6/site-packages/openmpi/mpi4py/include/mpi4py/mpi4py.MPI.h
python3-mpi4py-mpich2.x86_64: W: no-documentation
python3-mpi4py-mpich2.x86_64: E: non-standard-executable-perm /usr/lib64/python3.1/site-packages/mpich2/mpi4py/dl.so 0775
python3-mpi4py-mpich2.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python3.1/site-packages/mpich2/mpi4py/include/mpi4py/mpi4py.h
python3-mpi4py-mpich2.x86_64: E: non-standard-executable-perm /usr/lib64/python3.1/site-packages/mpich2/mpi4py/MPE.so 0775
python3-mpi4py-mpich2.x86_64: E: zero-length /usr/lib64/python3.1/site-packages/mpich2/mpi4py/include/mpi4py/__init__.pyx
python3-mpi4py-mpich2.x86_64: E: non-standard-executable-perm /usr/lib64/python3.1/site-packages/mpich2/mpi4py/MPI.so 0775
python3-mpi4py-mpich2.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python3.1/site-packages/mpich2/mpi4py/include/mpi4py/mpi4py.MPI.h
python3-mpi4py-mpich2.x86_64: E: zero-length /usr/lib64/python3.1/site-packages/mpich2/mpi4py/include/mpi4py/__init__.pxd
python3-mpi4py-mpich2.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python3.1/site-packages/mpich2/mpi4py/include/mpi4py/mpi4py.MPI_api.h
python3-mpi4py-openmpi.x86_64: W: no-documentation
python3-mpi4py-openmpi.x86_64: E: non-standard-executable-perm /usr/lib64/python3.1/site-packages/openmpi/mpi4py/dl.so 0775
python3-mpi4py-openmpi.x86_64: E: non-standard-executable-perm /usr/lib64/python3.1/site-packages/openmpi/mpi4py/MPE.so 0775
python3-mpi4py-openmpi.x86_64: E: non-standard-executable-perm /usr/lib64/python3.1/site-packages/openmpi/mpi4py/MPI.so 0775
python3-mpi4py-openmpi.x86_64: E: zero-length /usr/lib64/python3.1/site-packages/openmpi/mpi4py/include/mpi4py/__init__.pyx
python3-mpi4py-openmpi.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python3.1/site-packages/openmpi/mpi4py/include/mpi4py/mpi4py.MPI_api.h
python3-mpi4py-openmpi.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python3.1/site-packages/openmpi/mpi4py/include/mpi4py/mpi4py.MPI.h
python3-mpi4py-openmpi.x86_64: E: zero-length /usr/lib64/python3.1/site-packages/openmpi/mpi4py/include/mpi4py/__init__.pxd
python3-mpi4py-openmpi.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python3.1/site-packages/openmpi/mpi4py/include/mpi4py/mpi4py.h
8 packages and 0 specfiles checked; 20 errors, 16 warnings.

MUST: Fix the permissions, they should be 755 for libraries.


***

MUST: The package does not yet exist in Fedora. The Review Request is not a duplicate. OK

MUST: The spec file for the package is legible and macros are used consistently. OK
- I think the 0%{?rhel}>6 should be 0%{?rhel}>5, since RHEL 6 hasn't even been published yet. The python3 draft isn't really consistent in this.

MUST: The package must be named according to the Package Naming Guidelines. OK
MUST: The spec file name must match the base package %{name}. OK
MUST: The package must be licensed with a Fedora approved license and meet the  Licensing Guidelines. OK

MUST: The License field in the package spec file must match the actual license. OK
- Source code doesn't contain license headers.
- Attached LICENSE.txt does, however, specify the license to be BSD.

MUST: The sources used to build the package must match the upstream source, as provided in the spec URL. OK
MUST: The package MUST successfully compile and build into binary rpms. OK
MUST: The spec file MUST handle locales properly. N/A
MUST: Optflags are used and time stamps preserved. OK
MUST: Packages containing shared library files must call ldconfig. N/A
MUST: A package must own all directories that it creates or require the package that owns the directory. OK
MUST: Files only listed once in %files listings. OK
MUST: Debuginfo package is complete. OK

MUST: Permissions on files must be set properly. NEEDSWORK
- Fix the lib perms with chmod at the end of %install.

MUST: Clean section exists. OK
MUST: Large documentation files must go in a -doc subpackage. OK

MUST: All relevant items are included in %doc. Items in %doc do not affect runtime of application.  ~OK
- I suggest adding PKG-INFO and THANKS.txt to -common.

MUST: Header files must be in a -devel package. OK
- This doesn't really apply here.

MUST: Static libraries must be in a -static package. N/A
MUST: Packages containing pkgconfig(.pc) files must 'Requires: pkgconfig'.
MUST: If a package contains library files with a suffix then library files ending in .so must go in a -devel package. N/A
MUST: In the vast majority of cases, devel packages must require the base package using a fully versioned dependency. N/A
MUST: Packages does not contain any .la libtool archives. N/A
MUST: Desktop files are installed properly. N/A
MUST: No file conflicts with other packages and no general names. OK
MUST: Buildroot cleaned before install. OK
SHOULD: %{?dist} tag is used in release. OK
SHOULD: If the package does not include license text(s) as separate files from upstream, the packager should query upstream to include it. OK
SHOULD: The package builds in mock. OK
Comment 17 Susi Lehtola 2010-02-20 02:36:49 EST
Fix the issues before import to CVS. This package has been

APPROVED
Comment 18 Thomas Spura 2010-02-20 08:33:49 EST
Huh? The permissions are ok here...

$ rpmls x86_64/mpi4py-mpich2-1.2-6.fc12.x86_64.rpm 
drwxr-xr-x  /usr/lib64/python2.6/site-packages/mpich2/mpi4py
-rw-r--r--  /usr/lib64/python2.6/site-packages/mpich2/mpi4py-1.2-py2.6.egg-info
-rwxr-xr-x  /usr/lib64/python2.6/site-packages/mpich2/mpi4py/MPE.so
-rwxr-xr-x  /usr/lib64/python2.6/site-packages/mpich2/mpi4py/MPI.so
-rw-r--r--  /usr/lib64/python2.6/site-packages/mpich2/mpi4py/__init__.py
-rw-r--r--  /usr/lib64/python2.6/site-packages/mpich2/mpi4py/__init__.pyc
-rw-r--r--  /usr/lib64/python2.6/site-packages/mpich2/mpi4py/__init__.pyo
-rwxr-xr-x  /usr/lib64/python2.6/site-packages/mpich2/mpi4py/dl.so
[snip]

755 should be -rwxr-xr-x AFAIK, or am I wrong here?

Example rpmlint on the same rpm:
$ rpmlint x86_64/mpi4py-mpich2-1.2-6.fc12.x86_64.rpm 
mpi4py-mpich2.x86_64: W: spelling-error %description -l en_US picklable -> pickle, pickerel, despicable
mpi4py-mpich2.x86_64: W: spelling-error %description -l en_US builtin -> built in, built-in, built
mpi4py-mpich2.x86_64: W: spelling-error %description -l en_US mpi -> moi, mp, mi
mpi4py-mpich2.x86_64: W: spelling-error %description -l en_US py -> pt, p, y
mpi4py-mpich2.x86_64: W: no-documentation
mpi4py-mpich2.x86_64: E: zero-length /usr/lib64/python2.6/site-packages/mpich2/mpi4py/include/mpi4py/__init__.pxd
mpi4py-mpich2.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python2.6/site-packages/mpich2/mpi4py/include/mpi4py/mpi4py.MPI_api.h
mpi4py-mpich2.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python2.6/site-packages/mpich2/mpi4py/include/mpi4py/mpi4py.MPI.h
mpi4py-mpich2.x86_64: E: zero-length /usr/lib64/python2.6/site-packages/mpich2/mpi4py/include/mpi4py/__init__.pyx
mpi4py-mpich2.x86_64: W: devel-file-in-non-devel-package /usr/lib64/python2.6/site-packages/mpich2/mpi4py/include/mpi4py/mpi4py.h
1 packages and 0 specfiles checked; 2 errors, 8 warnings.

only ignorable warnings/errors


I will request a cvs entry, but will only import, when I get another answer from you.
Comment 19 Thomas Spura 2010-02-20 08:37:43 EST
Thanks for the review.

______________________

New Package CVS Request
=======================
Package Name: mpi4py
Short Description: Python bindings of the Message Passing Interface (MPI)
Owners: tomspur
Branches: F-12 F-13
InitialCC:
Comment 20 Susi Lehtola 2010-02-20 09:33:22 EST
(In reply to comment #18)
> Huh? The permissions are ok here...

That's what I got when I mock built the srpm in rawhide x86_64. How did you build yours?

> Example rpmlint on the same rpm:
> $ rpmlint x86_64/mpi4py-mpich2-1.2-6.fc12.x86_64.rpm 
> mpi4py-mpich2.x86_64: W: spelling-error %description -l en_US picklable ->
> pickle, pickerel, despicable

Hmm, I haven't seen a spell checker in rpmlint before!
Comment 21 Susi Lehtola 2010-02-20 10:40:55 EST
Excerpt:

$ rpmls /var/mock/fedora-rawhide-x86_64/result/mpi4py-mpich2-1.2-6.fc13.x86_64.rpm 
drwxr-xr-x  /usr/lib64/python2.6/site-packages/mpich2/mpi4py
-rw-r--r--  /usr/lib64/python2.6/site-packages/mpich2/mpi4py-1.2-py2.6.egg-info
-rwxrwxr-x  /usr/lib64/python2.6/site-packages/mpich2/mpi4py/MPE.so
-rwxrwxr-x  /usr/lib64/python2.6/site-packages/mpich2/mpi4py/MPI.so
-rw-r--r--  /usr/lib64/python2.6/site-packages/mpich2/mpi4py/__init__.py
-rw-r--r--  /usr/lib64/python2.6/site-packages/mpich2/mpi4py/__init__.pyc
-rw-r--r--  /usr/lib64/python2.6/site-packages/mpich2/mpi4py/__init__.pyo
-rwxrwxr-x  /usr/lib64/python2.6/site-packages/mpich2/mpi4py/dl.so

so the permissions really are incorrect.
Comment 22 Lisandro Dalcin 2010-02-22 15:16:20 EST
I have no clue about why the permissions on the *.so files are wrong in Jussi's box.

I also saw that rpmlint complains (signaling an error, not a warning) about empty files. What's wrong with empty files to that being an error? If required, I could add a comment line at the start of these files, in order to 'fill' them and make rpmlint stop complaining.


BTW, Thomas... Could you make sure that the MPE extension module actually works on MPICH2+x86_64 ?? For example, after installing mpi4py (or adjusting PYTHONPATH to point to the build directory), run this: 

$ make -C demo/mpe-logging

If this does not work, that's surely related to libmpe.a from MPICH2 not being built with -fPIC.
Comment 23 Thomas Spura 2010-02-22 18:19:00 EST
(In reply to comment #22)
> I have no clue about why the permissions on the *.so files are wrong in Jussi's
> box.

I can reproduce this in my local mock + building for rawhide. But because this seems to be resolved on the buildsystem, so I will verify the build everytime in koji, but don't search here on my system for a bug.

> I also saw that rpmlint complains (signaling an error, not a warning) about
> empty files. What's wrong with empty files to that being an error? If required,
> I could add a comment line at the start of these files, in order to 'fill' them
> and make rpmlint stop complaining.

http://fedoraproject.org/wiki/Common_Rpmlint_issues#zero-length
I guess, this is a  packaging guidelines, because this broke something somewhere.
rpmlint sometimes shows false positives, so it would be ok to leave the errors.

> BTW, Thomas... Could you make sure that the MPE extension module actually works
> on MPICH2+x86_64 ??

$ PYTHONPATH=/usr/lib64/python2.6/site-packages/mpich2/ make -C demo/mpe-logging
make: Entering directory `/home/tom/rpmbuild/MOPENED/mpi4py/mpi4py-1.2/demo/mpe-logging'
mpiexec -n 8 python cpilog.py
Writing logfile....
Enabling the Default clock synchronization...
Finished writing logfile cpilog.clog2.
mpiexec -n 8 python ring.py
Writing logfile....
Enabling the Default clock synchronization...
Finished writing logfile ring.clog2.
mpiexec -n 8 python threads.py
Writing logfile....
Enabling the Default clock synchronization...
Finished writing logfile threads.clog2.
rm -f *.[cs]log2
make: Leaving directory `/home/tom/rpmbuild/MOPENED/mpi4py/mpi4py-1.2/demo/mpe-logging'

> If this does not work, that's surely related to libmpe.a from MPICH2 not being
> built with -fPIC.    

From the spec file of mpich2, you can see, that on x86_64, it's explicit build with -fPIC, but not on any other platform.
But because this fails on x86_64 in the buildsystem too, this should be something different :(
Comment 24 Lisandro Dalcin 2010-02-23 09:30:16 EST
(In reply to comment #23)
> > I also saw that rpmlint complains (signaling an error, not a warning) about
> > empty files. What's wrong with empty files to that being an error? If required,
> > I could add a comment line at the start of these files, in order to 'fill' them
> > and make rpmlint stop complaining.
> 
> http://fedoraproject.org/wiki/Common_Rpmlint_issues#zero-length
> I guess, this is a  packaging guidelines, because this broke something
> somewhere.
> rpmlint sometimes shows false positives, so it would be ok to leave the errors.
> 

OK. After looking around in my F12 box, I can see many empty __init__.py files inside the system Python install. So I'll leave my *.pyx/*.pyd empty, too.

> > BTW, Thomas... Could you make sure that the MPE extension module actually works
> > on MPICH2+x86_64 ??
> 
> $ PYTHONPATH=/usr/lib64/python2.6/site-packages/mpich2/ make -C
> demo/mpe-logging
> make: Entering directory
> `/home/tom/rpmbuild/MOPENED/mpi4py/mpi4py-1.2/demo/mpe-logging'
> mpiexec -n 8 python cpilog.py
> Writing logfile....
> Enabling the Default clock synchronization...
> Finished writing logfile cpilog.clog2.
> mpiexec -n 8 python ring.py
> Writing logfile....
> Enabling the Default clock synchronization...
> Finished writing logfile ring.clog2.
> mpiexec -n 8 python threads.py
> Writing logfile....
> Enabling the Default clock synchronization...
> Finished writing logfile threads.clog2.
> rm -f *.[cs]log2
> make: Leaving directory
> `/home/tom/rpmbuild/MOPENED/mpi4py/mpi4py-1.2/demo/mpe-logging'
> 

OK. It works.

> > If this does not work, that's surely related to libmpe.a from MPICH2 not being
> > built with -fPIC.    
> 
> From the spec file of mpich2, you can see, that on x86_64, it's explicit build
> with -fPIC, but not on any other platform.
>

OK. I've mailed mpich2-dev about this issue some time ago. They more or less agreed that -fPIC should be used for building objects going to libmpe.a in the case of sharedlib-enabled MPICH2 build.

> But because this fails on x86_64 in the buildsystem too, this should be
> something different :(    

Sorry, could you point to any link where I can take a look?
Comment 25 Thomas Spura 2010-02-24 10:41:50 EST
(In reply to comment #24)
> > But because this fails on x86_64 in the buildsystem too, this should be
> > something different :(    
> 
> Sorry, could you point to any link where I can take a look?    

It's posted in comment #10.

That's the same fault in a new scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=2011533

Link to build.log:
http://koji.fedoraproject.org/koji/getfile?taskID=2011534&name=build.log

  orte_plm_base_select failed
  --> Returned value Not found (-13) instead of ORTE_SUCCESS
and
  orte_ess_set_name failed
  --> Returned value Not found (-13) instead of ORTE_SUCCESS

Searching in the web didn't help /me...
Comment 26 Lisandro Dalcin 2010-02-24 11:39:18 EST
Could you update the spec to run the testsuite like this:

mpiexec -n 1 python test/runalltest.py \
    --path=%{buildroot}%{python_sitearch}/openmpi


Additionally, you could run the testsuite in parallel, let say usoing 4 procs:


mpiexec -n 4 python test/runalltest.py \
    --path=%{buildroot}%{python_sitearch}/openmpi


BTW, you should do the same for the mpich2 and python3 stuff.
Comment 27 Jason Tibbitts 2010-02-25 12:47:27 EST
Given all of the additional discussion, I feel I should ask if this is ready
for CVS or if it needs more review.
Comment 28 Thomas Spura 2010-02-25 13:14:16 EST
(In reply to comment #27)
> Given all of the additional discussion, I feel I should ask if this is ready
> for CVS or if it needs more review.    

There are currently two issues:
- the permissions might be wrong (*.so files)
- the tests can't run in the buildsystem

I'll check that in the buildsystem, once build and adjust the spec, if nessesary.

I'll try to adjust the tests a bit and to run them in the future, but this is not really related to a review issue. Tests should be run, but in this case it's not that easily possible...
(The discussion about the tests should be maybe discussed somewhere else, maybe that's why it looks like needing more review.)

So, I'd say 'ready for CVS'.
Comment 29 Jason Tibbitts 2010-02-25 13:51:51 EST
CVS done (by process-cvs-requests.py).
Comment 30 Thomas Spura 2010-02-26 09:20:29 EST
The scratch build has right permissions:
http://koji.fedoraproject.org/koji/taskinfo?taskID=2015955

Now doing the right build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=2015966

Also with right permissions.

_____________________________


There are remaining problems with the testsuite, that will hopefully be shoot down in the future.

e.g. mpich2 currently can't be tested, because it needs a DNS lookup, what the buildsystem blocks. Maybe that's why openmpi also bracks.
(It seems, both are not designed to work in a non-network atm...)
Comment 31 Fedora Update System 2010-02-27 06:29:06 EST
mpi4py-1.2.1-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/mpi4py-1.2.1-1.fc12
Comment 32 Fedora Update System 2010-02-27 06:31:30 EST
mpi4py-1.2.1-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/mpi4py-1.2.1-1.fc13
Comment 33 Fedora Update System 2010-02-27 09:22:20 EST
mpi4py-1.2.1-2.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/F13/FEDORA-2010-3100
Comment 34 Fedora Update System 2010-02-27 09:23:17 EST
mpi4py-1.2.1-2.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/mpi4py-1.2.1-2.fc12
Comment 35 Fedora Update System 2010-04-03 00:37:33 EDT
mpi4py-1.2.1-2.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 36 Fedora Update System 2010-04-09 00:11:10 EDT
mpi4py-1.2.1-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 37 Thomas Spura 2012-08-03 17:29:35 EDT
Package Change Request
======================
Package Name: mpi4py
New Branches: el6
Owners: tomspur
Comment 38 Jon Ciesla 2012-08-04 00:03:58 EDT
Git done (by process-git-requests).
Comment 39 Fedora Update System 2012-08-04 14:30:48 EDT
mpi4py-1.3-5.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mpi4py-1.3-5.el6
Comment 40 Fedora Update System 2012-08-19 13:52:06 EDT
mpi4py-1.3-5.el6 has been pushed to the Fedora EPEL 6 stable repository.

Note You need to log in before you can comment on or make changes to this bug.