get_fh.c

来自「mpi并行计算的c++代码 可用vc或gcc编译通过 可以用来搭建并行计算试验环」· C语言 代码 · 共 33 行

C
33
字号
/*   (C) 2004 by Argonne National Laboratory.       See COPYRIGHT in top-level directory.*/#include "collchk.h" int CollChk_get_fh(MPI_File fh, MPI_Comm *comm){    int crr_fh=0, found=0;    /* find the fh */    while( (crr_fh < CollChk_fh_cnt) && !found ) {        if(fh == CollChk_fh_list[crr_fh].fh) {            found = 1;        }         else {            crr_fh++;        }    }    /* return the comm if found */    if(found) {        /* the comm was found */        *comm = CollChk_fh_list[crr_fh].comm;        return 1;    }    else {        /* the comm was not found */        comm = NULL;        return 0;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?