本文整理汇总了C++中MPI_File_f2c函数的典型用法代码示例。如果您正苦于以下问题:C++ MPI_File_f2c函数的具体用法?C++ MPI_File_f2c怎么用?C++ MPI_File_f2c使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MPI_File_f2c函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mpi_file_set_size_
FORTRAN_API void FORT_CALL mpi_file_set_size_(MPI_Fint * fh, MPI_Offset * size, MPI_Fint * ierr)
{
MPI_File fh_c;
fh_c = MPI_File_f2c(*fh);
*ierr = MPI_File_set_size(fh_c, *size);
}
示例2: mpi_file_get_view_
void mpi_file_get_view_(MPI_Fint *fh,MPI_Offset *disp,MPI_Fint *etype,
MPI_Fint *filetype,char *datarep, MPI_Fint *ierr, int str_len )
{
MPI_File fh_c;
MPI_Datatype etype_c, filetype_c;
int i, tmpreplen;
char *tmprep;
if (datarep <= (char *) 0) {
FPRINTF(stderr, "MPI_File_get_view: datarep is an invalid address\n");
MPI_Abort(MPI_COMM_WORLD, 1);
}
tmprep = (char *) ADIOI_Malloc((MPI_MAX_DATAREP_STRING+1) * sizeof(char));
fh_c = MPI_File_f2c(*fh);
*ierr = MPI_File_get_view(fh_c, disp, &etype_c, &filetype_c, tmprep);
tmpreplen = strlen(tmprep);
if (tmpreplen <= str_len) {
ADIOI_Strncpy(datarep, tmprep, tmpreplen);
/* blank pad the remaining space */
for (i=tmpreplen; i<str_len; i++) datarep[i] = ' ';
}
else {
/* not enough space */
ADIOI_Strncpy(datarep, tmprep, str_len);
/* this should be flagged as an error. */
*ierr = MPI_ERR_UNKNOWN;
}
*etype = MPI_Type_c2f(etype_c);
*filetype = MPI_Type_c2f(filetype_c);
ADIOI_Free(tmprep);
}
示例3: mpi_file_iread_shared_
FORT_DLL_SPEC void FORT_CALL mpi_file_iread_shared_ ( MPI_Fint *v1, void*v2, MPI_Fint *v3, MPI_Fint *v4, MPIO_Request*v5, MPI_Fint *ierr ){
#ifdef MPI_MODE_RDONLY
if (v2 == MPIR_F_MPI_BOTTOM) v2 = MPI_BOTTOM;
*ierr = MPI_File_iread_shared( MPI_File_f2c(*v1), v2, (int)*v3, (MPI_Datatype)(*v4), v5 );
#else
*ierr = MPI_ERR_INTERN;
#endif
}
示例4: mpi_file_write_at_all_begin_
FORT_DLL_SPEC void FORT_CALL mpi_file_write_at_all_begin_ ( MPI_Fint *v1, MPI_Offset *v2, void*v3, MPI_Fint *v4, MPI_Fint *v5, MPI_Fint *ierr ){
#ifdef MPI_MODE_RDONLY
if (v3 == MPIR_F_MPI_BOTTOM) v3 = MPI_BOTTOM;
*ierr = MPI_File_write_at_all_begin( MPI_File_f2c(*v1), (MPI_Offset)*v2, v3, (int)*v4, (MPI_Datatype)(*v5) );
#else
*ierr = MPI_ERR_INTERN;
#endif
}
示例5: mpi_file_set_errhandler_f
void mpi_file_set_errhandler_f(MPI_Fint *fh, MPI_Fint *errhandler,
MPI_Fint *ierr)
{
MPI_File c_fh = MPI_File_f2c(*fh);
MPI_Errhandler c_err = MPI_Errhandler_f2c(*errhandler);
*ierr = OMPI_INT_2_FINT(MPI_File_set_errhandler(c_fh, c_err));
}
示例6: mpi_file_write_at_all_end_
FORTRAN_API void FORT_CALL mpi_file_write_at_all_end_(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr )
{
MPI_File fh_c;
fh_c = MPI_File_f2c(*fh);
*ierr = MPI_File_write_at_all_end(fh_c,buf,status);
}
示例7: mpi_file_close_
FORTRAN_API void FORT_CALL mpi_file_close_(MPI_Fint *fh, MPI_Fint *ierr )
{
MPI_File fh_c;
fh_c = MPI_File_f2c(*fh);
*ierr = MPI_File_close(&fh_c);
*fh = MPI_File_c2f(fh_c);
}
示例8: mpi_file_read_ordered_begin_
FORT_DLL_SPEC void FORT_CALL mpi_file_read_ordered_begin_ ( MPI_Fint *v1, void*v2, MPI_Fint *v3, MPI_Fint *v4, MPI_Fint *ierr ){
#ifdef MPI_MODE_RDONLY
if (v2 == MPIR_F_MPI_BOTTOM) v2 = MPI_BOTTOM;
*ierr = MPI_File_read_ordered_begin( MPI_File_f2c(*v1), v2, (int)*v3, (MPI_Datatype)(*v4) );
#else
*ierr = MPI_ERR_INTERN;
#endif
}
示例9: mpi_file_read_all_end_
void FORTRAN_API mpi_file_read_all_end_(MPI_Fint *fh,void *buf,MPI_Status *status, int *ierr )
{
MPI_File fh_c;
fh_c = MPI_File_f2c(*fh);
*ierr = MPI_File_read_all_end(fh_c,buf,status);
}
示例10: ompi_file_preallocate_f
void ompi_file_preallocate_f(MPI_Fint *fh, MPI_Offset *size, MPI_Fint *ierr)
{
int c_ierr;
MPI_File c_fh = MPI_File_f2c(*fh);
c_ierr = MPI_File_preallocate(c_fh, (MPI_Offset) *size);
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
}
示例11: mpi_file_read_ordered_end_
FORTRAN_API void FORT_CALL mpi_file_read_ordered_end_(MPI_Fint *fh,void *buf,MPI_Status *status, MPI_Fint *ierr )
{
MPI_File fh_c;
fh_c = MPI_File_f2c(*fh);
*ierr = MPI_File_read_ordered_end(fh_c,buf,status);
}
示例12: mpi_file_read_
void FORTRAN_API mpi_file_read_(MPI_Fint *fh,void *buf,int *count,
MPI_Datatype *datatype,MPI_Status *status, int *ierr )
{
MPI_File fh_c;
fh_c = MPI_File_f2c(*fh);
*ierr = MPI_File_read(fh_c,buf,*count,*datatype,status);
}
示例13: mpi_file_read_at_
FORTRAN_API void FORT_CALL mpi_file_read_at_(MPI_Fint *fh,MPI_Offset *offset,void *buf,
MPI_Fint *count,MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr )
{
MPI_File fh_c;
fh_c = MPI_File_f2c(*fh);
*ierr = MPI_File_read_at(fh_c,*offset,buf,*count,(MPI_Datatype)*datatype,status);
}
示例14: mpi_file_read_shared_
FORTRAN_API void FORT_CALL mpi_file_read_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count,
MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr )
{
MPI_File fh_c;
fh_c = MPI_File_f2c(*fh);
*ierr = MPI_File_read_shared(fh_c,buf,*count,(MPI_Datatype)*datatype,status);
}
示例15: mpi_file_read_at_all_begin_
void FORTRAN_API mpi_file_read_at_all_begin_(MPI_Fint *fh,MPI_Offset *offset,void *buf,
int *count,MPI_Datatype *datatype, int *ierr )
{
MPI_File fh_c;
fh_c = MPI_File_f2c(*fh);
*ierr = MPI_File_read_at_all_begin(fh_c,*offset,buf,*count,*datatype);
}