[Mpi-forum] Compile-time check for MPI_Init or MPI_Init thread

William Gropp wgropp at illinois.edu
Wed Jan 20 10:18:03 CST 2010


In this exact situation (building tests for any MPI implementation,  
including tests of thread safety, I use the autoconf macros to check  
for the functions that I need.

Bill

On Jan 20, 2010, at 3:15 AM, Marc-Andre Hermanns wrote:

> Hi all,
>
> we are currently puzzled about how to check whether to call MPI_Init  
> or
> MPI_Init_thread in one of our programs.
>
> Our performance analyzer scout can be built in different versions:  
> MPI,
> OpenMP, and hybrid MPI/OpenMP. As the code-base is shared, we have
> #define statements to separate individual portions of the code. To
> decide whether to call MPI_Init or MPI_Init_thread at compile time we
> check the #define set by MPI. However, POE on our Power6 Cluster
> correctly reports MPI 1, as it does not support spawning and is
> therefore not MPI 2 compliant, yet MPI_Init_thread would be available,
> and must be used for the hybrid version.
>
> My initial idea is to take 'nm' at configure-time of our tool. Check
> whether MPI_Init_thread is in the library, and set my own #define.
>
> Is there a more elegant solution? How are users supposed to portably
> detect it?
>
> Is it something we can/should fix?
>
> Best regards,
> Marc-Andre
> -- 
> Marc-Andre Hermanns
> Juelich Supercomputing Centre
> Institute for Advanced Simulation
> Forschungszentrum Juelich GmbH
> D-52425 Juelich
> Germany
>
> Phone : +49-2461-61-2054
> Fax   : +49-2461-61-6656
> eMail : m.a.hermanns at fz-juelich.de
> WWW   : http://www.fz-juelich.de/jsc/
>
> JSC is the coordinator of the
> John von Neumann Institute for Computing
> and member of the
> Gauss Centre for Supercomputing
>
> Sitz der Gesellschaft: Juelich
> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
> Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
> Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
>                    Dr. Ulrich Krafft (stellv. Vorsitzender),
>                    Prof. Dr. Harald Bolt,
>                    Prof. Dr. Sebastian M. Schmidt
> _______________________________________________
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
> http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum

William Gropp
Deputy Director for Research
Institute for Advanced Computing Applications and Technologies
Paul and Cynthia Saylor Professor of Computer Science
University of Illinois Urbana-Champaign







More information about the mpi-forum mailing list