[Mpi-forum] Compile-time check for MPI_Init or MPI_Init thread
Kendall, Ricky A.
kendallra at ornl.gov
Wed Jan 20 15:49:43 CST 2010
But does the standard say you need to have autoconf available to use MPI?
This is a good solution but has issues.
Ricky A. Kendall
Group Leader, Scientific Computing
Oak Ridge Leadership Computing Facility (OLCF)
Oak Ridge National Laboratory
Phone: (865) 576-6905
Cell: (865) 356-3461
Email: kendallra _at_ ornl.gov
AIM and Yahoo: rickyakendall
Gmail: rickyk
-----Original Message-----
From: mpi-forum-bounces at lists.mpi-forum.org [mailto:mpi-forum-bounces at lists.mpi-forum.org] On Behalf Of William Gropp
Sent: Wednesday, January 20, 2010 11:18 AM
To: Main MPI Forum mailing list
Cc: Markus Geimer
Subject: Re: [Mpi-forum] Compile-time check for MPI_Init or MPI_Init thread
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
_______________________________________________
mpi-forum mailing list
mpi-forum at lists.mpi-forum.org
http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum
More information about the mpi-forum
mailing list