00001
00002
00003
00004
00005
00006
00007
00008 #include "ad_testfs.h"
00009 #include "adioi.h"
00010
00011 #include "mpiu_greq.h"
00012 #include "../../mpi-io/mpioimpl.h"
00013
00014
00015
00016
00017
00018 void ADIOI_TESTFS_IwriteContig(ADIO_File fd, void *buf, int count,
00019 MPI_Datatype datatype, int file_ptr_type,
00020 ADIO_Offset offset, ADIO_Request *request, int
00021 *error_code)
00022 {
00023 ADIO_Status status;
00024 int myrank, nprocs, typesize, len;
00025
00026 *error_code = MPI_SUCCESS;
00027
00028 MPI_Type_size(datatype, &typesize);
00029 MPI_Comm_size(fd->comm, &nprocs);
00030 MPI_Comm_rank(fd->comm, &myrank);
00031 FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_IwriteContig called on %s\n",
00032 myrank, nprocs, fd->filename);
00033 FPRINTF(stdout, "[%d/%d] calling ADIOI_TESTFS_WriteContig\n",
00034 myrank, nprocs);
00035
00036 len = count * typesize;
00037 ADIOI_TESTFS_WriteContig(fd, buf, len, MPI_BYTE, file_ptr_type,
00038 offset, &status, error_code);
00039 MPIO_Completed_request_create(&fd, len, error_code, request);
00040
00041 }
00042
00043 void ADIOI_TESTFS_IwriteStrided(ADIO_File fd, void *buf, int count,
00044 MPI_Datatype datatype, int file_ptr_type,
00045 ADIO_Offset offset, ADIO_Request *request, int
00046 *error_code)
00047 {
00048 ADIO_Status status;
00049 int myrank, nprocs;
00050 int typesize;
00051
00052 *error_code = MPI_SUCCESS;
00053
00054 MPI_Comm_size(fd->comm, &nprocs);
00055 MPI_Comm_rank(fd->comm, &myrank);
00056 MPI_Type_size(datatype, &typesize);
00057
00058 FPRINTF(stdout, "[%d/%d] ADIOI_TESTFS_IwriteStrided called on %s\n",
00059 myrank, nprocs, fd->filename);
00060 FPRINTF(stdout, "[%d/%d] calling ADIOI_TESTFS_WriteStrided\n",
00061 myrank, nprocs);
00062
00063 ADIOI_TESTFS_WriteStrided(fd, buf, count, datatype, file_ptr_type,
00064 offset, &status, error_code);
00065 MPIO_Completed_request_create(&fd, count*typesize, error_code, request);
00066
00067 }