void FORTRAN_API mpi_file_read_at_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_at_all_end(fh_c,buf,status); }
int lemonFinishReading(LemonReader *reader) { int read; int size; MPI_Status status; char MPImode[] = "native"; if (!reader->is_busy) return LEMON_SUCCESS; MPI_Comm_size(reader->cartesian, &size); MPI_File_read_at_all_end(*reader->fp, reader->buffer, &status); reader->pos += reader->bytes_wanted; MPI_File_set_view(*reader->fp, reader->off, MPI_BYTE, MPI_BYTE, MPImode, MPI_INFO_NULL); MPI_File_seek(*reader->fp, reader->pos, MPI_SEEK_SET); MPI_Get_count(&status, MPI_BYTE, &read); /* Doing a data read should never get us to EOF, only header scanning */ if (read != (reader->is_striped ? reader->bytes_wanted / size : reader->bytes_wanted)) { fprintf(stderr, "[LEMON] Node %d reports in lemonFinishReading:\n" " Could not read the required amount of data.\n", reader->my_rank); return LEMON_ERR_READ; } reader->bytes_wanted = 0; reader->buffer = NULL; reader->is_busy = 0; reader->is_striped = 0; return LEMON_SUCCESS; }
FORT_DLL_SPEC void FORT_CALL mpi_file_read_at_all_end_ ( MPI_Fint *v1, void*v2, MPI_Fint *v3, MPI_Fint *ierr ){ #ifdef MPI_MODE_RDONLY *ierr = MPI_File_read_at_all_end( MPI_File_f2c(*v1), v2, (MPI_Status *)(v3) ); #else *ierr = MPI_ERR_INTERN; #endif }
JNIEXPORT void JNICALL Java_mpi_File_readAtAllEnd( JNIEnv *env, jobject jthis, jlong fh, jobject buf, jlongArray stat) { MPI_Status status; void *ptr = (*env)->GetDirectBufferAddress(env, buf); int rc = MPI_File_read_at_all_end((MPI_File)fh, ptr, &status); ompi_java_exceptionCheck(env, rc); ompi_java_status_set(env, stat, &status); }
FORT_DLL_SPEC void FORT_CALL mpi_file_read_at_all_end_ ( MPI_Fint *v1, void*v2, MPI_Fint *v3, MPI_Fint *ierr ){ #ifdef MPI_MODE_RDONLY #ifndef HAVE_MPI_F_INIT_WORKS_WITH_C if (MPIR_F_NeedInit){ mpirinitf_(); MPIR_F_NeedInit = 0; } #endif if (v3 == MPI_F_STATUS_IGNORE) { v3 = (MPI_Fint*)MPI_STATUS_IGNORE; } *ierr = MPI_File_read_at_all_end( MPI_File_f2c(*v1), v2, (MPI_Status *)v3 ); #else *ierr = MPI_ERR_INTERN; #endif }
void ompi_file_read_at_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status, MPI_Fint *ierr) { int c_ierr; MPI_File c_fh = MPI_File_f2c(*fh); OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2) OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status) c_ierr = MPI_File_read_at_all_end(c_fh, buf, c_status); if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr) }