[MPICH] MPICH error in MPI::Lookup_name (MPI_Lookup_Name)
Rusty Lusk
lusk at mcs.anl.gov
Wed Feb 1 13:18:15 CST 2006
From: John Robinson <jr at vertica.com>
Subject: [MPICH] MPICH error in MPI::Lookup_name (MPI_Lookup_Name)
Date: Tue, 24 Jan 2006 16:16:57 -0500
> I found that the implementation of MPI::Lookup_name scribbles outside
> its buffer. The MPI spec says that the third argument is a buffer of
> MPI_MAX_PORT_NAME characters, but the MPICH implementation expects the
> buffer to be 1024 characters: in PMI_Lookup_name( const char
> service_name[], char port[] ), the call is to PMIU_getval( "port", port,
> PMIU_MAXLINE ), where PMIU_MAXLINE = 1024.
>
> In mpi.h, MPI_MAX_PORT_NAME is 256.
>
> thanks,
> /jr
Thanks for your report. This has been fixed for the next release. In
the meantime, here is a patch you can use. The file simple_pmi.c is in
mpich2/src/pmi/simple .
Regards,
Rusty Lusk
*** simple_pmi.c 20 Jan 2006 19:35:59 -0000 1.85
--- simple_pmi.c 1 Feb 2006 19:10:18 -0000
***************
*** 49,54 ****
--- 49,55 ----
#include "pmi.h"
#include "simple_pmiutil.h"
+ #include "mpi.h" /* to get MPI_MAX_PORT_NAME */
/*
These are global variable used *ONLY* in this file, and are hence
***************
*** 683,689 ****
****/
return( PMI_FAIL );
}
! PMIU_getval( "port", port, PMIU_MAXLINE );
}
}
else
--- 684,690 ----
****/
return( PMI_FAIL );
}
! PMIU_getval( "port", port, MPI_MAX_PORT_NAME );
}
}
else
More information about the mpich-discuss
mailing list