No, our code is supposed to call MPI_init prior to any further MPI_* call.
Anyway, I finally found the reason for this error (sorry I spoiled the list being unable to find my own mistakes...) and corrected our build system.

For different reasons, we generate a sequential and a parallel binary (both linked with different openmpi libraries, the sequential one being linked with a fake "mpi" library too that will redefine some methods when running sequential) of this code.
I somehow managed to link the sequential binary as:
my_objects + the_fake_mpi_library + the openmpi libraries needed (cf. what mpicc --show:link says) (the mpi compilers wrappers add necessary flags as a postfix to the build command)
instead of:
my_objects + the openmpi libraries needed (cf. what mpicc --show:link says) +the_fake_mpi_library As a consequence, when the "sequential" binary called MPI_init (assuming it was the method redefined in the fake_mpi library), it was actually calling the the MPI_init method from the openmpi library.

Thanks for your reactivity Jeff,
Eloi



Jeff Squyres wrote:
On Jul 23, 2008, at 8:33 AM, Eloi Gaudry wrote:

I've been encountering some issues with openmpi on a linux-ia64 platform
(centos-4.6 with gcc-4.3.1) within a call to MPI_Query_thread (in a fake
single process run):

An error occurred in MPI_Query_thread
*** before MPI was initialized
*** MPI_ERRORS_ARE_FATAL (goodbye)


This error message usually means that you have invoked an MPI function call (e.g., MPI_Query_thread) before you invoked MPI_Init (or MPI_Init_thread).

Is that what your code is doing?

Reply via email to