コード例 #1
0
int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
                   int target_rank, MPI_Aint target_disp, int target_count,
                   MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) 
{
    
    char typename[MPI_MAX_OBJECT_NAME], target_dt[MPI_MAX_OBJECT_NAME];
    char winname[MPI_MAX_OBJECT_NAME];
    int len;
    int rank;
    
    PMPI_Comm_rank(MPI_COMM_WORLD, &rank);    
    PMPI_Type_get_name(origin_datatype, typename, &len);
    PMPI_Type_get_name(target_datatype, target_dt, &len);
    PMPI_Win_get_name(win, winname, &len);
    
    fprintf(stderr, "MPI_ACCUMULATE[%d]: origin_addr %0" PRIxPTR " origin_count %d origin_datatype %s\n"
            "\ttarget_rank %d target_disp %" PRIdPTR " target_count %d target_datatype %s op %s win %s\n",
            rank, (uintptr_t)origin_addr, origin_count, typename, target_rank, (intptr_t) target_disp,
            target_count, target_dt, op->o_name, winname);
    fflush(stderr);
    
    return PMPI_Accumulate(origin_addr, origin_count, origin_datatype,
                           target_rank, target_disp, target_count,
                           target_datatype, op, win);
}
コード例 #2
0
ファイル: accumulate_f.c プロジェクト: 00datman/ompi
void ompi_accumulate_f(char *origin_addr, MPI_Fint *origin_count,
		      MPI_Fint *origin_datatype, MPI_Fint *target_rank,
		      MPI_Aint *target_disp, MPI_Fint *target_count,
		      MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win,
		      MPI_Fint *ierr)
{
    int ierr_c;

    MPI_Datatype c_origin_datatype = PMPI_Type_f2c(*origin_datatype);
    MPI_Datatype c_target_datatype = PMPI_Type_f2c(*target_datatype);
    MPI_Win c_win = PMPI_Win_f2c(*win);
    MPI_Op c_op = PMPI_Op_f2c(*op);

    ierr_c = PMPI_Accumulate(OMPI_F2C_BOTTOM(origin_addr),
                             OMPI_FINT_2_INT(*origin_count),
                             c_origin_datatype,
                             OMPI_FINT_2_INT(*target_rank),
                             *target_disp,
                             OMPI_FINT_2_INT(*target_count),
                             c_target_datatype, c_op, c_win);

    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(ierr_c);
}
コード例 #3
0
ファイル: smpi_mpi.c プロジェクト: FlorianPO/simgrid
int MPI_Accumulate( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,
    MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win){
  return PMPI_Accumulate( origin_addr,origin_count, origin_datatype,target_rank,
      target_disp, target_count,target_datatype,op, win);
}