AMPI #952: update ROMIO to MPICH2-1.4.1p1
[charm.git] / src / libs / ck-libs / ampi / romio / mpi-io / write_atall.c
blob0987df45b2fb23503e3be269e93848d6eaae9210
1 /* -*- Mode: C; c-basic-offset:4 ; -*- */
2 /*
4 * Copyright (C) 1997 University of Chicago.
5 * See COPYRIGHT notice in top-level directory.
6 */
8 #include "mpioimpl.h"
10 #ifdef HAVE_WEAK_SYMBOLS
12 #if defined(HAVE_PRAGMA_WEAK)
13 #pragma weak MPI_File_write_at_all = PMPI_File_write_at_all
14 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
15 #pragma _HP_SECONDARY_DEF PMPI_File_write_at_all MPI_File_write_at_all
16 #elif defined(HAVE_PRAGMA_CRI_DUP)
17 #pragma _CRI duplicate MPI_File_write_at_all as PMPI_File_write_at_all
18 /* end of weak pragmas */
19 #endif
21 /* Include mapping from MPI->PMPI */
22 #define MPIO_BUILD_PROFILING
23 #include "mpioprof.h"
24 #endif
26 /* status object not filled currently */
28 /*@
29 MPI_File_write_at_all - Collective write using explict offset
31 Input Parameters:
32 . fh - file handle (handle)
33 . offset - file offset (nonnegative integer)
34 . buf - initial address of buffer (choice)
35 . count - number of elements in buffer (nonnegative integer)
36 . datatype - datatype of each buffer element (handle)
38 Output Parameters:
39 . status - status object (Status)
41 .N fortran
42 @*/
43 int MPI_File_write_at_all(MPI_File mpi_fh, MPI_Offset offset, void *buf,
44 int count, MPI_Datatype datatype,
45 MPI_Status *status)
47 int error_code;
48 static char myname[] = "MPI_FILE_WRITE_AT_ALL";
49 #ifdef MPI_hpux
50 int fl_xmpi;
52 HPMP_IO_START(fl_xmpi, BLKMPIFILEWRITEATALL, TRDTBLOCK, fh, datatype, count);
53 #endif /* MPI_hpux */
55 error_code = MPIOI_File_write_all(mpi_fh, offset, ADIO_EXPLICIT_OFFSET,
56 buf, count, datatype, myname, status);
58 #ifdef MPI_hpux
59 HPMP_IO_END(fl_xmpi, fh, datatype, count);
60 #endif /* MPI_hpux */
61 return error_code;