• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ROMIO_PREFIX函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ROMIO_PREFIX函数的典型用法代码示例。如果您正苦于以下问题:C++ ROMIO_PREFIX函数的具体用法?C++ ROMIO_PREFIX怎么用?C++ ROMIO_PREFIX使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ROMIO_PREFIX函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:aosm,项目名称:openmpi,代码行数:48,代码来源:io_romio_component.c


示例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;
}
开发者ID:anandhis,项目名称:ompi,代码行数:30,代码来源:io_romio314_file_open.c


示例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;
}
开发者ID:anandhis,项目名称:ompi,代码行数:28,代码来源:io_romio314_file_open.c


示例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;
}
开发者ID:ICLDisco,项目名称:ompi,代码行数:26,代码来源:io_romio321_file_write.c


示例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;
}
开发者ID:markalle,项目名称:ompi,代码行数:35,代码来源:io_romio314_file_open.c


示例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;
}
开发者ID:aosm,项目名称:openmpi,代码行数:11,代码来源:io_romio_component.c


示例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;
}
开发者ID:markalle,项目名称:ompi,代码行数:13,代码来源:io_romio314_file_open.c


示例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;
}
开发者ID:markalle,项目名称:ompi,代码行数:14,代码来源:io_romio314_file_open.c


示例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;
}
开发者ID:markalle,项目名称:ompi,代码行数:14,代码来源:io_romio314_file_open.c


示例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;
}
开发者ID:aosm,项目名称:openmpi,代码行数:14,代码来源:io_romio_file_open.c


示例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;
}
开发者ID:markalle,项目名称:ompi,代码行数:14,代码来源:io_romio314_file_open.c


示例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;
}
开发者ID:markalle,项目名称:ompi,代码行数:14,代码来源:io_romio314_file_open.c


示例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;
}
开发者ID:315234,项目名称:OpenFOAM-2.2.x-OSX,代码行数:15,代码来源:io_romio_file_read.c


示例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;
}
开发者ID:markalle,项目名称:ompi,代码行数:15,代码来源:io_romio314_file_open.c


示例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;
}
开发者ID:aosm,项目名称:openmpi,代码行数:15,代码来源:io_romio_file_open.c


示例16: mca_io_romio314_file_get_type_extent

int
mca_io_romio314_file_get_type_extent (ompi_file_t *fh,
                                   struct ompi_datatype_t *datatype,
                                   MPI_Aint * extent)
{
    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_type_extent) (data->romio_fh, datatype, extent);
    OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);

    return ret;
}
开发者ID:markalle,项目名称:ompi,代码行数:16,代码来源:io_romio314_file_open.c


示例17: register_datarep

static int
register_datarep(char * datarep,
                 MPI_Datarep_conversion_function* read_fn,
                 MPI_Datarep_conversion_function* write_fn,
                 MPI_Datarep_extent_function* extent_fn,
                 void* state)
{
    int ret;

    OPAL_THREAD_LOCK(&mca_io_romio_mutex);
    ret = ROMIO_PREFIX(MPI_Register_datarep(datarep, read_fn, write_fn,
                                            extent_fn, state));
    OPAL_THREAD_UNLOCK(&mca_io_romio_mutex);

    return ret;
}
开发者ID:aosm,项目名称:openmpi,代码行数:16,代码来源:io_romio_component.c


示例18: mca_io_romio321_file_write_ordered_begin

int
mca_io_romio321_file_write_ordered_begin (ompi_file_t *fh,
                                       const void *buf,
                                       int count,
                                       struct ompi_datatype_t *datatype)
{
    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);
    ret = ROMIO_PREFIX(MPI_File_write_ordered_begin) (data->romio_fh, buf,
                                                     count, datatype);
    OPAL_THREAD_UNLOCK (&mca_io_romio321_mutex);

    return ret;
}
开发者ID:ICLDisco,项目名称:ompi,代码行数:17,代码来源:io_romio321_file_write.c


示例19: 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;

    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, info,
                                      &data->romio_fh);
    OPAL_THREAD_UNLOCK (&mca_io_romio314_mutex);

    return ret;
}
开发者ID:markalle,项目名称:ompi,代码行数:18,代码来源:io_romio314_file_open.c


示例20: mca_io_romio_file_read_at_all_begin

int
mca_io_romio_file_read_at_all_begin (ompi_file_t *fh,
                                     MPI_Offset offset,
                                     void *buf,
                                     int count,
                                     struct ompi_datatype_t *datatype)
{
    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_at_all_begin) (data->romio_fh, offset, buf,
                                                 count, datatype);
    OPAL_THREAD_UNLOCK (&mca_io_romio_mutex);

    return ret;
}
开发者ID:315234,项目名称:OpenFOAM-2.2.x-OSX,代码行数:19,代码来源:io_romio_file_read.c



注:本文中的ROMIO_PREFIX函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ROMPAGE函数代码示例发布时间:2022-05-30
下一篇:
C++ ROLLBACK函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap