@@ -352,6 +352,20 @@ int mca_common_ompio_file_iwrite_at (ompio_file_t *fh,
352352
353353/* Collective operations */
354354/******************************************************************/
355+ int mca_common_ompio_file_write_all (ompio_file_t * fh ,
356+ const void * buf ,
357+ int count ,
358+ struct ompi_datatype_t * datatype ,
359+ ompi_status_public_t * status )
360+ {
361+ int ret = OMPI_SUCCESS ;
362+ ret = fh -> f_fcoll -> fcoll_file_write_all (fh ,
363+ buf ,
364+ count ,
365+ datatype ,
366+ status );
367+ return ret ;
368+ }
355369
356370int mca_common_ompio_file_write_at_all (ompio_file_t * fh ,
357371 OMPI_MPI_OFFSET_TYPE offset ,
@@ -365,30 +379,23 @@ int mca_common_ompio_file_write_at_all (ompio_file_t *fh,
365379 mca_common_ompio_file_get_position (fh , & prev_offset );
366380
367381 mca_common_ompio_set_explicit_offset (fh , offset );
368- ret = fh -> f_fcoll -> fcoll_file_write_all (fh ,
369- buf ,
370- count ,
371- datatype ,
372- status );
373-
382+ ret = mca_common_ompio_file_write_all (fh ,
383+ buf ,
384+ count ,
385+ datatype ,
386+ status );
387+
374388 mca_common_ompio_set_explicit_offset (fh , prev_offset );
375389 return ret ;
376390}
377391
378- int mca_common_ompio_file_iwrite_at_all (ompio_file_t * fp ,
379- OMPI_MPI_OFFSET_TYPE offset ,
380- const void * buf ,
381- int count ,
382- struct ompi_datatype_t * datatype ,
383- ompi_request_t * * request )
392+ int mca_common_ompio_file_iwrite_all (ompio_file_t * fp ,
393+ const void * buf ,
394+ int count ,
395+ struct ompi_datatype_t * datatype ,
396+ ompi_request_t * * request )
384397{
385-
386398 int ret = OMPI_SUCCESS ;
387- OMPI_MPI_OFFSET_TYPE prev_offset ;
388-
389- mca_common_ompio_file_get_position (fp , & prev_offset );
390-
391- mca_common_ompio_set_explicit_offset (fp , offset );
392399
393400 if ( NULL != fp -> f_fcoll -> fcoll_file_iwrite_all ) {
394401 ret = fp -> f_fcoll -> fcoll_file_iwrite_all (fp ,
@@ -404,11 +411,32 @@ int mca_common_ompio_file_iwrite_at_all (ompio_file_t *fp,
404411 ret = mca_common_ompio_file_iwrite ( fp , buf , count , datatype , request );
405412 }
406413
414+ return ret ;
415+ }
416+
417+
418+ int mca_common_ompio_file_iwrite_at_all (ompio_file_t * fp ,
419+ OMPI_MPI_OFFSET_TYPE offset ,
420+ const void * buf ,
421+ int count ,
422+ struct ompi_datatype_t * datatype ,
423+ ompi_request_t * * request )
424+ {
425+
426+ int ret = OMPI_SUCCESS ;
427+ OMPI_MPI_OFFSET_TYPE prev_offset ;
428+
429+ mca_common_ompio_file_get_position (fp , & prev_offset );
430+ mca_common_ompio_set_explicit_offset (fp , offset );
431+
432+ ret = mca_common_ompio_file_iwrite_all ( fp , buf , count , datatype , request );
433+
407434 mca_common_ompio_set_explicit_offset (fp , prev_offset );
408435 return ret ;
409436}
410437
411438
439+
412440/* Helper function used by both read and write operations */
413441/**************************************************************/
414442
0 commit comments