Ejemplo n.º 1
0
int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, void *buf,
                          int count, MPI_Datatype datatype, 
                          MPI_Status *status)
{
  _MPI_COVERAGE();
  return PMPI_File_write_at_all (fh, offset, buf, count, datatype, status); 
}
Ejemplo n.º 2
0
int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, const void *buff, int cnt, 
                          MPI_Datatype dtype, MPI_Status *st)
{
    int g2g = 1;
    char call[COLLCHK_SM_STRLEN];
    char err_str[COLLCHK_STD_STRLEN];
    MPI_Comm comm;

    sprintf(call, "FILE_WRITE_AT_ALL");

    /* Check if init has been called */
    g2g = CollChk_is_init();

    if(g2g) {
        /* get the communicator */
        if (!CollChk_get_fh(fh, &comm)) {
            return CollChk_err_han("File has not been opened.",
                                   COLLCHK_ERR_FILE_NOT_OPEN,
                                   call, MPI_COMM_WORLD);
        }

        /* check for call consistancy */
        CollChk_same_call(comm, call);

        /* check not after a begin; */
        if(COLLCHK_CALLED_BEGIN) {
            sprintf(err_str, "A MPI_File_%s_begin operation has been called, "
                             "you must call MPI_File_%s_end first.",
                             CollChk_begin_str, CollChk_begin_str);
            return CollChk_err_han(err_str, COLLCHK_ERR_PREVIOUS_BEGIN,
                                   call, MPI_COMM_WORLD);
        }

        /* make the call */
        return PMPI_File_write_at_all(fh, offset, buff, cnt, dtype, st);
    }
    else {
        /* init not called */
        return CollChk_err_han("MPI_Init() has not been called.",
                               COLLCHK_ERR_NOT_INIT, call, MPI_COMM_WORLD);
    }
}
Ejemplo n.º 3
0
void ompi_file_write_at_all_f(MPI_Fint *fh, MPI_Offset *offset,
			     char *buf, MPI_Fint *count,
			     MPI_Fint *datatype, MPI_Fint *status,
			     MPI_Fint *ierr)
{
   int c_ierr;
   MPI_File c_fh = PMPI_File_f2c(*fh);
   MPI_Datatype c_type = PMPI_Type_f2c(*datatype);
    OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)

    OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)

   c_ierr = PMPI_File_write_at_all(c_fh,
                                  (MPI_Offset) *offset,
                                  OMPI_F2C_BOTTOM(buf),
                                  OMPI_FINT_2_INT(*count),
                                  c_type,
                                  c_status);
   if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
}