本文整理汇总了C++中ROMIO_PREFIX函数的典型用法代码示例。如果您正苦于以下问题:C++ ROMIO_PREFIX函数的具体用法?C++ ROMIO_PREFIX怎么用?C++ ROMIO_PREFIX使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ROMIO_PREFIX函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: progress
static int progress()
{
opal_list_item_t *item, *next;
int ret, flag, count;
ROMIO_PREFIX(MPIO_Request) romio_rq;
mca_io_base_request_t *ioreq;
/* Troll through all pending requests and try to progress them.
If a request finishes, remove it from the list. */
count = 0;
OPAL_THREAD_LOCK (&mca_io_romio_mutex);
for (item = opal_list_get_first(&mca_io_romio_pending_requests);
item != opal_list_get_end(&mca_io_romio_pending_requests);
item = next) {
next = opal_list_get_next(item);
ioreq = (mca_io_base_request_t*) item;
romio_rq = ((mca_io_romio_request_t *) item)->romio_rq;
ret = ROMIO_PREFIX(MPIO_Test)(&romio_rq, &flag,
&(((ompi_request_t *) item)->req_status));
if ((0 != ret) || (0 != flag)) {
ioreq->super.req_status.MPI_ERROR = ret;
++count;
/* we're done, so remove us from the pending list */
opal_list_remove_item(&mca_io_romio_pending_requests, item);
/* mark as complete (and make sure to wake up any waiters */
ompi_request_complete((ompi_request_t*) item);
mca_io_base_request_progress_del();
/* if the request has been freed already, the user isn't
* going to call test or wait on us, so we need to do it
* here
*/
if (ioreq->free_called) {
ret = ompi_request_free((ompi_request_t**) &ioreq);
if (OMPI_SUCCESS != ret) {
OPAL_THREAD_UNLOCK(&mca_io_romio_mutex);
return count;
}
}
}
}
OPAL_THREAD_UNLOCK (&mca_io_romio_mutex);
/* Return how many requests completed */
return count;
}
示例2: mca_io_romio314_file_set_view
int
mca_io_romio314_file_set_view (ompi_file_t *fh,
MPI_Offset disp,
struct ompi_datatype_t *etype,
struct ompi_datatype_t *filetype,
const char *datarep,
opal_info_t *info)
{
int ret;
mca_io_romio314_data_t *data;
// An opal_info_t isn't a full ompi_info_t. so if we're using an MPI call
// below with an MPI_Info, we need to create an equivalent MPI_Info. This
// isn't ideal but it only happens a few places.
ompi_info_t *ompi_info;
ompi_info = OBJ_NEW(ompi_info_t);
if (!ompi_info) { return(MPI_ERR_NO_MEM); }
opal_info_t *opal_info = &(ompi_info->super);
opal_info_dup (info, &opal_info);
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
ret =
ROMIO_PREFIX(MPI_File_set_view) (data->romio_fh, disp, etype, filetype,
datarep, ompi_info);
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
ompi_info_free(&ompi_info);
return ret;
}
示例3: mca_io_romio314_file_open
int
mca_io_romio314_file_open (ompi_communicator_t *comm,
const char *filename,
int amode,
opal_info_t *info,
ompi_file_t *fh)
{
int ret;
mca_io_romio314_data_t *data;
// An opal_info_t isn't a full ompi_info_t. so if we're using an MPI call
// below with an MPI_Info, we need to create an equivalent MPI_Info. This
// isn't ideal but it only happens a few places.
ompi_info_t *ompi_info;
ompi_info = OBJ_NEW(ompi_info_t);
if (!ompi_info) { return(MPI_ERR_NO_MEM); }
opal_info_t *opal_info = &(ompi_info->super);
opal_info_dup (info, &opal_info);
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
// OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
ret = ROMIO_PREFIX(MPI_File_open)(comm, filename, amode, ompi_info,
&data->romio_fh);
// OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
ompi_info_free(&ompi_info);
return ret;
}
示例4: mca_io_romio321_file_iwrite_at_all
int
mca_io_romio321_file_iwrite_at_all (ompi_file_t *fh,
MPI_Offset offset,
const void *buf,
int count,
struct ompi_datatype_t *datatype,
ompi_request_t **request)
{
int ret;
mca_io_romio321_data_t *data;
data = (mca_io_romio321_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio321_mutex);
// ----------------------------------------------------
// NOTE: If you upgrade ROMIO, replace this with the actual ROMIO call.
// ----------------------------------------------------
// No support for non-blocking collective I/O operations.
// Fake it with individual non-blocking I/O operations.
// Similar to OMPIO
ret =
ROMIO_PREFIX(MPI_File_iwrite_at_all) (data->romio_fh, offset, buf, count,
datatype, request);
OPAL_THREAD_UNLOCK (&mca_io_romio321_mutex);
return ret;
}
示例5: mca_io_romio314_file_close
int
mca_io_romio314_file_close (ompi_file_t *fh)
{
int ret;
mca_io_romio314_data_t *data;
/* If we've already started MPI_Finalize by this point, then just
give up (because ROMIO's file close routine calls MPI_Barrier,
which we obviously can't do if we've started to MPI_Finalize).
The user didn't close the file, so they should expect
unexpected behavior. */
if (ompi_mpi_finalized) {
return OMPI_SUCCESS;
}
/* Because ROMIO expects the MPI library to provide error handler
* management routines but it doesn't ever participate in
* MPI_File_close, we have to somehow inform the MPI library that
* we no longer hold a reference to any user defined error
* handler. We do this by setting the errhandler at this point to
* MPI_ERRORS_RETURN. */
if (fh->error_handler != &ompi_mpi_errors_return.eh) {
OBJ_RELEASE(fh->error_handler);
fh->error_handler = &ompi_mpi_errors_return.eh;
OBJ_RETAIN(fh->error_handler);
}
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
ret = ROMIO_PREFIX(MPI_File_close) (&data->romio_fh);
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
return ret;
}
示例6: delete_select
static int delete_select(char *filename, struct ompi_info_t *info,
struct mca_io_base_delete_t *private_data)
{
int ret;
OPAL_THREAD_LOCK (&mca_io_romio_mutex);
ret = ROMIO_PREFIX(MPI_File_delete)(filename, info);
OPAL_THREAD_UNLOCK (&mca_io_romio_mutex);
return ret;
}
示例7: mca_io_romio314_file_sync
int
mca_io_romio314_file_sync (ompi_file_t *fh)
{
int ret;
mca_io_romio314_data_t *data;
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
ret = ROMIO_PREFIX(MPI_File_sync) (data->romio_fh);
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
return ret;
}
示例8: mca_io_romio314_file_get_atomicity
int
mca_io_romio314_file_get_atomicity (ompi_file_t *fh,
int *flag)
{
int ret;
mca_io_romio314_data_t *data;
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
ret = ROMIO_PREFIX(MPI_File_get_atomicity) (data->romio_fh, flag);
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
return ret;
}
示例9: mca_io_romio314_file_get_info
int
mca_io_romio314_file_get_info (ompi_file_t *fh,
opal_info_t ** info_used)
{
int ret;
mca_io_romio314_data_t *data;
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
ret = ROMIO_PREFIX(MPI_File_get_info) (data->romio_fh, info_used);
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
return ret;
}
示例10: mca_io_romio_file_get_amode
int
mca_io_romio_file_get_amode (ompi_file_t *fh,
int *amode)
{
int ret;
mca_io_romio_data_t *data;
data = (mca_io_romio_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio_mutex);
ret = ROMIO_PREFIX(MPI_File_get_amode) (data->romio_fh, amode);
OPAL_THREAD_UNLOCK (&mca_io_romio_mutex);
return ret;
}
示例11: mca_io_romio314_file_get_position
int
mca_io_romio314_file_get_position (ompi_file_t *fh,
MPI_Offset * offset)
{
int ret;
mca_io_romio314_data_t *data;
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
ret = ROMIO_PREFIX(MPI_File_get_position) (data->romio_fh, offset);
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
return ret;
}
示例12: mca_io_romio314_file_preallocate
int
mca_io_romio314_file_preallocate (ompi_file_t *fh,
MPI_Offset size)
{
int ret;
mca_io_romio314_data_t *data;
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
ret = ROMIO_PREFIX(MPI_File_preallocate) (data->romio_fh, size);
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
return ret;
}
示例13: mca_io_romio_file_read_all_end
int
mca_io_romio_file_read_all_end (ompi_file_t *fh,
void *buf,
ompi_status_public_t * status)
{
int ret;
mca_io_romio_data_t *data;
data = (mca_io_romio_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio_mutex);
ret = ROMIO_PREFIX(MPI_File_read_all_end) (data->romio_fh, buf, status);
OPAL_THREAD_UNLOCK (&mca_io_romio_mutex);
return ret;
}
示例14: mca_io_romio314_file_seek
int
mca_io_romio314_file_seek (ompi_file_t *fh,
MPI_Offset offset,
int whence)
{
int ret;
mca_io_romio314_data_t *data;
data = (mca_io_romio314_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio314_mutex);
ret = ROMIO_PREFIX(MPI_File_seek) (data->romio_fh, offset, whence);
OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);
return ret;
}
示例15: mca_io_romio_file_get_byte_offset
int
mca_io_romio_file_get_byte_offset (ompi_file_t *fh,
MPI_Offset offset,
MPI_Offset * disp)
{
int ret;
mca_io_romio_data_t *data;
data = (mca_io_romio_data_t *) fh->f_io_selected_data;
OPAL_THREAD_LOCK (&mca_io_romio_mutex);
ret = ROMIO_PREFIX(MPI_File_get_byte_offset) (data->romio_fh, offset, disp);
OPAL_THREAD_UNLOCK (&mca_io_romio_mutex);
return ret;
}