| 1 |
/* |
| 2 |
* Copyright (C) by Argonne National Laboratory |
| 3 |
* See COPYRIGHT in top-level directory |
| 4 |
*/ |
| 5 |
|
| 6 |
#include "ad_daos.h" |
| 7 |
|
| 8 |
void ADIOI_DAOS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) |
| 9 |
{ |
| 10 |
int ret, rank; |
| 11 |
struct ADIO_DAOS_cont *cont = fd->fs_ptr; |
| 12 |
static char myname[] = "ADIOI_DAOS_RESIZE"; |
| 13 |
|
| 14 |
*error_code = MPI_SUCCESS; |
| 15 |
MPI_Comm_rank(fd->comm, &rank); |
| 16 |
MPI_Barrier(fd->comm); |
| 17 |
|
| 18 |
if (rank == fd->hints->ranklist[0]) |
| 19 |
ret = dfs_punch(cont->dfs, cont->obj, size, DFS_MAX_FSIZE); |
| 20 |
|
| 21 |
MPI_Bcast(&ret, 1, MPI_INT, fd->hints->ranklist[0], fd->comm); |
| 22 |
if (ret != 0) |
| 23 |
*error_code = ADIOI_DAOS_err(myname, cont->obj_name, __LINE__, ret); |
| 24 |
} |