[mpich-devel] MPE: configure test the use of const in MPI function declaration

Lisandro Dalcin dalcinl at gmail.com
Wed Oct 16 13:37:37 CDT 2013


Sorry if this is the wrong ML for MPE-related stuff...

In this commit http://git.mpich.org/mpe.git/commit/dfab46405ec728e2d6b7fe5b2696839e5aed921b
you are generating bad test code (it will always fail), it looks
like (check yourself configure logs for the exact code):

#include "mpi.h"
int main()
{
MPI_Init(...);
int MPI_Send(... ) { return 0;} // Wrong!! function inside function
MPI_Finalize();
}

The following trivial patch (I've also attached it) works for me, but
I'm not sure you will like it.

diff --git a/src/wrappers/configure.ac b/src/wrappers/configure.ac
index e504488..a5e3e45 100644
--- a/src/wrappers/configure.ac
+++ b/src/wrappers/configure.ac
@@ -336,14 +336,16 @@ dnl Check if MPI implementation uses const in
function declaration
 if test "$MPI_IMPL" != "MPICH" -a "$MPI_IMPL" != "MPICH2" ; then
     if test "$enable_checkMPI" = "yes" ; then
         AC_MSG_CHECKING( [for the use of const in MPI function declaration] )
-        PAC_MPI_COMPILE_CC_FUNC( $MPI_CC, [$MPI_CFLAGS], [], [],
+        PAC_MPI_COMPILE_CC_FUNC( $MPI_CC, [$MPI_CFLAGS],
                                  [
+#include "mpi.h"
 int MPI_Send(const void *buf, int count, MPI_Datatype datatype,
              int dest, int tag, MPI_Comm comm)
 {
     return 0;
 }
                                  ],
+                                 [], [],
                                  [ mpe_link_ok=yes ], [ mpe_link_ok=no ] )
         if test "$mpe_link_ok" = "yes" ; then
             AC_MSG_RESULT(yes)


-- 
Lisandro Dalcin
---------------
CIMEC (UNL/CONICET)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1016)
Tel/Fax: +54-342-4511169
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure-MPE_CONST.diff
Type: application/octet-stream
Size: 987 bytes
Desc: not available
URL: <http://lists.mpich.org/pipermail/devel/attachments/20131016/23f32072/attachment.obj>


More information about the devel mailing list