There should not be any difference between mpich, where, for example, the function isdeclared as:
int MPI_Finalize(void);
and openmpi, shown here:
OMPI_DECLSPEC  int MPI_Finalize(void);
..because it looks as though OMPI_DECLSPEC resolves to "", if the platform is not win32. So I would guess that the difference in the function declarations should not matter.
So it looks as though your configure fails here:

configure:6352: checking for MPI capability

configure:6372: /usr/bin/gcc -o conftest -g -O2 -I/antigone/luigi/work/software/mpi/install/include -I/usr/include/python2.4 conftest.c -lm -L/usr/lib/python2.4/config -lpython2.4 -Xlinker -export-dynamic -lpthread -ldl -lutil -lm >&5

/tmp/ccEJ7LmX.o: In function `main':

/antigone/luigi/work/software/mpi/pyMPI-2.4b4/configure:6363: undefined reference to `MPI_Init'

collect2: ld returned 1 exit status

configure:6375: $? = 1

configure: failed program was:

#line 6354 "configure"

#include "confdefs.h"

#include "mpi.h"

#include <stdlib.h>


main ()




return 0;



I am not sure whether it decides that mpi.h should be included from from the current directory, or whether it is looking in the include path i.e. /antigone/luigi/work/software/mpi/install/include , but in any case, I don't think that it is actually finding the declaration of any MPI function.


First I would suggest greping for the function i.e.


grep -n MPI_Finalize /antigone/luigi/work/software/mpi/install/include/*.h


This will at least tell you if the path contains the function in any h file. If that works, then somehow the include is failing in the configure phase.


You usually need to run configure with --with-includes='-Ifoo ...'    to additional include paths, however if it could not find the mpi.h file at all, you should have got a different error e.g. Cannot build without mpi headers.  use --with-includes=-I/...


In you case it seems to have found it here:

configure:4925: checking for --with-includes
configure:4932: result: -I/antigone/luigi/work/software/mpi/install/include



Also, I'm suprised that you are using gcc, you should be using the openmpi compiler, i.e. your make file has something like:

CC = /home/jcook/mpich/mpich-1.2.6/bin/mpicc


Usually I run my configure like this:


CC=mpicc ./configure --prefix=/home/jcook/python/Python-2.4/bin --with-isatty


So I would try changing the compiler first..


Julian Cook



----- Original Message ----
From: Luigi Paioro <>
To: Julian Cook <>
Sent: Friday, June 23, 2006 5:14:43 AM
Subject: Re: [Pympi-users] Compile problem with OpenMPI

Hi Julian. Thank you for your quick answer.

mpi.h file has a declaration:

OMPI_DECLSPEC  int MPI_Finalize(void);


OMPI_DECLSPEC  int MPI_Init(int *argc, char ***argv);

I attach the mpi.h file so you can look in it.


Julian Cook wrote:
> Luigi
> I looked at your config file. All the references to MPI_ type calls seem
> to be missing starting with
> undefined reference to `MPI_Init'
> it seems to be looking here:
> -I/antigone/luigi/work/software/mpi/install/include
> and seems to find mpi.h, but none of the MPI C functions appear to be found
> ----- Original Message ----
> From: Luigi Paioro <>
> To:
> Sent: Thursday, June 22, 2006 4:47:50 AM
> Subject: [Pympi-users] Compile problem with OpenMPI
> Hello!
> I'm trying to compile pyMPI with OpenMPI (1.2a) MPI implementation. I've
> got many errors like:
> <path>/pyMPI_main.c:76: undefined reference to `MPI_Finalize'
> I attach my config.log and "make clean all install" command output in
> order to help you to understand my problem.
> Can you help me?
> Thank you in advance.
> Luigi
> All the advantages of Linux Managed Hosting--Without the Cost and Risk!
> Fully trained technicians. The highest number of Red Hat certifications in
> the hosting industry. Fanatical Support. Click to learn more
> <>
> _______________________________________________
> Pympi-users mailing list