[mpich-discuss] MPICH2 and Python

ddkrause ddkrause at uni-bonn.de
Mon Sep 8 07:32:23 CDT 2008


Rajeev Thakur wrote:
> It is odd. I suspect the real problem is probably elsewhere. If you add
> python.h to any of the tests in the MPICH2 test suite in test/mpi, does it
> fail?
>   
I tried dup.c and it worked. For this reason I worked through my code
and found that the problem was not that I included <Python.h> before
<mpi.h> but before <stdio.h>

So it seems that this is not really related to MPI but since the only
implication of this strange behaviour is the MPI error I appended a
short example showing the problem. I found out that the problem is
related to fpos_t in <stdio.h>. I'm wondering what causes this error.
Valgrind doesn't show helpful infos.

Btw. I tried the same program with IBM MPI and it works (with
python2.3). Pathscale MPI and python2.4 breaks down with yet another
runtime error ("Could not convert index -2245088 into a pointer").

I know that it is likely to be not an MPI but python problem but I'm
thankful for all hints/advises.

Thanks,
Dorian

> Rajeev 
>
>   
>> -----Original Message-----
>> From: owner-mpich-discuss at mcs.anl.gov 
>> [mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of ddkrause
>> Sent: Sunday, September 07, 2008 2:17 PM
>> To: mpich-discuss at mcs.anl.gov
>> Subject: [mpich-discuss] MPICH2 and Python
>>
>> Hello everybody,
>>
>> today I had the pleasure to track down a bug in my software 
>> which caused an error int MPI_Comm_rank due to an invalid 
>> communicator.
>>
>> The interesting point is that this only occurs if I include <Python.h>
>> *before* <mpi.h> . There is no problem If i included it not 
>> or after <mpi.h>. Is this a known problem?
>>
>> I looked into the preprocessor output but couldn't find a 
>> significant difference. It seems that no Python macro 
>> overwrites some of the MPICH stuff (they both use a seperate 
>> namespace anyway).
>>
>> Any idea what's going on? I'm using mpich2-1.07.
>>
>> I have no problem in interchanging the include ordering but I 
>> think it's interesting to find the reason. Maybe it helps me 
>> to understand some more internal details of MPICH.
>>
>> Thanks & Best regards,
>> Dorian Krause
>>
>> PS: Due to the bunch of software I'm using here I think its 
>> not helpful to include the source code but I can send it if it helps.
>>
>>
>>     

-------------- next part --------------
A non-text attachment was scrubbed...
Name: strange.tar.gz
Type: application/x-gzip
Size: 839 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20080908/2ce2d552/attachment.bin>


More information about the mpich-discuss mailing list