[mpich-devel] Should MPI_{Comm|Win|File}_Set_info(..., MPI_INFO_NULL) fail ?

Rajeev Thakur thakur at mcs.anl.gov
Wed Apr 9 18:10:56 CDT 2014


It is not clear that passing MPI_INFO_NULL should result in resetting hints to default. For example, pg 248 at the bottom says

"When an info object that specifies a subset of valid hints is passed to MPI_COMM_SET_INFO, there will be no effect on previously set or defaulted hints that the info does not specify."

So if MPI_INFO_NULL is passed, at best nothing should happen. But the function definition doesn't say that INFO_NULL is a valid parameter.

The behavior you are seeing is because comm_set_info uses a different (probably buggy) null test
           MPIR_ERRTEST_ARGNULL(info, "info", mpi_errno);
whereas win_set_info uses
            MPIR_ERRTEST_INFO(info, mpi_errno);
and I/O uses something else :-).

Rajeev


On Apr 9, 2014, at 4:51 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:

> Right now, it success for Comm but fails for Win and File. IMHO, all
> should success, this should be a way for users to ask the
> implementation "please, reset the info hints to whatever the defaults
> are".
> 
> If you decide they should fail, then the Comm case needs a fix to
> generate an error.
> 
> $ mpicc comm_set_info.c
> $ ./a.out
> 
> 
> $ mpicc win_set_info.c
> $ ./a.out
> Fatal error in MPI_Win_set_info: Invalid argument, error stack:
> MPI_Win_set_info(126): MPI_Win_set_info(win=win=0xa0000000,
> info=MPI_INFO_NULL) failed
> MPI_Win_set_info(82).: Null MPI_Info
> 
> 
> $ mpicc file_set_info.c
> $ ./a.out
> Fatal error in PMPI_Info_dup: Invalid argument, error stack:
> PMPI_Info_dup(149): MPI_Info_dup(MPI_INFO_NULL, newinfo=0x7fff58b899c4) failed
> PMPI_Info_dup(108): Null MPI_Info
> 
> 
> PS: Perhaps you have an easy fix for the error message (PMPI -> MPI)
> in the last one?
> 
> -- 
> 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
> <comm_set_info.c><file_set_info.c><win_set_info.c>



More information about the devel mailing list