1 /* -*- Mode: C; c-basic-offset:4 ; -*- */
4 * Copyright (C) 1997 University of Chicago.
5 * See COPYRIGHT notice in top-level directory.
10 #ifdef HAVE_WEAK_SYMBOLS
12 #if defined(HAVE_PRAGMA_WEAK)
13 #pragma weak MPI_File_write_all_end = PMPI_File_write_all_end
14 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
15 #pragma _HP_SECONDARY_DEF PMPI_File_write_all_end MPI_File_write_all_end
16 #elif defined(HAVE_PRAGMA_CRI_DUP)
17 #pragma _CRI duplicate MPI_File_write_all_end as PMPI_File_write_all_end
18 /* end of weak pragmas */
21 /* Include mapping from MPI->PMPI */
22 #define MPIO_BUILD_PROFILING
27 MPI_File_write_all_end - Complete a split collective write using individual file pointer
30 . fh - file handle (handle)
33 . buf - initial address of buffer (choice)
34 . status - status object (Status)
38 int MPI_File_write_all_end(MPI_File mpi_fh
, void *buf
, MPI_Status
*status
)
41 static char myname
[] = "MPI_FILE_WRITE_ALL_END";
43 error_code
= MPIOI_File_write_all_end(mpi_fh
, buf
, myname
, status
);
48 /* prevent multiple definitions of this routine */
49 // #ifdef MPIO_BUILD_PROFILING
50 int MPIOI_File_write_all_end(MPI_File mpi_fh
,
58 MPIU_UNREFERENCED_ARG(buf
);
60 MPIU_THREAD_CS_ENTER(ALLFUNC
,);
62 fh
= MPIO_File_resolve(mpi_fh
);
64 /* --BEGIN ERROR HANDLING-- */
65 MPIO_CHECK_FILE_HANDLE(fh
, myname
, error_code
);
67 if (!(fh
->split_coll_count
))
69 error_code
= MPIO_Err_create_code(MPI_SUCCESS
, MPIR_ERR_RECOVERABLE
,
70 myname
, __LINE__
, MPI_ERR_IO
,
71 "**iosplitcollnone", 0);
72 error_code
= MPIO_Err_return_file(fh
, error_code
);
75 /* --END ERROR HANDLING-- */
77 #ifdef HAVE_STATUS_SET_BYTES
78 /* FIXME - we should really ensure that the split_datatype remains
79 valid by incrementing the ref count in the write_allb.c routine
80 and decrement it here after setting the bytes */
81 if (status
!= MPI_STATUS_IGNORE
)
82 *status
= fh
->split_status
;
84 fh
->split_coll_count
= 0;
86 error_code
= MPI_SUCCESS
;
89 MPIU_THREAD_CS_EXIT(ALLFUNC
,);