From d1402cf8f5ddf2f393225494c848fd7b16141f4b Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Tue, 19 Sep 2006 16:13:46 +0000 Subject: [PATCH] * Update ROMIO release to the one included with MPICH2-1.0.4p1, tagged in vendor/romio as mpich2-1.0.4p1. This commit was SVN r11715. --- ompi/mca/io/romio/romio/.cvsignore | 17 + .../io/romio/romio/adio/ad_gridftp/.cvsignore | 2 + .../romio/romio/adio/ad_gridftp/.state-cache | 40 ++ .../romio/romio/adio/ad_gridftp/ad_gridftp.h | 2 - .../romio/adio/ad_gridftp/ad_gridftp_close.c | 8 +- .../romio/adio/ad_gridftp/ad_gridftp_delete.c | 8 +- .../romio/adio/ad_gridftp/ad_gridftp_fcntl.c | 2 +- .../romio/adio/ad_gridftp/ad_gridftp_open.c | 30 +- .../romio/adio/ad_gridftp/ad_gridftp_read.c | 16 +- .../romio/adio/ad_gridftp/ad_gridftp_resize.c | 28 +- .../romio/adio/ad_gridftp/ad_gridftp_write.c | 24 +- .../mca/io/romio/romio/adio/ad_hfs/.cvsignore | 6 + .../io/romio/romio/adio/ad_hfs/.state-cache | 25 + .../mca/io/romio/romio/adio/ad_nfs/.cvsignore | 8 + .../io/romio/romio/adio/ad_nfs/.state-cache | 46 ++ .../io/romio/romio/adio/ad_nfs/Makefile.am | 1 + ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs.c | 2 +- ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs.h | 1 + .../io/romio/romio/adio/ad_nfs/ad_nfs_getsh.c | 2 +- .../romio/romio/adio/ad_nfs/ad_nfs_resize.c | 37 ++ .../io/romio/romio/adio/ad_nfs/ad_nfs_setsh.c | 2 +- .../io/romio/romio/adio/ad_ntfs/.cvsignore | 6 + .../io/romio/romio/adio/ad_ntfs/.state-cache | 43 ++ .../romio/romio/adio/ad_ntfs/ad_ntfs_iwrite.c | 10 + .../romio/romio/adio/ad_ntfs/ad_ntfs_read.c | 54 +- .../romio/romio/adio/ad_ntfs/ad_ntfs_resize.c | 1 + .../romio/romio/adio/ad_ntfs/ad_ntfs_write.c | 2 + .../io/romio/romio/adio/ad_panfs/.cvsignore | 3 + .../io/romio/romio/adio/ad_panfs/.state-cache | 16 + .../mca/io/romio/romio/adio/ad_pfs/.cvsignore | 6 + .../io/romio/romio/adio/ad_pfs/.state-cache | 40 ++ .../io/romio/romio/adio/ad_piofs/.cvsignore | 6 + .../io/romio/romio/adio/ad_piofs/.state-cache | 25 + .../io/romio/romio/adio/ad_pvfs/.cvsignore | 6 + .../io/romio/romio/adio/ad_pvfs/.state-cache | 37 ++ .../romio/romio/adio/ad_pvfs/ad_pvfs_flush.c | 2 +- .../romio/romio/adio/ad_pvfs/ad_pvfs_read.c | 2 +- .../romio/romio/adio/ad_pvfs/ad_pvfs_resize.c | 2 +- .../romio/romio/adio/ad_pvfs/ad_pvfs_write.c | 2 +- .../io/romio/romio/adio/ad_pvfs2/.cvsignore | 6 + .../io/romio/romio/adio/ad_pvfs2/.state-cache | 43 ++ .../romio/adio/ad_pvfs2/ad_pvfs2_close.c | 1 + .../romio/adio/ad_pvfs2/ad_pvfs2_flush.c | 5 +- .../romio/adio/ad_pvfs2/ad_pvfs2_hints.c | 30 ++ .../romio/romio/adio/ad_pvfs2/ad_pvfs2_open.c | 104 ++-- .../romio/romio/adio/ad_pvfs2/ad_pvfs2_read.c | 63 ++- .../romio/adio/ad_pvfs2/ad_pvfs2_resize.c | 4 +- .../romio/adio/ad_pvfs2/ad_pvfs2_write.c | 88 +++- .../mca/io/romio/romio/adio/ad_sfs/.cvsignore | 6 + .../io/romio/romio/adio/ad_sfs/.state-cache | 19 + .../io/romio/romio/adio/ad_testfs/.cvsignore | 8 + .../romio/romio/adio/ad_testfs/.state-cache | 64 +++ .../mca/io/romio/romio/adio/ad_ufs/.cvsignore | 8 + .../io/romio/romio/adio/ad_ufs/.state-cache | 13 + .../io/romio/romio/adio/ad_ufs/ad_ufs_open.c | 2 +- .../mca/io/romio/romio/adio/ad_xfs/.cvsignore | 9 + .../io/romio/romio/adio/ad_xfs/.state-cache | 40 ++ .../mca/io/romio/romio/adio/common/.cvsignore | 10 + .../io/romio/romio/adio/common/.state-cache | 154 ++++++ .../io/romio/romio/adio/common/Makefile.am | 1 - .../mca/io/romio/romio/adio/common/ad_close.c | 18 +- .../io/romio/romio/adio/common/ad_get_sh_fp.c | 2 +- .../mca/io/romio/romio/adio/common/ad_hints.c | 5 +- ompi/mca/io/romio/romio/adio/common/ad_open.c | 152 +++--- .../romio/adio/common/ad_read_str_naive.c | 8 +- .../io/romio/romio/adio/common/ad_resize.c | 12 +- .../io/romio/romio/adio/common/ad_set_sh_fp.c | 2 +- .../romio/romio/adio/common/ad_write_coll.c | 30 ++ .../romio/adio/common/ad_write_str_naive.c | 8 +- .../romio/romio/adio/common/cb_config_list.c | 30 +- ompi/mca/io/romio/romio/adio/common/flatten.c | 17 +- .../mca/io/romio/romio/adio/common/gencheck.c | 31 -- .../io/romio/romio/adio/common/req_malloc.c | 7 +- .../io/romio/romio/adio/include/.cvsignore | 7 + .../io/romio/romio/adio/include/.state-cache | 31 ++ ompi/mca/io/romio/romio/adio/include/adio.h | 4 +- .../io/romio/romio/adio/include/adioi_error.h | 8 +- ompi/mca/io/romio/romio/configure.in | 151 +++++- ompi/mca/io/romio/romio/doc/Makefile.am | 2 +- ompi/mca/io/romio/romio/doc/source-guide.tex | 494 ++++++++++++++++++ ompi/mca/io/romio/romio/include/.cvsignore | 6 + ompi/mca/io/romio/romio/localdefs.in | 1 + .../romio/romio/man/man3/MPIO_Request_c2f.3 | 17 + .../romio/romio/man/man3/MPIO_Request_f2c.3 | 17 + ompi/mca/io/romio/romio/man/man3/MPIO_Test.3 | 36 ++ ompi/mca/io/romio/romio/man/man3/MPIO_Wait.3 | 31 ++ .../io/romio/romio/man/man3/MPI_File_c2f.3 | 17 + .../io/romio/romio/man/man3/MPI_File_close.3 | 24 + .../io/romio/romio/man/man3/MPI_File_delete.3 | 29 + .../io/romio/romio/man/man3/MPI_File_f2c.3 | 17 + .../romio/romio/man/man3/MPI_File_get_amode.3 | 31 ++ .../romio/man/man3/MPI_File_get_atomicity.3 | 31 ++ .../romio/man/man3/MPI_File_get_byte_offset.3 | 36 ++ .../romio/romio/man/man3/MPI_File_get_group.3 | 31 ++ .../romio/romio/man/man3/MPI_File_get_info.3 | 31 ++ .../romio/man/man3/MPI_File_get_position.3 | 31 ++ .../man/man3/MPI_File_get_position_shared.3 | 31 ++ .../romio/romio/man/man3/MPI_File_get_size.3 | 31 ++ .../romio/man/man3/MPI_File_get_type_extent.3 | 37 ++ .../romio/romio/man/man3/MPI_File_get_view.3 | 47 ++ .../io/romio/romio/man/man3/MPI_File_iread.3 | 47 ++ .../romio/romio/man/man3/MPI_File_iread_at.3 | 53 ++ .../romio/man/man3/MPI_File_iread_shared.3 | 47 ++ .../io/romio/romio/man/man3/MPI_File_iwrite.3 | 47 ++ .../romio/romio/man/man3/MPI_File_iwrite_at.3 | 53 ++ .../romio/man/man3/MPI_File_iwrite_shared.3 | 47 ++ .../io/romio/romio/man/man3/MPI_File_open.3 | 47 ++ .../romio/man/man3/MPI_File_preallocate.3 | 29 + .../io/romio/romio/man/man3/MPI_File_read.3 | 47 ++ .../romio/romio/man/man3/MPI_File_read_all.3 | 47 ++ .../romio/man/man3/MPI_File_read_all_begin.3 | 42 ++ .../romio/man/man3/MPI_File_read_all_end.3 | 36 ++ .../romio/romio/man/man3/MPI_File_read_at.3 | 52 ++ .../romio/man/man3/MPI_File_read_at_all.3 | 53 ++ .../man/man3/MPI_File_read_at_all_begin.3 | 47 ++ .../romio/man/man3/MPI_File_read_at_all_end.3 | 36 ++ .../romio/man/man3/MPI_File_read_ordered.3 | 47 ++ .../man/man3/MPI_File_read_ordered_begin.3 | 42 ++ .../man/man3/MPI_File_read_ordered_end.3 | 36 ++ .../romio/man/man3/MPI_File_read_shared.3 | 47 ++ .../io/romio/romio/man/man3/MPI_File_seek.3 | 34 ++ .../romio/man/man3/MPI_File_seek_shared.3 | 34 ++ .../romio/man/man3/MPI_File_set_atomicity.3 | 29 + .../romio/romio/man/man3/MPI_File_set_info.3 | 29 + .../romio/romio/man/man3/MPI_File_set_size.3 | 29 + .../romio/romio/man/man3/MPI_File_set_view.3 | 50 ++ .../io/romio/romio/man/man3/MPI_File_sync.3 | 24 + .../io/romio/romio/man/man3/MPI_File_write.3 | 47 ++ .../romio/romio/man/man3/MPI_File_write_all.3 | 47 ++ .../romio/man/man3/MPI_File_write_all_begin.3 | 40 ++ .../romio/man/man3/MPI_File_write_all_end.3 | 36 ++ .../romio/romio/man/man3/MPI_File_write_at.3 | 53 ++ .../romio/man/man3/MPI_File_write_at_all.3 | 53 ++ .../man/man3/MPI_File_write_at_all_begin.3 | 45 ++ .../man/man3/MPI_File_write_at_all_end.3 | 36 ++ .../romio/man/man3/MPI_File_write_ordered.3 | 47 ++ .../man/man3/MPI_File_write_ordered_begin.3 | 42 ++ .../man/man3/MPI_File_write_ordered_end.3 | 36 ++ .../romio/man/man3/MPI_File_write_shared.3 | 47 ++ .../io/romio/romio/man/man3/MPI_Info_c2f.3 | 18 + .../io/romio/romio/man/man3/MPI_Info_create.3 | 38 ++ .../io/romio/romio/man/man3/MPI_Info_delete.3 | 43 ++ .../io/romio/romio/man/man3/MPI_Info_dup.3 | 45 ++ .../io/romio/romio/man/man3/MPI_Info_f2c.3 | 18 + .../io/romio/romio/man/man3/MPI_Info_free.3 | 38 ++ .../io/romio/romio/man/man3/MPI_Info_get.3 | 60 +++ .../romio/romio/man/man3/MPI_Info_get_nkeys.3 | 45 ++ .../romio/man/man3/MPI_Info_get_nthkey.3 | 50 ++ .../romio/man/man3/MPI_Info_get_valuelen.3 | 55 ++ .../io/romio/romio/man/man3/MPI_Info_set.3 | 48 ++ .../romio/man/man3/MPI_Type_create_darray.3 | 89 ++++ .../romio/man/man3/MPI_Type_create_subarray.3 | 73 +++ ompi/mca/io/romio/romio/mpi-io/.cvsignore | 9 + ompi/mca/io/romio/romio/mpi-io/.state-cache | 217 ++++++++ ompi/mca/io/romio/romio/mpi-io/close.c | 21 +- ompi/mca/io/romio/romio/mpi-io/delete.c | 8 +- .../io/romio/romio/mpi-io/fortran/.cvsignore | 10 + .../romio/romio/mpi-io/fortran/.state-cache | 169 ++++++ .../io/romio/romio/mpi-io/fortran/deletef.c | 6 +- .../romio/romio/mpi-io/fortran/get_extentf.c | 4 +- .../romio/romio/mpi-io/fortran/get_groupf.c | 4 +- .../io/romio/romio/mpi-io/fortran/get_viewf.c | 6 +- .../io/romio/romio/mpi-io/fortran/iotestf.c | 8 +- .../io/romio/romio/mpi-io/fortran/iread_atf.c | 2 +- .../io/romio/romio/mpi-io/fortran/iread_shf.c | 8 +- .../io/romio/romio/mpi-io/fortran/ireadf.c | 8 +- .../romio/romio/mpi-io/fortran/iwrite_shf.c | 8 +- .../io/romio/romio/mpi-io/fortran/iwritef.c | 8 +- .../mca/io/romio/romio/mpi-io/fortran/openf.c | 8 +- .../io/romio/romio/mpi-io/fortran/set_viewf.c | 6 +- .../romio/romio/mpi-io/fortran/write_ordbf.c | 4 +- .../io/romio/romio/mpi-io/fortran/write_shf.c | 2 +- ompi/mca/io/romio/romio/mpi-io/fsync.c | 8 +- ompi/mca/io/romio/romio/mpi-io/get_amode.c | 3 - ompi/mca/io/romio/romio/mpi-io/get_atom.c | 2 - ompi/mca/io/romio/romio/mpi-io/get_bytoff.c | 2 - ompi/mca/io/romio/romio/mpi-io/get_errh.c | 4 +- ompi/mca/io/romio/romio/mpi-io/get_extent.c | 2 - ompi/mca/io/romio/romio/mpi-io/get_group.c | 4 +- ompi/mca/io/romio/romio/mpi-io/get_info.c | 8 +- ompi/mca/io/romio/romio/mpi-io/get_posn.c | 2 - ompi/mca/io/romio/romio/mpi-io/get_posn_sh.c | 6 +- ompi/mca/io/romio/romio/mpi-io/get_size.c | 6 +- ompi/mca/io/romio/romio/mpi-io/get_view.c | 4 +- .../mca/io/romio/romio/mpi-io/glue/.cvsignore | 1 + .../romio/mpi-io/glue/default/.cvsignore | 5 + .../romio/mpi-io/glue/default/.state-cache | 10 + .../romio/romio/mpi-io/glue/mpich1/.cvsignore | 6 + .../romio/mpi-io/glue/mpich1/.state-cache | 10 + .../romio/mpi-io/glue/mpich1/mpio_file.c | 5 + .../romio/romio/mpi-io/glue/mpich2/.cvsignore | 6 + .../romio/mpi-io/glue/mpich2/.state-cache | 10 + .../romio/romio/mpi-io/glue/mpich2/mpio_err.c | 9 +- .../romio/mpi-io/glue/mpich2/mpio_file.c | 5 + ompi/mca/io/romio/romio/mpi-io/ioreq_c2f.c | 6 +- ompi/mca/io/romio/romio/mpi-io/ioreq_f2c.c | 4 +- ompi/mca/io/romio/romio/mpi-io/iotest.c | 4 +- ompi/mca/io/romio/romio/mpi-io/iotestall.c | 4 +- ompi/mca/io/romio/romio/mpi-io/iotestany.c | 4 +- ompi/mca/io/romio/romio/mpi-io/iotestsome.c | 4 +- ompi/mca/io/romio/romio/mpi-io/iowait.c | 4 +- ompi/mca/io/romio/romio/mpi-io/iowaitall.c | 4 +- ompi/mca/io/romio/romio/mpi-io/iowaitany.c | 4 +- ompi/mca/io/romio/romio/mpi-io/iowaitsome.c | 4 +- ompi/mca/io/romio/romio/mpi-io/iread.c | 23 +- ompi/mca/io/romio/romio/mpi-io/iread_at.c | 18 +- ompi/mca/io/romio/romio/mpi-io/iread_sh.c | 22 +- ompi/mca/io/romio/romio/mpi-io/iwrite.c | 22 +- ompi/mca/io/romio/romio/mpi-io/iwrite_at.c | 18 +- ompi/mca/io/romio/romio/mpi-io/iwrite_sh.c | 8 +- ompi/mca/io/romio/romio/mpi-io/mpioimpl.h | 23 +- ompi/mca/io/romio/romio/mpi-io/open.c | 42 +- ompi/mca/io/romio/romio/mpi-io/prealloc.c | 8 +- ompi/mca/io/romio/romio/mpi-io/read.c | 9 +- ompi/mca/io/romio/romio/mpi-io/read_all.c | 10 +- ompi/mca/io/romio/romio/mpi-io/read_allb.c | 10 +- ompi/mca/io/romio/romio/mpi-io/read_alle.c | 4 +- ompi/mca/io/romio/romio/mpi-io/read_at.c | 1 - ompi/mca/io/romio/romio/mpi-io/read_ord.c | 9 +- ompi/mca/io/romio/romio/mpi-io/read_ordb.c | 9 +- ompi/mca/io/romio/romio/mpi-io/read_orde.c | 8 +- ompi/mca/io/romio/romio/mpi-io/read_sh.c | 9 +- .../io/romio/romio/mpi-io/register_datarep.c | 4 +- ompi/mca/io/romio/romio/mpi-io/seek.c | 9 +- ompi/mca/io/romio/romio/mpi-io/seek_sh.c | 4 +- ompi/mca/io/romio/romio/mpi-io/set_atom.c | 9 +- ompi/mca/io/romio/romio/mpi-io/set_errh.c | 4 +- ompi/mca/io/romio/romio/mpi-io/set_info.c | 9 +- ompi/mca/io/romio/romio/mpi-io/set_size.c | 10 +- ompi/mca/io/romio/romio/mpi-io/set_view.c | 15 +- ompi/mca/io/romio/romio/mpi-io/write.c | 9 +- ompi/mca/io/romio/romio/mpi-io/write_all.c | 10 +- ompi/mca/io/romio/romio/mpi-io/write_allb.c | 10 +- ompi/mca/io/romio/romio/mpi-io/write_alle.c | 4 +- ompi/mca/io/romio/romio/mpi-io/write_atall.c | 1 - ompi/mca/io/romio/romio/mpi-io/write_ord.c | 10 +- ompi/mca/io/romio/romio/mpi-io/write_ordb.c | 9 +- ompi/mca/io/romio/romio/mpi-io/write_orde.c | 4 +- ompi/mca/io/romio/romio/mpi-io/write_sh.c | 9 +- .../romio/romio/mpi2-other/array/.cvsignore | 6 + .../romio/romio/mpi2-other/array/.state-cache | 10 + .../romio/mpi2-other/array/fortran/.cvsignore | 6 + .../mpi2-other/array/fortran/.state-cache | 10 + .../io/romio/romio/mpi2-other/info/.cvsignore | 6 + .../romio/romio/mpi2-other/info/.state-cache | 37 ++ .../romio/mpi2-other/info/fortran/.cvsignore | 6 + .../mpi2-other/info/fortran/.state-cache | 31 ++ ompi/mca/io/romio/romio/test/.cvsignore | 12 + ompi/mca/io/romio/romio/test/.state-cache | 61 +++ ompi/mca/io/romio/romio/test/Makefile.in | 30 +- ompi/mca/io/romio/romio/test/Mfile.in | 4 +- ompi/mca/io/romio/romio/test/file_info.c | 9 +- ompi/mca/io/romio/romio/test/pfcoll_test.f.in | 2 +- ompi/mca/io/romio/romio/test/runtests.in | 4 +- ompi/mca/io/romio/romio/util/.cvsignore | 3 + ompi/mca/io/romio/romio/util/.state-cache | 7 + 256 files changed, 5828 insertions(+), 554 deletions(-) create mode 100644 ompi/mca/io/romio/romio/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/ad_gridftp/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/ad_gridftp/.state-cache create mode 100644 ompi/mca/io/romio/romio/adio/ad_hfs/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/ad_hfs/.state-cache create mode 100644 ompi/mca/io/romio/romio/adio/ad_nfs/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/ad_nfs/.state-cache create mode 100644 ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs_resize.c create mode 100644 ompi/mca/io/romio/romio/adio/ad_ntfs/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/ad_ntfs/.state-cache create mode 100644 ompi/mca/io/romio/romio/adio/ad_panfs/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/ad_panfs/.state-cache create mode 100644 ompi/mca/io/romio/romio/adio/ad_pfs/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/ad_pfs/.state-cache create mode 100644 ompi/mca/io/romio/romio/adio/ad_piofs/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/ad_piofs/.state-cache create mode 100644 ompi/mca/io/romio/romio/adio/ad_pvfs/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/ad_pvfs/.state-cache create mode 100644 ompi/mca/io/romio/romio/adio/ad_pvfs2/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/ad_pvfs2/.state-cache create mode 100644 ompi/mca/io/romio/romio/adio/ad_sfs/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/ad_sfs/.state-cache create mode 100644 ompi/mca/io/romio/romio/adio/ad_testfs/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/ad_testfs/.state-cache create mode 100644 ompi/mca/io/romio/romio/adio/ad_ufs/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/ad_ufs/.state-cache create mode 100644 ompi/mca/io/romio/romio/adio/ad_xfs/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/ad_xfs/.state-cache create mode 100644 ompi/mca/io/romio/romio/adio/common/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/common/.state-cache delete mode 100644 ompi/mca/io/romio/romio/adio/common/gencheck.c create mode 100644 ompi/mca/io/romio/romio/adio/include/.cvsignore create mode 100644 ompi/mca/io/romio/romio/adio/include/.state-cache create mode 100644 ompi/mca/io/romio/romio/doc/source-guide.tex create mode 100644 ompi/mca/io/romio/romio/include/.cvsignore create mode 100644 ompi/mca/io/romio/romio/man/man3/MPIO_Request_c2f.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPIO_Request_f2c.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPIO_Test.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPIO_Wait.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_c2f.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_close.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_delete.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_f2c.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_get_amode.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_get_atomicity.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_get_byte_offset.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_get_group.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_get_info.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_get_position.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_get_position_shared.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_get_size.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_get_type_extent.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_get_view.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_iread.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_iread_at.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_iread_shared.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_iwrite.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_iwrite_at.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_iwrite_shared.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_open.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_preallocate.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_read.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_read_all.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_read_all_begin.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_read_all_end.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_read_at.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_read_at_all.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_read_at_all_begin.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_read_at_all_end.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_read_ordered.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_read_ordered_begin.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_read_ordered_end.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_read_shared.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_seek.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_seek_shared.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_set_atomicity.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_set_info.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_set_size.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_set_view.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_sync.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_write.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_write_all.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_write_all_begin.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_write_all_end.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_write_at.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_write_at_all.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_write_at_all_begin.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_write_at_all_end.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_write_ordered.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_write_ordered_begin.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_write_ordered_end.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_File_write_shared.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_Info_c2f.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_Info_create.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_Info_delete.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_Info_dup.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_Info_f2c.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_Info_free.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_Info_get.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_Info_get_nkeys.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_Info_get_nthkey.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_Info_get_valuelen.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_Info_set.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_Type_create_darray.3 create mode 100644 ompi/mca/io/romio/romio/man/man3/MPI_Type_create_subarray.3 create mode 100644 ompi/mca/io/romio/romio/mpi-io/.cvsignore create mode 100644 ompi/mca/io/romio/romio/mpi-io/.state-cache create mode 100644 ompi/mca/io/romio/romio/mpi-io/fortran/.cvsignore create mode 100644 ompi/mca/io/romio/romio/mpi-io/fortran/.state-cache create mode 100644 ompi/mca/io/romio/romio/mpi-io/glue/.cvsignore create mode 100644 ompi/mca/io/romio/romio/mpi-io/glue/default/.cvsignore create mode 100644 ompi/mca/io/romio/romio/mpi-io/glue/default/.state-cache create mode 100644 ompi/mca/io/romio/romio/mpi-io/glue/mpich1/.cvsignore create mode 100644 ompi/mca/io/romio/romio/mpi-io/glue/mpich1/.state-cache create mode 100644 ompi/mca/io/romio/romio/mpi-io/glue/mpich2/.cvsignore create mode 100644 ompi/mca/io/romio/romio/mpi-io/glue/mpich2/.state-cache create mode 100644 ompi/mca/io/romio/romio/mpi2-other/array/.cvsignore create mode 100644 ompi/mca/io/romio/romio/mpi2-other/array/.state-cache create mode 100644 ompi/mca/io/romio/romio/mpi2-other/array/fortran/.cvsignore create mode 100644 ompi/mca/io/romio/romio/mpi2-other/array/fortran/.state-cache create mode 100644 ompi/mca/io/romio/romio/mpi2-other/info/.cvsignore create mode 100644 ompi/mca/io/romio/romio/mpi2-other/info/.state-cache create mode 100644 ompi/mca/io/romio/romio/mpi2-other/info/fortran/.cvsignore create mode 100644 ompi/mca/io/romio/romio/mpi2-other/info/fortran/.state-cache create mode 100644 ompi/mca/io/romio/romio/test/.cvsignore create mode 100644 ompi/mca/io/romio/romio/test/.state-cache create mode 100644 ompi/mca/io/romio/romio/util/.cvsignore create mode 100644 ompi/mca/io/romio/romio/util/.state-cache diff --git a/ompi/mca/io/romio/romio/.cvsignore b/ompi/mca/io/romio/romio/.cvsignore new file mode 100644 index 0000000000..8f943b3672 --- /dev/null +++ b/ompi/mca/io/romio/romio/.cvsignore @@ -0,0 +1,17 @@ +TAGS +Makefile +config.status +config.log +config.cache +config.system +autom4te.cache +configure2 +configure +configure.lineno +lib +bin +misc +localdefs +.deps +cscope.files +cscope.out diff --git a/ompi/mca/io/romio/romio/adio/ad_gridftp/.cvsignore b/ompi/mca/io/romio/romio/adio/ad_gridftp/.cvsignore new file mode 100644 index 0000000000..7ab560ecf9 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_gridftp/.cvsignore @@ -0,0 +1,2 @@ +Makefile +.*-cache diff --git a/ompi/mca/io/romio/romio/adio/ad_gridftp/.state-cache b/ompi/mca/io/romio/romio/adio/ad_gridftp/.state-cache new file mode 100644 index 0000000000..a1c6d28958 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_gridftp/.state-cache @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp.h b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp.h index a841d27cf1..857d13365f 100644 --- a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp.h +++ b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp.h @@ -78,8 +78,6 @@ void ADIOI_GRIDFTP_IwriteStrided(ADIO_File fd, void *buf, int count, *error_code); void ADIOI_GRIDFTP_Flush(ADIO_File fd, int *error_code); void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code); -ADIO_Offset ADIOI_GRIDFTP_SeekIndividual(ADIO_File fd, ADIO_Offset offset, - int whence, int *error_code); void ADIOI_GRIDFTP_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); void ADIOI_GRIDFTP_Get_shared_fp(ADIO_File fd, int size, ADIO_Offset *shared_fp, diff --git a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_close.c b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_close.c index 7e9e59842f..deb6044305 100644 --- a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_close.c +++ b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_close.c @@ -23,10 +23,10 @@ void ADIOI_GRIDFTP_Close(ADIO_File fd, int *error_code) { globus_err_handler("globus_ftp_client_operationattr_destroy", myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCESS, MPIR_ERR_RECOVERABLE, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s",globus_object_printable_to_string(result)); + "**io %s",globus_object_printable_to_string(globus_error_get(result))); return; } result=globus_ftp_client_handle_destroy(&(gridftp_fh[fd->fd_sys])); @@ -34,10 +34,10 @@ void ADIOI_GRIDFTP_Close(ADIO_File fd, int *error_code) { globus_err_handler("globus_ftp_client_handle_destroy", myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCESS, MPIR_ERR_RECOVERABLE, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", globus_object_printable_to_string(result)); + "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } diff --git a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_delete.c b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_delete.c index 2a9a93c2fe..9c35116427 100644 --- a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_delete.c +++ b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_delete.c @@ -48,7 +48,7 @@ void ADIOI_GRIDFTP_Delete(char *filename, int *error_code) myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); return; } @@ -63,7 +63,7 @@ void ADIOI_GRIDFTP_Delete(char *filename, int *error_code) myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); return; } globus_mutex_lock(&lock); @@ -79,7 +79,7 @@ void ADIOI_GRIDFTP_Delete(char *filename, int *error_code) myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); return; } @@ -90,6 +90,6 @@ void ADIOI_GRIDFTP_Delete(char *filename, int *error_code) myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); } } diff --git a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_fcntl.c b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_fcntl.c index 2cae288088..4b9f5a5261 100644 --- a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_fcntl.c +++ b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_fcntl.c @@ -62,7 +62,7 @@ void ADIOI_GRIDFTP_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); return; } globus_mutex_lock(&fcntl_size_lock); diff --git a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_open.c b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_open.c index 47b3319cb0..26a7afd7cc 100644 --- a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_open.c +++ b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_open.c @@ -74,7 +74,7 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) have to check themselves if the file is being accessed rdonly, rdwr, or wronly. */ - result=globus_ftp_client_handleattr_init(&hattr) + result=globus_ftp_client_handleattr_init(&hattr); if ( result != GLOBUS_SUCCESS ) { @@ -85,7 +85,7 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", globus_object_printable_to_string(result)); + "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } result = globus_ftp_client_operationattr_init(&(oattr[fd->fd_sys])); @@ -97,18 +97,18 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", globus_object_printable_to_string(result)); + "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } /* Always use connection caching unless told otherwise */ - result=globus_ftp_client_handleattr_set_cache_all(&hattr,GLOBUS_TRUE) + result=globus_ftp_client_handleattr_set_cache_all(&hattr,GLOBUS_TRUE); if ( result !=GLOBUS_SUCCESS ) globus_err_handler("globus_ftp_client_handleattr_set_cache_all",myname,result); /* Assume that it's safe to cache a file if it's read-only */ - if ( (fd->access_mode&MPI_MODE_RDONLY) && + if ( (fd->access_mode&ADIO_RDONLY) && (result=globus_ftp_client_handleattr_add_cached_url(&hattr,fd->filename))!=GLOBUS_SUCCESS ) globus_err_handler("globus_ftp_client_handleattr_add_cached_url",myname,result); @@ -128,7 +128,7 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) */ /* Set append mode if necessary */ - if ( (fd->access_mode&MPI_MODE_APPEND) && + if ( (fd->access_mode&ADIO_APPEND) && ((result=globus_ftp_client_operationattr_set_append(&(oattr[fd->fd_sys]),GLOBUS_TRUE))!=GLOBUS_SUCCESS) ) globus_err_handler("globus_ftp_client_operationattr_set_append",myname,result); @@ -235,7 +235,7 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) FPRINTF(stderr,"no MPI_Info object associated with %s\n",fd->filename); /* Create the ftp handle */ - result=globus_ftp_client_handle_init(&(gridftp_fh[fd->fd_sys]),&hattr) + result=globus_ftp_client_handle_init(&(gridftp_fh[fd->fd_sys]),&hattr); if ( result != GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_handle_init",myname,result); @@ -243,7 +243,7 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", globus_object_printable_to_string(result)); + "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } @@ -265,7 +265,7 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); return; } /* wait till the callback completes */ @@ -278,8 +278,8 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) MPI_Bcast(&file_exists,1,MPI_INT,0,fd->comm); /* It turns out that this is handled by MPI_File_open() directly */ - if ( (file_exists!=GLOBUS_TRUE) && (fd->access_mode&MPI_MODE_CREATE) && - !(fd->access_mode&MPI_MODE_EXCL) && !(fd->access_mode&MPI_MODE_RDONLY) ) + if ( (file_exists!=GLOBUS_TRUE) && (fd->access_mode&ADIO_CREATE) && + !(fd->access_mode&ADIO_EXCL) && !(fd->access_mode&ADIO_RDONLY) ) { if ( myrank==0 ) { @@ -299,7 +299,7 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); return; } result=globus_ftp_client_register_write(&(gridftp_fh[fd->fd_sys]), @@ -314,7 +314,7 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); return; } globus_mutex_lock(&lock); @@ -324,7 +324,7 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) } MPI_Barrier(fd->comm); } - else if ( (fd->access_mode&MPI_MODE_EXCL) && (file_exists==GLOBUS_TRUE) ) + else if ( (fd->access_mode&ADIO_EXCL) && (file_exists==GLOBUS_TRUE) ) { fd->fd_sys = -1; *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, @@ -332,7 +332,7 @@ void ADIOI_GRIDFTP_Open(ADIO_File fd, int *error_code) "**io", 0); return; } - else if ( (fd->access_mode&MPI_MODE_RDONLY) && (file_exists!=GLOBUS_TRUE) ) + else if ( (fd->access_mode&ADIO_RDONLY) && (file_exists!=GLOBUS_TRUE) ) { if ( myrank==0 ) { diff --git a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_read.c b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_read.c index 445f51646b..31a93beaa4 100644 --- a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_read.c +++ b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_read.c @@ -115,7 +115,7 @@ void ADIOI_GRIDFTP_ReadContig(ADIO_File fd, void *buf, int count, globus_off_t goff; globus_result_t result; - if ( fd->access_mode&MPI_MODE_WRONLY ) + if ( fd->access_mode&ADIO_WRONLY ) { *error_code=MPIR_ERR_MODE_WRONLY; return; @@ -162,7 +162,7 @@ void ADIOI_GRIDFTP_ReadContig(ADIO_File fd, void *buf, int count, *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); return; } @@ -211,7 +211,7 @@ void ADIOI_GRIDFTP_ReadDiscontig(ADIO_File fd, void *buf, int count, globus_result_t result; globus_byte_t *tmp; - if ( fd->access_mode&MPI_MODE_WRONLY ) + if ( fd->access_mode&ADIO_WRONLY ) { *error_code=MPIR_ERR_MODE_WRONLY; return; @@ -283,7 +283,7 @@ void ADIOI_GRIDFTP_ReadDiscontig(ADIO_File fd, void *buf, int count, myrank,nprocs,myname,extent,count*btype_size); fflush(stderr); *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myanem, __LINE__, + MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", 0); return; } @@ -305,9 +305,9 @@ void ADIOI_GRIDFTP_ReadDiscontig(ADIO_File fd, void *buf, int count, { globus_err_handler("globus_ftp_client_partial_get",myname,result); *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myanem, __LINE__, + MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); return; } @@ -326,10 +326,10 @@ void ADIOI_GRIDFTP_ReadDiscontig(ADIO_File fd, void *buf, int count, (void *)(&bytes_read)))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_register_read",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCESS, MPIR_ERR_RECOVERABLE, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", globus_object_printable_to_string(result)); + "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } /* The ctl callback won't start till the data callbacks complete, so it's diff --git a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_resize.c b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_resize.c index 6cfa95a6a1..9ee3e3d4d0 100644 --- a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_resize.c +++ b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_resize.c @@ -65,11 +65,11 @@ void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) MPI_Comm_rank(fd->comm, &myrank); /* Sanity check */ - if ( fd->access_mode&MPI_MODE_RDONLY ) + if ( fd->access_mode&ADIO_RDONLY ) { FPRINTF(stderr,"%s: attempt to resize read-only file %s!\n", myname,fd->filename); - *error_code = MPIO_Err_create_code(MPI_SUCESS, MPIR_ERR_RECOVERABLE, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", 0); return; @@ -88,10 +88,10 @@ void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_size",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCESS, MPIR_ERR_RECOVERABLE, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", globus_object_printable_to_string(result)); + "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } globus_mutex_lock(&resize_lock); @@ -113,10 +113,10 @@ void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_partial_put",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCESS, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); return; } @@ -129,10 +129,10 @@ void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_register_write",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCESS, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); return; } globus_mutex_lock(&resize_lock); @@ -161,10 +161,10 @@ void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_move",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCESS, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); return; } globus_mutex_lock(&resize_lock); @@ -189,10 +189,10 @@ void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_partial_third_party_transfer",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCESS, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); return; } globus_mutex_lock(&resize_lock); @@ -213,10 +213,10 @@ void ADIOI_GRIDFTP_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_delete",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCESS, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", "**io %s", - globus_object_printable_to_string(result)); + globus_object_printable_to_string(globus_error_get(result))); return; } globus_mutex_lock(&resize_lock); diff --git a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_write.c b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_write.c index 887c3b4a62..1dd25c7f26 100644 --- a/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_write.c +++ b/ompi/mca/io/romio/romio/adio/ad_gridftp/ad_gridftp_write.c @@ -117,7 +117,7 @@ void ADIOI_GRIDFTP_WriteContig(ADIO_File fd, void *buf, int count, globus_off_t goff; globus_result_t result; - if ( fd->access_mode&MPI_MODE_RDONLY ) + if ( fd->access_mode&ADIO_RDONLY ) { *error_code=MPI_ERR_AMODE; return; @@ -151,10 +151,10 @@ void ADIOI_GRIDFTP_WriteContig(ADIO_File fd, void *buf, int count, GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_partial_put",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCESS, MPIR_ERR_RECOVERABLE, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", globus_object_printable_to_string(result)); + "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } if ( (result=globus_ftp_client_register_write(&(gridftp_fh[fd->fd_sys]), @@ -166,10 +166,10 @@ void ADIOI_GRIDFTP_WriteContig(ADIO_File fd, void *buf, int count, (void *)(&bytes_written)))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_register_write",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCESS, MPIR_ERR_RECOVERABLE, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", globus_object_printable_to_string(result)); + "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } @@ -232,10 +232,10 @@ void ADIOI_GRIDFTP_WriteDiscontig(ADIO_File fd, void *buf, int count, FPRINTF(stderr,"[%d/%d] %s called with discontigous memory buffer\n", myrank,nprocs,myname); fflush(stderr); - *error_code = MPIO_Err_create_code(MPI_SUCESS, MPIR_ERR_RECOVERABLE, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", globus_object_printable_to_string(result)); + "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } /* from here we can assume btype_extent==btype_size */ @@ -275,10 +275,10 @@ void ADIOI_GRIDFTP_WriteDiscontig(ADIO_File fd, void *buf, int count, FPRINTF(stderr,"[%d/%d] %s error in computing extent -- extent %d is smaller than total bytes requested %d!\n", myrank,nprocs,myname,extent,count*btype_size); fflush(stderr); - *error_code = MPIO_Err_create_code(MPI_SUCESS, MPIR_ERR_RECOVERABLE, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", globus_object_printable_to_string(result)); + "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } end=start+(globus_off_t)extent; @@ -300,10 +300,10 @@ void ADIOI_GRIDFTP_WriteDiscontig(ADIO_File fd, void *buf, int count, GLOBUS_NULL))!=GLOBUS_SUCCESS ) { globus_err_handler("globus_ftp_client_partial_get",myname,result); - *error_code = MPIO_Err_create_code(MPI_SUCESS, MPIR_ERR_RECOVERABLE, + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io", - "**io %s", globus_object_printable_to_string(result)); + "**io %s", globus_object_printable_to_string(globus_error_get(result))); return; } @@ -384,7 +384,7 @@ void ADIOI_GRIDFTP_WriteStrided(ADIO_File fd, void *buf, int count, #ifdef GRIDFTP_USE_GENERIC_STRIDED int myrank, nprocs; - if ( fd->access_mode&MPI_MODE_RDONLY ) + if ( fd->access_mode&ADIO_RDONLY ) { *error_code=MPI_ERR_AMODE; return; diff --git a/ompi/mca/io/romio/romio/adio/ad_hfs/.cvsignore b/ompi/mca/io/romio/romio/adio/ad_hfs/.cvsignore new file mode 100644 index 0000000000..0e37d31e9d --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_hfs/.cvsignore @@ -0,0 +1,6 @@ +Makefile +.deps +*.bb +*.bbg +.*-cache +*.lo diff --git a/ompi/mca/io/romio/romio/adio/ad_hfs/.state-cache b/ompi/mca/io/romio/romio/adio/ad_hfs/.state-cache new file mode 100644 index 0000000000..b1d9ffc9a6 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_hfs/.state-cache @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/ad_nfs/.cvsignore b/ompi/mca/io/romio/romio/adio/ad_nfs/.cvsignore new file mode 100644 index 0000000000..76def0bd1f --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_nfs/.cvsignore @@ -0,0 +1,8 @@ +Makefile +.deps +*.bb +*.bbg +.libs +.libstamp* +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/adio/ad_nfs/.state-cache b/ompi/mca/io/romio/romio/adio/ad_nfs/.state-cache new file mode 100644 index 0000000000..e69f30ac3f --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_nfs/.state-cache @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/ad_nfs/Makefile.am b/ompi/mca/io/romio/romio/adio/ad_nfs/Makefile.am index aa5adecf6f..b7368218ac 100644 --- a/ompi/mca/io/romio/romio/adio/ad_nfs/Makefile.am +++ b/ompi/mca/io/romio/romio/adio/ad_nfs/Makefile.am @@ -39,6 +39,7 @@ libadio_nfs_la_SOURCES = \ io_romio_ad_nfs_iwrite.c \ io_romio_ad_nfs_open.c \ io_romio_ad_nfs_read.c \ + io_romio_ad_nfs_resize.c \ io_romio_ad_nfs_setsh.c \ io_romio_ad_nfs_wait.c \ io_romio_ad_nfs_write.c diff --git a/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs.c b/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs.c index 6adb94786c..11ad2b4e77 100644 --- a/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs.c +++ b/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs.c @@ -31,6 +31,6 @@ struct ADIOI_Fns_struct ADIO_NFS_operations = { ADIOI_GEN_IreadStrided, /* IreadStrided */ ADIOI_GEN_IwriteStrided, /* IwriteStrided */ ADIOI_GEN_Flush, /* Flush */ - ADIOI_GEN_Resize, /* Resize */ + ADIOI_NFS_Resize, /* Resize */ ADIOI_GEN_Delete, /* Delete */ }; diff --git a/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs.h b/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs.h index dd03928c4e..4fd65e0c74 100644 --- a/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs.h +++ b/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs.h @@ -74,5 +74,6 @@ void ADIOI_NFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code); void ADIOI_NFS_Get_shared_fp(ADIO_File fd, int size, ADIO_Offset *shared_fp, int *error_code); void ADIOI_NFS_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, int *error_code); +void ADIOI_NFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code); #endif diff --git a/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs_getsh.c b/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs_getsh.c index 2b80138aa6..a79c7ba427 100644 --- a/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs_getsh.c +++ b/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs_getsh.c @@ -27,7 +27,7 @@ void ADIOI_NFS_Get_shared_fp(ADIO_File fd, int incr, ADIO_Offset *shared_fp, fd->file_system, fd->fns, ADIO_CREATE | ADIO_RDWR | ADIO_DELETE_ON_CLOSE, - 0, MPI_BYTE, MPI_BYTE, 0, MPI_INFO_NULL, + 0, MPI_BYTE, MPI_BYTE, MPI_INFO_NULL, ADIO_PERM_NULL, error_code); if (*error_code != MPI_SUCCESS) return; *shared_fp = 0; diff --git a/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs_resize.c b/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs_resize.c new file mode 100644 index 0000000000..99ede411b4 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs_resize.c @@ -0,0 +1,37 @@ +/* -*- Mode: C; c-basic-offset:4 ; -*- */ +/* + * + * Copyright (C) 2004 University of Chicago. + * See COPYRIGHT notice in top-level directory. + */ + +#include "ad_nfs.h" + +#ifdef HAVE_UNISTD_H +#include +#endif + +/* NFS resize + * + * Note: we resize on all processors to guarantee that all processors + * will have updated cache values. This used to be the generic + * implementation used by the majority of the ADIO implementations. + */ +void ADIOI_NFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) +{ + int err; + static char myname[] = "ADIOI_GEN_RESIZE"; + + err = ftruncate(fd->fd_sys, size); + + /* --BEGIN ERROR HANDLING-- */ + if (err == -1) { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, + myname, __LINE__, MPI_ERR_IO, + "**io", "**io %s", strerror(errno)); + return; + } + /* --END ERROR HANDLING-- */ + + *error_code = MPI_SUCCESS; +} diff --git a/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs_setsh.c b/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs_setsh.c index 1a649bed13..816d7cdcb2 100644 --- a/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs_setsh.c +++ b/ompi/mca/io/romio/romio/adio/ad_nfs/ad_nfs_setsh.c @@ -40,7 +40,7 @@ void ADIOI_NFS_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, int *error_code) fd->shared_fp_fname, fd->file_system, fd->fns, ADIO_CREATE | ADIO_RDWR | ADIO_DELETE_ON_CLOSE, - 0, MPI_BYTE, MPI_BYTE, 0, MPI_INFO_NULL, + 0, MPI_BYTE, MPI_BYTE, MPI_INFO_NULL, ADIO_PERM_NULL, error_code); } diff --git a/ompi/mca/io/romio/romio/adio/ad_ntfs/.cvsignore b/ompi/mca/io/romio/romio/adio/ad_ntfs/.cvsignore new file mode 100644 index 0000000000..f1ef70e726 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_ntfs/.cvsignore @@ -0,0 +1,6 @@ +Makefile +.deps +*.bb +*.bbg +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/adio/ad_ntfs/.state-cache b/ompi/mca/io/romio/romio/adio/ad_ntfs/.state-cache new file mode 100644 index 0000000000..e788ed16f6 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_ntfs/.state-cache @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_iwrite.c b/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_iwrite.c index 30894ac35b..1bc74471e1 100644 --- a/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_iwrite.c +++ b/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_iwrite.c @@ -100,10 +100,20 @@ int ADIOI_NTFS_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset, if (wr) { + /*printf("WriteFile(%d bytes)\n", len);fflush(stdout);*/ ret_val = WriteFile(fd_sys, buf, len, &dwNumWritten, pOvl); } else { + /* + { + ADIO_Fcntl_t fcntl_struct; + int error_code; + ADIO_Fcntl(fd, ADIO_FCNTL_GET_FSIZE, &fcntl_struct, &error_code); + printf("File size a: %d\n", fcntl_struct.fsize); + } + printf("ReadFile(%d bytes)\n", len);fflush(stdout); + */ ret_val = ReadFile(fd_sys, buf, len, &dwNumRead, pOvl); } diff --git a/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_read.c b/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_read.c index 14f4e44638..ef812ca7ee 100644 --- a/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_read.c +++ b/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_read.c @@ -60,6 +60,15 @@ void ADIOI_NTFS_ReadContig(ADIO_File fd, void *buf, int count, } } } + /* + { + ADIO_Fcntl_t fcntl_struct; + int error_code; + ADIO_Fcntl(fd, ADIO_FCNTL_GET_FSIZE, &fcntl_struct, &error_code); + printf("File size b: %d\n", fcntl_struct.fsize); + } + printf("ReadFile(%d bytes)\n", len);fflush(stdout); + */ err = ReadFile(fd->fd_sys, buf, len, &dwNumRead, pOvl); /* --BEGIN ERROR HANDLING-- */ if (err == FALSE) @@ -70,6 +79,7 @@ void ADIOI_NTFS_ReadContig(ADIO_File fd, void *buf, int count, case ERROR_IO_PENDING: break; case ERROR_HANDLE_EOF: + /*printf("EOF error\n");fflush(stdout);*/ SetEvent(pOvl->hEvent); break; default: @@ -88,13 +98,16 @@ void ADIOI_NTFS_ReadContig(ADIO_File fd, void *buf, int count, if (err == FALSE) { err = GetLastError(); - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myname, - __LINE__, MPI_ERR_IO, "**io", - "**io %s", ADIOI_NTFS_Strerror(err)); - CloseHandle(pOvl->hEvent); - ADIOI_Free(pOvl); - return; + if (err != ERROR_HANDLE_EOF) /* Ignore EOF errors */ + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, + __LINE__, MPI_ERR_IO, "**io", + "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; + } } /* --END ERROR HANDLING-- */ if (!CloseHandle(pOvl->hEvent)) @@ -132,6 +145,15 @@ void ADIOI_NTFS_ReadContig(ADIO_File fd, void *buf, int count, } } } + /* + { + ADIO_Fcntl_t fcntl_struct; + int error_code; + ADIO_Fcntl(fd, ADIO_FCNTL_GET_FSIZE, &fcntl_struct, &error_code); + printf("File size c: %d\n", fcntl_struct.fsize); + } + printf("ReadFile(%d bytes)\n", len);fflush(stdout); + */ err = ReadFile(fd->fd_sys, buf, len, &dwNumRead, pOvl); /* --BEGIN ERROR HANDLING-- */ if (err == FALSE) @@ -142,6 +164,7 @@ void ADIOI_NTFS_ReadContig(ADIO_File fd, void *buf, int count, case ERROR_IO_PENDING: break; case ERROR_HANDLE_EOF: + /*printf("EOF error\n");fflush(stdout);*/ SetEvent(pOvl->hEvent); break; default: @@ -160,13 +183,16 @@ void ADIOI_NTFS_ReadContig(ADIO_File fd, void *buf, int count, if (err == FALSE) { err = GetLastError(); - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, myname, - __LINE__, MPI_ERR_IO, "**io", - "**io %s", ADIOI_NTFS_Strerror(err)); - CloseHandle(pOvl->hEvent); - ADIOI_Free(pOvl); - return; + if (err != ERROR_HANDLE_EOF) /* Ignore EOF errors */ + { + *error_code = MPIO_Err_create_code(MPI_SUCCESS, + MPIR_ERR_RECOVERABLE, myname, + __LINE__, MPI_ERR_IO, "**io", + "**io %s", ADIOI_NTFS_Strerror(err)); + CloseHandle(pOvl->hEvent); + ADIOI_Free(pOvl); + return; + } } /* --END ERROR HANDLING-- */ if (!CloseHandle(pOvl->hEvent)) diff --git a/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_resize.c b/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_resize.c index aefb42cd7f..19df2778ec 100644 --- a/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_resize.c +++ b/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_resize.c @@ -29,6 +29,7 @@ void ADIOI_NTFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) return; } } + /*printf("setting file length to %d\n", size);fflush(stdout);*/ /* --END ERROR HANDLING-- */ result = SetEndOfFile(fd->fd_sys); /* --BEGIN ERROR HANDLING-- */ diff --git a/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_write.c b/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_write.c index c11402e2d5..27c17d5ca5 100644 --- a/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_write.c +++ b/ompi/mca/io/romio/romio/adio/ad_ntfs/ad_ntfs_write.c @@ -60,6 +60,7 @@ void ADIOI_NTFS_WriteContig(ADIO_File fd, void *buf, int count, } } } + /*printf("WriteFile(%d bytes)\n", len);fflush(stdout);*/ err = WriteFile(fd->fd_sys, buf, len, &dwNumWritten, pOvl); /* --BEGIN ERROR HANDLING-- */ if (err == FALSE) @@ -126,6 +127,7 @@ void ADIOI_NTFS_WriteContig(ADIO_File fd, void *buf, int count, } } } + /*printf("WriteFile(%d bytes)\n", len);fflush(stdout);*/ err = WriteFile(fd->fd_sys, buf, len, &dwNumWritten, pOvl); /* --BEGIN ERROR HANDLING-- */ if (err == FALSE) diff --git a/ompi/mca/io/romio/romio/adio/ad_panfs/.cvsignore b/ompi/mca/io/romio/romio/adio/ad_panfs/.cvsignore new file mode 100644 index 0000000000..515e91eafa --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_panfs/.cvsignore @@ -0,0 +1,3 @@ +Makefile +.*-cache +*.lo diff --git a/ompi/mca/io/romio/romio/adio/ad_panfs/.state-cache b/ompi/mca/io/romio/romio/adio/ad_panfs/.state-cache new file mode 100644 index 0000000000..ec4702ddfa --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_panfs/.state-cache @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/ad_pfs/.cvsignore b/ompi/mca/io/romio/romio/adio/ad_pfs/.cvsignore new file mode 100644 index 0000000000..f1ef70e726 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_pfs/.cvsignore @@ -0,0 +1,6 @@ +Makefile +.deps +*.bb +*.bbg +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/adio/ad_pfs/.state-cache b/ompi/mca/io/romio/romio/adio/ad_pfs/.state-cache new file mode 100644 index 0000000000..88676b3537 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_pfs/.state-cache @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/ad_piofs/.cvsignore b/ompi/mca/io/romio/romio/adio/ad_piofs/.cvsignore new file mode 100644 index 0000000000..f1ef70e726 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_piofs/.cvsignore @@ -0,0 +1,6 @@ +Makefile +.deps +*.bb +*.bbg +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/adio/ad_piofs/.state-cache b/ompi/mca/io/romio/romio/adio/ad_piofs/.state-cache new file mode 100644 index 0000000000..f3afeedb11 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_piofs/.state-cache @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs/.cvsignore b/ompi/mca/io/romio/romio/adio/ad_pvfs/.cvsignore new file mode 100644 index 0000000000..f1ef70e726 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs/.cvsignore @@ -0,0 +1,6 @@ +Makefile +.deps +*.bb +*.bbg +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs/.state-cache b/ompi/mca/io/romio/romio/adio/ad_pvfs/.state-cache new file mode 100644 index 0000000000..9614a31ff8 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs/.state-cache @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_flush.c b/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_flush.c index 3779046d3a..d378a1315e 100644 --- a/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_flush.c +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_flush.c @@ -24,7 +24,7 @@ void ADIOI_PVFS_Flush(ADIO_File fd, int *error_code) if (rank == fd->hints->ranklist[0]) { err = pvfs_fsync(fd->fd_sys); } - MPI_Bcast(&err, 1, MPI_INT, 0, fd->comm); + MPI_Bcast(&err, 1, MPI_INT, fd->hints->ranklist[0], fd->comm); if (err == -1) { *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_read.c b/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_read.c index 5424cdf1f5..9ad04db679 100644 --- a/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_read.c +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_read.c @@ -541,7 +541,7 @@ void ADIOI_PVFS_ReadStridedListIO(ADIO_File fd, void *buf, int count, max_mem_list = mem_list_count; if (max_file_list < file_list_count) max_file_list = file_list_count; - if (max_mem_list == max_mem_list == MAX_ARRAY_SIZE) + if (max_mem_list == MAX_ARRAY_SIZE) break; } /* while (size_read < bufsize) */ diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_resize.c b/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_resize.c index a2236e204e..ce72b4c17c 100644 --- a/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_resize.c +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_resize.c @@ -20,7 +20,7 @@ void ADIOI_PVFS_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) if (rank == fd->hints->ranklist[0]) { err = pvfs_ftruncate64(fd->fd_sys, size); } - MPI_Bcast(&err, 1, MPI_INT, 0, fd->comm); + MPI_Bcast(&err, 1, MPI_INT, fd->hints->ranklist[0], fd->comm); if (err == -1) { *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_write.c b/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_write.c index 2e8c6b388c..362a01b360 100644 --- a/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_write.c +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs/ad_pvfs_write.c @@ -881,7 +881,7 @@ void ADIOI_PVFS_WriteStridedListIO(ADIO_File fd, void *buf, int count, max_mem_list = mem_list_count; if (max_file_list < file_list_count) max_file_list = file_list_count; - if (max_mem_list == max_mem_list == MAX_ARRAY_SIZE) + if (max_mem_list == MAX_ARRAY_SIZE) break; } /* while (size_wrote < bufsize) */ diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs2/.cvsignore b/ompi/mca/io/romio/romio/adio/ad_pvfs2/.cvsignore new file mode 100644 index 0000000000..f1ef70e726 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs2/.cvsignore @@ -0,0 +1,6 @@ +Makefile +.deps +*.bb +*.bbg +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs2/.state-cache b/ompi/mca/io/romio/romio/adio/ad_pvfs2/.state-cache new file mode 100644 index 0000000000..3d3bc5a45e --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs2/.state-cache @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_close.c b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_close.c index 40739acbab..905356852f 100644 --- a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_close.c +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_close.c @@ -10,6 +10,7 @@ void ADIOI_PVFS2_Close(ADIO_File fd, int *error_code) { ADIOI_Free(fd->fs_ptr); + fd->fs_ptr = NULL; /* PVFS2 doesn't have a 'close', but MPI-IO semantics dictate that we * ensure all data has been flushed. */ diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_flush.c b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_flush.c index 28aa1cca51..2caf3ac51c 100644 --- a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_flush.c +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_flush.c @@ -36,10 +36,9 @@ void ADIOI_PVFS2_Flush(ADIO_File fd, int *error_code) /* io_worker computed in ADIO_Open */ if (rank == fd->hints->ranklist[0]) { ret = PVFS_sys_flush(pvfs_fs->object_ref, &(pvfs_fs->credentials)); - MPI_Bcast(&ret, 1, MPI_INT, 0, fd->comm); - } else { - MPI_Bcast(&ret, 1, MPI_INT, 0, fd->comm); } + MPI_Bcast(&ret, 1, MPI_INT, fd->hints->ranklist[0], fd->comm); + /* --BEGIN ERROR HANDLING-- */ if (ret != 0) { *error_code = MPIO_Err_create_code(MPI_SUCCESS, diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_hints.c b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_hints.c index 6a143a3073..a752dbeade 100644 --- a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_hints.c +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_hints.c @@ -19,6 +19,12 @@ void ADIOI_PVFS2_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) MPI_Info_create(&(fd->info)); MPI_Info_set(fd->info, "romio_pvfs2_debugmask", "0"); fd->hints->fs_hints.pvfs2.debugmask = 0; + + MPI_Info_set(fd->info, "striping_factor", "0"); + fd->hints->striping_factor = 0; + + MPI_Info_set(fd->info, "striping_unit", "0"); + fd->hints->striping_unit = 0; /* any user-provided hints? */ if (users_info != MPI_INFO_NULL) { @@ -62,6 +68,30 @@ void ADIOI_PVFS2_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) MPI_Info_set(fd->info, "striping_factor", value); } + /* the striping unit */ + MPI_Info_get(users_info, "striping_unit", + MPI_MAX_INFO_VAL, value, &flag); + if (flag) { + tmp_value = fd->hints->striping_unit = atoi(value); + MPI_Bcast(&tmp_value, 1, MPI_INT, 0, fd->comm); + /* --BEGIN ERROR HANDLING-- */ + if (tmp_value != fd->hints->striping_unit) { + MPIO_ERR_CREATE_CODE_INFO_NOT_SAME(myname, + "striping_unit", + error_code); + return; + } + /* --END ERROR HANDLING-- */ + + MPI_Info_set(fd->info, "striping_unit", value); + } + + /* distribution name */ + MPI_Info_get(users_info, "romio_pvfs2_distribution_name", + MPI_MAX_INFO_VAL, value, &flag); + if (flag) { + } + ADIOI_Free(value); } } diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_open.c b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_open.c index 8ba405adbc..b2c499ce8d 100644 --- a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_open.c +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_open.c @@ -29,7 +29,8 @@ typedef struct open_status_s open_status; * handle to everyone else in the communicator */ static void fake_an_open(PVFS_fs_id fs_id, char *pvfs_name, int access_mode, - int nr_datafiles, ADIOI_PVFS2_fs *pvfs2_fs, + int nr_datafiles, int strip_size, + ADIOI_PVFS2_fs *pvfs2_fs, open_status *o_status) { int ret; @@ -37,10 +38,16 @@ static void fake_an_open(PVFS_fs_id fs_id, char *pvfs_name, int access_mode, PVFS_sysresp_getparent resp_getparent; PVFS_sysresp_create resp_create; PVFS_sys_attr attribs; + PVFS_sys_dist* dist; ADIOI_PVFS2_makeattribs(&attribs); - attribs.dfile_count = nr_datafiles; + if (nr_datafiles > 0 ) { + attribs.dfile_count = nr_datafiles; + attribs.mask |= PVFS_ATTR_SYS_DFILE_COUNT; + } + dist = NULL; + memset(&resp_lookup, 0, sizeof(resp_lookup)); memset(&resp_getparent, 0, sizeof(resp_getparent)); memset(&resp_create, 0, sizeof(resp_create)); @@ -49,17 +56,34 @@ static void fake_an_open(PVFS_fs_id fs_id, char *pvfs_name, int access_mode, ret = PVFS_sys_lookup(fs_id, pvfs_name, &(pvfs2_fs->credentials), &resp_lookup, PVFS2_LOOKUP_LINK_FOLLOW); if ( (ret < 0) ) { /* XXX: check what the error was */ - if (access_mode & MPI_MODE_CREATE) { + if (access_mode & ADIO_CREATE) { ret = PVFS_sys_getparent(fs_id, pvfs_name, &(pvfs2_fs->credentials), &resp_getparent); if (ret < 0) { FPRINTF(stderr, "pvfs_sys_getparent returns with %d\n", ret); o_status->error = ret; return; - } - ret = PVFS_sys_create(resp_getparent.basename, + } + + /* Set the distribution strip size if specified */ + if (0 < strip_size) { + /* Note that the distribution is hardcoded here */ + dist = PVFS_sys_dist_lookup("simple_stripe"); + ret = PVFS_sys_dist_setparam(dist, + "strip_size", + &strip_size); + if (ret < 0) + { + FPRINTF(stderr, + "pvfs_sys_dist_setparam returns with %d\n", ret); + o_status->error = ret; + } + } + + /* Perform file creation */ + ret = PVFS_sys_create(resp_getparent.basename, resp_getparent.parent_ref, attribs, - &(pvfs2_fs->credentials), NULL, &resp_create); + &(pvfs2_fs->credentials), dist, &resp_create); if (ret < 0) { /* XXX: should only do this for EEXISTS */ ret = PVFS_sys_lookup(fs_id, pvfs_name, @@ -79,7 +103,7 @@ static void fake_an_open(PVFS_fs_id fs_id, char *pvfs_name, int access_mode, o_status->error = ret; return; } - } else if (access_mode & MPI_MODE_EXCL) { + } else if (access_mode & ADIO_EXCL) { /* lookup should not succeed if opened with EXCL */ o_status->error = -1; /* XXX: what should it be? */ return; @@ -92,10 +116,14 @@ static void fake_an_open(PVFS_fs_id fs_id, char *pvfs_name, int access_mode, } -/* if MPI_File_open was called with MPI_MODE_CREATE|MPI_MODE_EXCL, then we have - * a little problem: our usual open-and-broadcast test will not work because - * only one person (the first aggregator) will perform the open w/ CREATE|EXCL - */ +/* ADIOI_PVFS2_Open: + * one process opens (or creates) the file, then broadcasts the result to the + * remaining processors. + * + * ADIO_Open used to perform an optimization when MPI_MODE_CREATE (and before + * that, MPI_MODE_EXCL) was set. Because PVFS2 handles file lookup and + * creation more scalably than other file systems, ADIO_Open now skips any + * special handling when CREATE is set. */ void ADIOI_PVFS2_Open(ADIO_File fd, int *error_code) { int rank, ret; @@ -109,7 +137,7 @@ void ADIOI_PVFS2_Open(ADIO_File fd, int *error_code) * doing the error checking. define a struct for both the object reference * and the error code to broadcast to all the processors */ - open_status o_status; + open_status o_status = {0, {0, 0}}; MPI_Datatype open_status_type; MPI_Datatype types[2] = {MPI_INT, MPI_BYTE}; int lens[2] = {1, sizeof(PVFS_object_ref)}; @@ -137,12 +165,11 @@ void ADIOI_PVFS2_Open(ADIO_File fd, int *error_code) return; } + /* currently everyone gets their own credentials */ ADIOI_PVFS2_makecredentials(&(pvfs2_fs->credentials)); - /* we only have to do this on one node. we'll broadcast the handle to - * everyone else in the communicator */ - - if (rank == fd->hints->ranklist[0]) { + /* one process resolves name and will later bcast to others */ + if (rank == fd->hints->ranklist[0] && fd->fs_ptr == NULL) { /* given the filename, figure out which pvfs filesystem it is on */ ret = PVFS_util_resolve(fd->filename, &cur_fs, pvfs_path, PVFS_NAME_MAX); @@ -152,38 +179,15 @@ void ADIOI_PVFS2_Open(ADIO_File fd, int *error_code) o_status.error = -1; } else { fake_an_open(cur_fs, pvfs_path, - fd->access_mode, fd->hints->striping_factor, - pvfs2_fs, &o_status); + fd->access_mode, fd->hints->striping_factor, + fd->hints->striping_unit, + pvfs2_fs, &o_status); } - } - /* NOTE: if MPI_MODE_EXCL was set, ADIO_Open will call - * ADIOI_PVFS2_Open from just one processor. This really confuses MPI when - * one procesor on a communicator broadcasts to no listners. - * - * Since ADIO_Open will close the file and call ADIOI_PVFS2_Open again (but - * w/o EXCL), we can bail out right here and return early */ - if ((fd->access_mode & MPI_MODE_EXCL)) { - if (o_status.error == 0) - { - *error_code = MPI_SUCCESS; - fd->fs_ptr = pvfs2_fs; - } - else - { - /* --BEGIN ERROR HANDLING-- */ - ADIOI_Free(pvfs2_fs); - *error_code = MPIO_Err_create_code(MPI_SUCCESS, - MPIR_ERR_RECOVERABLE, - myname, __LINE__, - ADIOI_PVFS2_error_convert(o_status.error), - "Unknown error", 0); - /* TODO: FIX STRING */ - /* --END ERROR HANDLING-- */ - } - MPI_Type_free(&open_status_type); - return; - } + /* store credentials and object reference in fd */ + pvfs2_fs->object_ref = o_status.object_ref; + fd->fs_ptr = pvfs2_fs; + } /* broadcast status and (possibly valid) object reference */ MPI_Address(&o_status.error, &offsets[0]); @@ -192,7 +196,13 @@ void ADIOI_PVFS2_Open(ADIO_File fd, int *error_code) MPI_Type_struct(2, lens, offsets, types, &open_status_type); MPI_Type_commit(&open_status_type); - MPI_Bcast(MPI_BOTTOM, 1, open_status_type, 0, fd->comm); + /* Assertion: if we hit this Bcast, then all processes collectively + * called this open. + * + * That's because deferred open never happens with PVFS2. + */ + MPI_Bcast(MPI_BOTTOM, 1, open_status_type, fd->hints->ranklist[0], + fd->comm); MPI_Type_free(&open_status_type); /* --BEGIN ERROR HANDLING-- */ diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_read.c b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_read.c index c27c43d085..cab5c3834b 100644 --- a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_read.c +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_read.c @@ -1,5 +1,6 @@ -/* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* +/* -*- Mode: C; c-basic-offset:4 ; -*- + * vim: ts=8 sts=4 sw=4 noexpandtab + * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ @@ -64,7 +65,7 @@ void ADIOI_PVFS2_ReadContig(ADIO_File fd, void *buf, int count, myname, __LINE__, ADIOI_PVFS2_error_convert(ret), "Error in PVFS_sys_read", 0); - return; + goto fn_exit; } /* --END ERROR HANDLING-- */ @@ -79,6 +80,9 @@ void ADIOI_PVFS2_ReadContig(ADIO_File fd, void *buf, int count, #endif *error_code = MPI_SUCCESS; +fn_exit: + PVFS_Request_free(&mem_req); + PVFS_Request_free(&file_req); return; } @@ -97,7 +101,7 @@ void ADIOI_PVFS2_ReadStrided(ADIO_File fd, void *buf, int count, int filetype_size, etype_size, buftype_size; MPI_Aint filetype_extent, buftype_extent; int buf_count, buftype_is_contig, filetype_is_contig; - ADIO_Offset off, disp, start_off; + ADIO_Offset off, disp, start_off, initial_off; int flag, st_frd_size, st_n_filetypes; int mem_list_count, file_list_count; @@ -129,6 +133,17 @@ void ADIOI_PVFS2_ReadStrided(ADIO_File fd, void *buf, int count, ADIOI_Datatype_iscontig(datatype, &buftype_is_contig); ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig); + + /* the HDF5 tests showed a bug in this list processing code (see many many + * lines down below). We added a workaround, but common HDF5 file types + * are actually contiguous and do not need the expensive workarond */ + if (!filetype_is_contig) { + flat_file = ADIOI_Flatlist; + while (flat_buf->type != fd->filetype) flat_file = flat_file->next; + if (flat_file->count == 1) + filetype_is_contig = 1; + } + MPI_Type_size(fd->filetype, &filetype_size); if ( ! filetype_size ) { *error_code = MPI_SUCCESS; @@ -211,6 +226,8 @@ void ADIOI_PVFS2_ReadStrided(ADIO_File fd, void *buf, int count, "Error in PVFS_sys_read", 0); goto error_state; } + PVFS_Request_free(&mem_req); + PVFS_Request_free(&file_req); total_bytes_read += resp_io.total_completed; /* --END ERROR HANDLING-- */ @@ -251,6 +268,8 @@ void ADIOI_PVFS2_ReadStrided(ADIO_File fd, void *buf, int count, while (flat_file->type != fd->filetype) flat_file = flat_file->next; disp = fd->disp; + initial_off = offset; + /* for each case - ADIO_Individual pointer or explicit, find the file offset in bytes (offset), n_filetypes (how many filetypes into @@ -418,6 +437,9 @@ void ADIOI_PVFS2_ReadStrided(ADIO_File fd, void *buf, int count, goto error_state; } /* --END ERROR HANDING-- */ + PVFS_Request_free(&mem_req); + PVFS_Request_free(&file_req); + total_bytes_read += resp_io.total_completed; mem_offsets += mem_lengths; @@ -487,6 +509,8 @@ void ADIOI_PVFS2_ReadStrided(ADIO_File fd, void *buf, int count, goto error_state; } /* --END ERROR HANDLING-- */ + PVFS_Request_free(&mem_req); + PVFS_Request_free(&file_req); total_bytes_read += resp_io.total_completed; } } @@ -651,10 +675,37 @@ void ADIOI_PVFS2_ReadStrided(ADIO_File fd, void *buf, int count, max_mem_list = mem_list_count; if (max_file_list < file_list_count) max_file_list = file_list_count; - if (max_mem_list == max_mem_list == MAX_ARRAY_SIZE) + if (max_mem_list == MAX_ARRAY_SIZE) break; } /* while (size_read < bufsize) */ + /* one last check before we actually carry out the operation: + * this code has hard-to-fix bugs when a noncontiguous file type has + * such large pieces that the sum of the lengths of the memory type is + * not larger than one of those pieces (and vice versa for large memory + * types and many pices of file types. In these cases, give up and + * fall back to naive reads and writes. The testphdf5 test created a + * type with two very large memory regions and 600 very small file + * regions. The same test also created a type with one very large file + * region and many (700) very small memory regions. both cases caused + * problems for this code */ + + if ( ( (file_list_count == 1) && + (new_file_read < flat_file->blocklens[0] ) ) || + ((mem_list_count == 1) && + (new_buffer_read < flat_buf->blocklens[0]) ) || + ((file_list_count == MAX_ARRAY_SIZE) && + (new_file_read < flat_buf->blocklens[0]) ) || + ( (mem_list_count == MAX_ARRAY_SIZE) && + (new_buffer_read < flat_file->blocklens[0])) ) + { + + ADIOI_Delete_flattened(datatype); + ADIOI_GEN_ReadStrided_naive(fd, buf, count, datatype, + file_ptr_type, initial_off, status, error_code); + return; + } + mem_offsets = (PVFS_size*)ADIOI_Malloc(max_mem_list*sizeof(PVFS_size)); mem_lengths = (int *)ADIOI_Malloc(max_mem_list*sizeof(int)); file_offsets = (int64_t *)ADIOI_Malloc(max_file_list*sizeof(int64_t)); @@ -861,6 +912,8 @@ void ADIOI_PVFS2_ReadStrided(ADIO_File fd, void *buf, int count, "Error in PVFS_sys_read", 0); } /* --END ERROR HANDLING-- */ + PVFS_Request_free(&mem_req); + PVFS_Request_free(&file_req); total_bytes_read += resp_io.total_completed; size_read += new_buffer_read; start_k = k; diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_resize.c b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_resize.c index 9464d52ffe..13533773b6 100644 --- a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_resize.c +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_resize.c @@ -35,9 +35,9 @@ void ADIOI_PVFS2_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) if (rank == fd->hints->ranklist[0]) { ret = PVFS_sys_truncate(pvfs_fs->object_ref, size, &(pvfs_fs->credentials)); - MPI_Bcast(&ret, 1, MPI_INT, 0, fd->comm); + MPI_Bcast(&ret, 1, MPI_INT, fd->hints->ranklist[0], fd->comm); } else { - MPI_Bcast(&ret, 1, MPI_INT, 0, fd->comm); + MPI_Bcast(&ret, 1, MPI_INT, fd->hints->ranklist[0], fd->comm); } /* --BEGIN ERROR HANDLING-- */ if (ret != 0) { diff --git a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_write.c b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_write.c index f10898ace0..00bad6e3a7 100644 --- a/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_write.c +++ b/ompi/mca/io/romio/romio/adio/ad_pvfs2/ad_pvfs2_write.c @@ -60,7 +60,7 @@ void ADIOI_PVFS2_WriteContig(ADIO_File fd, void *buf, int count, myname, __LINE__, ADIOI_PVFS2_error_convert(ret), "Error in PVFS_sys_write", 0); - return; + goto fn_exit; } /* --END ERROR HANDLING-- */ @@ -76,7 +76,7 @@ void ADIOI_PVFS2_WriteContig(ADIO_File fd, void *buf, int count, myname, __LINE__, ADIOI_PVFS2_error_convert(ret), "Error in PVFS_sys_write", 0); - return; + goto fn_exit; } /* --END ERROR HANDLING-- */ fd->fp_ind += (int)resp_io.total_completed; @@ -86,6 +86,9 @@ void ADIOI_PVFS2_WriteContig(ADIO_File fd, void *buf, int count, MPIR_Status_set_bytes(status, datatype, (int)resp_io.total_completed); #endif *error_code = MPI_SUCCESS; +fn_exit: + PVFS_Request_free(&file_req); + PVFS_Request_free(&mem_req); return; } @@ -108,7 +111,7 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, int filetype_size, etype_size, buftype_size; MPI_Aint filetype_extent, buftype_extent; int buf_count, buftype_is_contig, filetype_is_contig; - ADIO_Offset off, disp, start_off; + ADIO_Offset off, disp, start_off, initial_off; int flag, st_fwr_size, st_n_filetypes; int err_flag=0; @@ -134,7 +137,8 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, MPI_Offset total_bytes_written=0; static char myname[] = "ADIOI_PVFS2_WRITESTRIDED"; - /* TODO: increase this to the maximum value */ + /* note: don't increase this: several parts of PVFS2 now + * assume this limit*/ #define MAX_ARRAY_SIZE 64 /* --BEGIN ERROR HANDLING-- */ @@ -151,6 +155,16 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, ADIOI_Datatype_iscontig(datatype, &buftype_is_contig); ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig); + /* the HDF5 tests showed a bug in this list processing code (see many many + * lines down below). We added a workaround, but common HDF5 file types + * are actually contiguous and do not need the expensive workarond */ + if (!filetype_is_contig) { + flat_file = ADIOI_Flatlist; + while (flat_buf->type != fd->filetype) flat_file = flat_file->next; + if (flat_file->count == 1) + filetype_is_contig = 1; + } + MPI_Type_size(fd->filetype, &filetype_size); if ( ! filetype_size ) { *error_code = MPI_SUCCESS; @@ -210,14 +224,13 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, if (!(b_blks_wrote % MAX_ARRAY_SIZE) || (b_blks_wrote == total_blks_to_write)) { - /* in the case of the last read list call, + /* in the case of the last write list call, adjust mem_list_count */ if (b_blks_wrote == total_blks_to_write) { mem_list_count = total_blks_to_write % MAX_ARRAY_SIZE; - /* in case last read list call fills max arrays */ + /* in case last write list call fills max arrays */ if (!mem_list_count) mem_list_count = MAX_ARRAY_SIZE; } - err_flag = PVFS_Request_hindexed(mem_list_count, mem_lengths, mem_offsets, PVFS_BYTE, &mem_req); @@ -252,7 +265,7 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, &resp_io); total_bytes_written += resp_io.total_completed; - /* in the case of error or the last read list call, + /* in the case of error or the last write list call, * leave here */ /* --BEGIN ERROR HANDLING-- */ if (err_flag) { @@ -268,6 +281,8 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, file_offsets += file_lengths; file_lengths = 0; + PVFS_Request_free(&mem_req); + PVFS_Request_free(&file_req); } } /* for (i=0; icount; i++) */ j++; @@ -300,6 +315,7 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, while (flat_file->type != fd->filetype) flat_file = flat_file->next; disp = fd->disp; + initial_off = offset; /* for each case - ADIO_Individual pointer or explicit, find offset (file offset in bytes), n_filetypes (how many filetypes into file @@ -368,7 +384,7 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, mem_list_count = 1; - /* determine how many blocks in file to read */ + /* determine how many blocks in file to write */ f_data_wrote = ADIOI_MIN(st_fwr_size, bufsize); total_blks_to_write = 1; j++; @@ -387,7 +403,7 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, mem_offsets = buf; mem_lengths = 0; - /* if at least one full readlist, allocate file arrays + /* if at least one full writelist, allocate file arrays at max array size and don't free until very end */ if (n_write_lists) { file_offsets = (int64_t*)ADIOI_Malloc(MAX_ARRAY_SIZE* @@ -395,7 +411,7 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, file_lengths = (int32_t*)ADIOI_Malloc(MAX_ARRAY_SIZE* sizeof(int32_t)); } - /* if there's no full readlist allocate file arrays according + /* if there's no full writelist allocate file arrays according to needed size (extra_blks) */ else { file_offsets = (int64_t*)ADIOI_Malloc(extra_blks* @@ -473,9 +489,12 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, mem_offsets += mem_lengths; mem_lengths = 0; + PVFS_Request_free(&file_req); + PVFS_Request_free(&mem_req); + } /* for (i=0; iblocklens[k] + @@ -604,7 +625,7 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, new_file_write = 0; file_list_count = 0; while ((file_list_count < MAX_ARRAY_SIZE) && - (new_file_write < new_buffer_write)) { + (new_file_write < new_buffer_write)) { if(file_list_count) { if((new_file_write + flat_file->blocklens[j]) > new_buffer_write) { @@ -706,10 +727,37 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, max_mem_list = mem_list_count; if (max_file_list < file_list_count) max_file_list = file_list_count; - if (max_mem_list == max_mem_list == MAX_ARRAY_SIZE) + if (max_mem_list == MAX_ARRAY_SIZE) break; } /* while (size_wrote < bufsize) */ + /* one last check before we actually carry out the operation: + * this code has hard-to-fix bugs when a noncontiguous file type has + * such large pieces that the sum of the lengths of the memory type is + * not larger than one of those pieces (and vice versa for large memory + * types and many pices of file types. In these cases, give up and + * fall back to naive reads and writes. The testphdf5 test created a + * type with two very large memory regions and 600 very small file + * regions. The same test also created a type with one very large file + * region and many (700) very small memory regions. both cases caused + * problems for this code */ + + if ( ( (file_list_count == 1) && + (new_file_write < flat_file->blocklens[0] ) ) || + ((mem_list_count == 1) && + (new_buffer_write < flat_buf->blocklens[0]) ) || + ((file_list_count == MAX_ARRAY_SIZE) && + (new_file_write < flat_buf->blocklens[0]) ) || + ( (mem_list_count == MAX_ARRAY_SIZE) && + (new_buffer_write < flat_file->blocklens[0])) ) + { + ADIOI_Delete_flattened(datatype); + ADIOI_GEN_WriteStrided_naive(fd, buf, count, datatype, + file_ptr_type, initial_off, status, error_code); + return; + } + + mem_offsets = (PVFS_size*)ADIOI_Malloc(max_mem_list*sizeof(PVFS_size)); mem_lengths = (int *)ADIOI_Malloc(max_mem_list*sizeof(int)); file_offsets = (int64_t *)ADIOI_Malloc(max_file_list*sizeof(int64_t)); @@ -736,8 +784,8 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, (new_buffer_write < bufsize-size_wrote)) { /* find mem_list_count and file_list_count such that both are less than MAX_ARRAY_SIZE, the sum of their lengths are - equal, and the sum of all the data read and data to be - read in the next immediate read list is less than + equal, and the sum of all the data written and data to be + written in the next immediate write list is less than bufsize */ if(mem_list_count) { if((new_buffer_write + flat_buf->blocklens[k] + @@ -824,7 +872,7 @@ void ADIOI_PVFS2_WriteStrided(ADIO_File fd, void *buf, int count, } /* while ((mem_list_count < MAX_ARRAY_SIZE) && (new_buffer_write < bufsize-size_wrote)) */ - /* fills the allocated readlist arrays */ + /* fills the allocated writelist arrays */ k = start_k; j = start_j; for (i=0; i + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/ad_testfs/.cvsignore b/ompi/mca/io/romio/romio/adio/ad_testfs/.cvsignore new file mode 100644 index 0000000000..76def0bd1f --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_testfs/.cvsignore @@ -0,0 +1,8 @@ +Makefile +.deps +*.bb +*.bbg +.libs +.libstamp* +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/adio/ad_testfs/.state-cache b/ompi/mca/io/romio/romio/adio/ad_testfs/.state-cache new file mode 100644 index 0000000000..09d8a6f53f --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_testfs/.state-cache @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/ad_ufs/.cvsignore b/ompi/mca/io/romio/romio/adio/ad_ufs/.cvsignore new file mode 100644 index 0000000000..76def0bd1f --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_ufs/.cvsignore @@ -0,0 +1,8 @@ +Makefile +.deps +*.bb +*.bbg +.libs +.libstamp* +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/adio/ad_ufs/.state-cache b/ompi/mca/io/romio/romio/adio/ad_ufs/.state-cache new file mode 100644 index 0000000000..d3e08916dd --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_ufs/.state-cache @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/ad_ufs/ad_ufs_open.c b/ompi/mca/io/romio/romio/adio/ad_ufs/ad_ufs_open.c index 3f41305cc2..4e915942cc 100644 --- a/ompi/mca/io/romio/romio/adio/ad_ufs/ad_ufs_open.c +++ b/ompi/mca/io/romio/romio/adio/ad_ufs/ad_ufs_open.c @@ -84,6 +84,6 @@ void ADIOI_UFS_Open(ADIO_File fd, int *error_code) "**io %s", strerror(errno)); } } - /* --END ERROR HANDLING */ + /* --END ERROR HANDLING-- */ else *error_code = MPI_SUCCESS; } diff --git a/ompi/mca/io/romio/romio/adio/ad_xfs/.cvsignore b/ompi/mca/io/romio/romio/adio/ad_xfs/.cvsignore new file mode 100644 index 0000000000..23e33c77dc --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_xfs/.cvsignore @@ -0,0 +1,9 @@ +Makefile +*.safe +.deps +*.bb +*.bbg +.libs +.libstamp* +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/adio/ad_xfs/.state-cache b/ompi/mca/io/romio/romio/adio/ad_xfs/.state-cache new file mode 100644 index 0000000000..6ccbd432cb --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/ad_xfs/.state-cache @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/common/.cvsignore b/ompi/mca/io/romio/romio/adio/common/.cvsignore new file mode 100644 index 0000000000..45da97c553 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/common/.cvsignore @@ -0,0 +1,10 @@ +Makefile +Debug* +Release* +.deps +*.bb +*.bbg +.libs +.libstamp* +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/adio/common/.state-cache b/ompi/mca/io/romio/romio/adio/common/.state-cache new file mode 100644 index 0000000000..cff13eee22 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/common/.state-cache @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/common/Makefile.am b/ompi/mca/io/romio/romio/adio/common/Makefile.am index 29da65a39b..babe696d32 100644 --- a/ompi/mca/io/romio/romio/adio/common/Makefile.am +++ b/ompi/mca/io/romio/romio/adio/common/Makefile.am @@ -71,7 +71,6 @@ libadio_common_la_SOURCES = \ io_romio_eof_offset.c \ io_romio_error.c \ io_romio_flatten.c \ - io_romio_gencheck.c \ io_romio_get_fp_posn.c \ io_romio_iscontig.c \ io_romio_lock.c \ diff --git a/ompi/mca/io/romio/romio/adio/common/ad_close.c b/ompi/mca/io/romio/romio/adio/common/ad_close.c index 1c6da513c4..0176907b3c 100644 --- a/ompi/mca/io/romio/romio/adio/common/ad_close.c +++ b/ompi/mca/io/romio/romio/adio/common/ad_close.c @@ -6,6 +6,7 @@ */ #include "adio.h" +#include "adio_extern.h" #ifdef HAVE_UNISTD_H #include @@ -53,21 +54,20 @@ void ADIO_Close(ADIO_File fd, int *error_code) /* if we are doing aggregation and deferred open, then it's possible * that rank 0 does not have access to the file. make sure only an * aggregator deletes the file.*/ - if (fd->agg_comm != MPI_COMM_NULL ) { - MPI_Comm_rank(fd->agg_comm, &myrank); - MPI_Barrier(fd->agg_comm); - if (!myrank) ADIO_Delete(fd->filename, &err); - } else { - MPI_Comm_rank(fd->comm, &myrank); - MPI_Barrier(fd->comm); - if (!myrank) ADIO_Delete(fd->filename, &err); + MPI_Comm_rank(fd->comm, &myrank); + if (myrank == fd->hints->ranklist[0]) { + ADIO_Delete(fd->filename, &err); } + MPI_Barrier(fd->comm); + } + + if (fd->fortran_handle != -1) { + ADIOI_Ftable[fd->fortran_handle] = MPI_FILE_NULL; } ADIOI_Free(fd->hints->ranklist); ADIOI_Free(fd->hints->cb_config_list); ADIOI_Free(fd->hints); - ADIOI_Free(fd->fns); MPI_Comm_free(&(fd->comm)); /* deferred open: if we created an aggregator communicator, free it */ if (fd->agg_comm != MPI_COMM_NULL) { diff --git a/ompi/mca/io/romio/romio/adio/common/ad_get_sh_fp.c b/ompi/mca/io/romio/romio/adio/common/ad_get_sh_fp.c index a30e3443be..e336837588 100644 --- a/ompi/mca/io/romio/romio/adio/common/ad_get_sh_fp.c +++ b/ompi/mca/io/romio/romio/adio/common/ad_get_sh_fp.c @@ -35,7 +35,7 @@ void ADIO_Get_shared_fp(ADIO_File fd, int incr, ADIO_Offset *shared_fp, fd->file_system, fd->fns, ADIO_CREATE | ADIO_RDWR | ADIO_DELETE_ON_CLOSE, - 0, MPI_BYTE, MPI_BYTE, 0, + 0, MPI_BYTE, MPI_BYTE, MPI_INFO_NULL, ADIO_PERM_NULL, error_code); if (*error_code != MPI_SUCCESS) return; diff --git a/ompi/mca/io/romio/romio/adio/common/ad_hints.c b/ompi/mca/io/romio/romio/adio/common/ad_hints.c index d6cdc151b6..45e26bf216 100644 --- a/ompi/mca/io/romio/romio/adio/common/ad_hints.c +++ b/ompi/mca/io/romio/romio/adio/common/ad_hints.c @@ -370,8 +370,9 @@ void ADIOI_GEN_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code) fd->hints->deferred_open = 0; } - if ((fd->file_system == ADIO_PIOFS) || (fd->file_system == ADIO_PVFS)) { - /* no data sieving for writes in PIOFS and PVFS, because they do not + if ((fd->file_system == ADIO_PIOFS) || (fd->file_system == ADIO_PVFS) || + (fd->file_system == ADIO_PVFS2) ) { + /* no data sieving for writes in PIOFS, PVFS and PVFS2, because they do not support file locking */ MPI_Info_get(info, "ind_wr_buffer_size", MPI_MAX_INFO_VAL, value, &flag); diff --git a/ompi/mca/io/romio/romio/adio/common/ad_open.c b/ompi/mca/io/romio/romio/adio/common/ad_open.c index 1b82d49ed7..58aa6eeb9f 100644 --- a/ompi/mca/io/romio/romio/adio/common/ad_open.c +++ b/ompi/mca/io/romio/romio/adio/common/ad_open.c @@ -12,27 +12,26 @@ #include "mpio.h" static int is_aggregator(int rank, ADIO_File fd); +static int uses_generic_read(ADIO_File fd); +static int uses_generic_write(ADIO_File fd); MPI_File ADIO_Open(MPI_Comm orig_comm, MPI_Comm comm, char *filename, int file_system, ADIOI_Fns *ops, int access_mode, ADIO_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, - int iomode /* ignored */, MPI_Info info, int perm, int *error_code) { MPI_File mpi_fh; ADIO_File fd; ADIO_cb_name_array array; - int orig_amode_excl, orig_amode_wronly, err, rank, procs, agg_rank; + int orig_amode_excl, orig_amode_wronly, err, rank, procs; char *value; static char myname[] = "ADIO_OPEN"; int rank_ct, max_error_code; int *tmp_ranklist; MPI_Comm aggregator_comm = MPI_COMM_NULL; /* just for deferred opens */ - ADIOI_UNREFERENCED_ARG(iomode); - *error_code = MPI_SUCCESS; /* obtain MPI_File handle */ @@ -47,10 +46,9 @@ MPI_File ADIO_Open(MPI_Comm orig_comm, fd->comm = comm; /* dup'ed in MPI_File_open */ fd->filename = ADIOI_Strdup(filename); fd->file_system = file_system; + fd->fs_ptr = NULL; - /* TODO: VERIFY THAT WE DON'T NEED TO ALLOCATE THESE, THEN DON'T. */ - fd->fns = (ADIOI_Fns *) ADIOI_Malloc(sizeof(ADIOI_Fns)); - *fd->fns = *ops; + fd->fns = ops; fd->disp = disp; fd->split_coll_count = 0; @@ -64,6 +62,8 @@ MPI_File ADIO_Open(MPI_Comm orig_comm, fd->async_count = 0; + fd->fortran_handle = -1; + fd->err_handler = ADIOI_DFLT_ERR_HANDLER; /* create and initialize info object */ @@ -77,6 +77,22 @@ MPI_File ADIO_Open(MPI_Comm orig_comm, fd->info = MPI_INFO_NULL; ADIO_SetInfo(fd, info, &err); + /* deferred open: + * we can only do this optimization if 'fd->hints->deferred_open' is set + * (which means the user hinted 'no_indep_rw' and collective buffering). + * Furthermore, we only do this if our collective read/write routines use + * our generic function, and not an fs-specific routine (we can defer opens + * only if we use our aggreagation code). */ + if (fd->hints->deferred_open && + !(uses_generic_read(fd) \ + && uses_generic_write(fd))) { + fd->hints->deferred_open = 0; + } + if (fd->file_system == ADIO_PVFS2) + /* disable deferred open on PVFS2 so that scalable broadcast will + * always use the propper communicator */ + fd->hints->deferred_open = 0; + /* gather the processor name array if we don't already have it */ /* this has to be done here so that we can cache the name array in both @@ -111,9 +127,7 @@ MPI_File ADIO_Open(MPI_Comm orig_comm, MPI_Info_set(fd->info, "cb_nodes", value); ADIOI_Free(value); } -/* bcast the rank map (could do an allgather above and avoid - * this...would that really be any better?) - */ + ADIOI_cb_bcast_rank_map(fd); if (fd->hints->cb_nodes <= 0) { *error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, @@ -123,22 +137,14 @@ MPI_File ADIO_Open(MPI_Comm orig_comm, goto fn_exit; } - /* deferred open: - * we can only do this if 'fd->hints->deferred_open' is set (which means - * the user hinted 'no_indep_rw' and collective buffering). Furthermore, - * we only do this if our collective read/write routines use our generic - * function, and not an fs-specific routine (we can defer opens only if we - * use our aggreagation code). - * - * if we are an aggregator, create a new communicator. we'll use this - * aggregator communicator for opens and closes. otherwise, we have a NULL - * communicator until we try to do independent IO */ + + /* deferred open: if we are an aggregator, create a new communicator. + * we'll use this aggregator communicator for opens and closes. + * otherwise, we have a NULL communicator until we try to do independent + * IO */ fd->agg_comm = MPI_COMM_NULL; fd->is_open = 0; - fd->io_worker = 0; - if (fd->hints->deferred_open && - ADIOI_Uses_generic_read(fd) && - ADIOI_Uses_generic_write(fd) ) { + if (fd->hints->deferred_open) { /* MPI_Comm_split will create a communication group of aggregators. * for non-aggregators it will return MPI_COMM_NULL . we rely on * fd->agg_comm == MPI_COMM_NULL for non-aggregators in several @@ -146,54 +152,58 @@ MPI_File ADIO_Open(MPI_Comm orig_comm, if (is_aggregator(rank, fd)) { MPI_Comm_split(fd->comm, 1, 0, &aggregator_comm); fd->agg_comm = aggregator_comm; - MPI_Comm_rank(fd->agg_comm, &agg_rank); - if (agg_rank == 0) { - fd->io_worker = 1; - } } else { MPI_Comm_split(fd->comm, MPI_UNDEFINED, 0, &aggregator_comm); fd->agg_comm = aggregator_comm; } - - } else { - if (rank == 0) { - fd->io_worker = 1; - } } orig_amode_excl = access_mode; - /* we used to do this EXCL|CREAT workaround in MPI_File_open, but if we are - * doing deferred open, we more easily know who the aggregators are in - * ADIO_Open */ - if ((access_mode & MPI_MODE_CREATE) && (access_mode & MPI_MODE_EXCL)) { - /* the open should fail if the file exists. Only *1* process should - check this. Otherwise, if all processes try to check and the file - does not exist, one process will create the file and others who - reach later will return error. */ - if(fd->io_worker) { - fd->access_mode = access_mode; - (*(fd->fns->ADIOI_xxx_Open))(fd, error_code); - MPI_Bcast(error_code, 1, MPI_INT, 0, fd->comm); - /* if no error, close the file and reopen normally below */ - if (*error_code == MPI_SUCCESS) - (*(fd->fns->ADIOI_xxx_Close))(fd, error_code); + /* optimization: by having just one process create a file, close it, then + * have all N processes open it, we can possibly avoid contention for write + * locks on a directory for some file systems. + * + * we used to special-case EXCL|CREATE, since when N processes are trying + * to create a file exclusively, only 1 will succeed and the rest will + * (spuriously) fail. Since we are now carrying out the CREATE on one + * process anyway, the EXCL case falls out and we don't need to explicitly + * worry about it, other than turning off both the EXCL and CREATE flags + */ + /* pvfs2 handles opens specially, so it is actually more efficent for that + * file system if we skip this optimization */ + if (access_mode & ADIO_CREATE && fd->file_system != ADIO_PVFS2) { + if(rank == fd->hints->ranklist[0]) { + /* remove delete_on_close flag if set */ + if (access_mode & ADIO_DELETE_ON_CLOSE) + fd->access_mode = access_mode ^ ADIO_DELETE_ON_CLOSE; + else + fd->access_mode = access_mode; + + (*(fd->fns->ADIOI_xxx_Open))(fd, error_code); + MPI_Bcast(error_code, 1, MPI_INT, \ + fd->hints->ranklist[0], fd->comm); + /* if no error, close the file and reopen normally below */ + if (*error_code == MPI_SUCCESS) + (*(fd->fns->ADIOI_xxx_Close))(fd, error_code); + + fd->access_mode = access_mode; /* back to original */ } - else MPI_Bcast(error_code, 1, MPI_INT, 0, fd->comm); + else MPI_Bcast(error_code, 1, MPI_INT, fd->hints->ranklist[0], fd->comm); if (*error_code != MPI_SUCCESS) { goto fn_exit; } else { - /* turn off EXCL for real open */ - access_mode = access_mode ^ MPI_MODE_EXCL; + /* turn off CREAT (and EXCL if set) for real multi-processor open */ + access_mode ^= ADIO_CREATE; + if (access_mode & ADIO_EXCL) + access_mode ^= ADIO_EXCL; } } /* if we are doing deferred open, non-aggregators should return now */ - if (fd->hints->deferred_open && - ADIOI_Uses_generic_read(fd) && - ADIOI_Uses_generic_write(fd) ) { + if (fd->hints->deferred_open ) { if (fd->agg_comm == MPI_COMM_NULL) { /* we might have turned off EXCL for the aggregators. * restore access_mode that non-aggregators get the right @@ -240,9 +250,7 @@ MPI_File ADIO_Open(MPI_Comm orig_comm, /* in the deferred open case, only those who have actually opened the file should close it */ - if (fd->hints->deferred_open && - ADIOI_Uses_generic_read(fd) && - ADIOI_Uses_generic_write(fd) ) { + if (fd->hints->deferred_open) { if (fd->agg_comm != MPI_COMM_NULL) { (*(fd->fns->ADIOI_xxx_Close))(fd, error_code); } @@ -251,9 +259,10 @@ MPI_File ADIO_Open(MPI_Comm orig_comm, (*(fd->fns->ADIOI_xxx_Close))(fd, error_code); } } - - if (fd->fns) ADIOI_Free(fd->fns); if (fd->filename) ADIOI_Free(fd->filename); + if (fd->hints->ranklist) ADIOI_Free(fd->hints->ranklist); + if (fd->hints->cb_config_list) ADIOI_Free(fd->hints->cb_config_list); + if (fd->hints) ADIOI_Free(fd->hints); if (fd->info != MPI_INFO_NULL) MPI_Info_free(&(fd->info)); ADIOI_Free(fd); fd = ADIO_FILE_NULL; @@ -286,3 +295,28 @@ int is_aggregator(int rank, ADIO_File fd ) { } return 0; } + +/* + * we special-case TESTFS because all it does is wrap logging info around GEN + */ +static int uses_generic_read(ADIO_File fd) +{ + ADIOI_Fns *fns = fd->fns; + if (fns->ADIOI_xxx_ReadStridedColl == ADIOI_GEN_ReadStridedColl || + fd->file_system == ADIO_TESTFS ) + { + return 1; + } + return 0; +} + +static int uses_generic_write(ADIO_File fd) +{ + ADIOI_Fns *fns = fd->fns; + if (fns->ADIOI_xxx_WriteStridedColl == ADIOI_GEN_WriteStridedColl || + fd->file_system == ADIO_TESTFS ) + { + return 1; + } + return 0; +} diff --git a/ompi/mca/io/romio/romio/adio/common/ad_read_str_naive.c b/ompi/mca/io/romio/romio/adio/common/ad_read_str_naive.c index 3b680e92cf..26d00e3e13 100644 --- a/ompi/mca/io/romio/romio/adio/common/ad_read_str_naive.c +++ b/ompi/mca/io/romio/romio/adio/common/ad_read_str_naive.c @@ -63,7 +63,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, /* if atomicity is true, lock (exclusive) the region to be accessed */ if ((fd->atomicity) && (fd->file_system != ADIO_PIOFS) && - (fd->file_system != ADIO_PVFS)) + (fd->file_system != ADIO_PVFS) && (fd->file_system != ADIO_PVFS2)) { ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); } @@ -94,7 +94,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, } if ((fd->atomicity) && (fd->file_system != ADIO_PIOFS) && - (fd->file_system != ADIO_PVFS)) + (fd->file_system != ADIO_PVFS) && (fd->file_system != ADIO_PVFS2)) { ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); } @@ -214,7 +214,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, /* if atomicity is true, lock (exclusive) the region to be accessed */ if ((fd->atomicity) && (fd->file_system != ADIO_PIOFS) && - (fd->file_system != ADIO_PVFS)) + (fd->file_system != ADIO_PVFS) && (fd->file_system != ADIO_PVFS2)) { ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); } @@ -352,7 +352,7 @@ void ADIOI_GEN_ReadStrided_naive(ADIO_File fd, void *buf, int count, /* unlock the file region if we locked it */ if ((fd->atomicity) && (fd->file_system != ADIO_PIOFS) && - (fd->file_system != ADIO_PVFS)) + (fd->file_system != ADIO_PVFS) && (fd->file_system != ADIO_PVFS2)) { ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); } diff --git a/ompi/mca/io/romio/romio/adio/common/ad_resize.c b/ompi/mca/io/romio/romio/adio/common/ad_resize.c index 8b63842ddc..18e1d1ff17 100644 --- a/ompi/mca/io/romio/romio/adio/common/ad_resize.c +++ b/ompi/mca/io/romio/romio/adio/common/ad_resize.c @@ -13,10 +13,18 @@ void ADIOI_GEN_Resize(ADIO_File fd, ADIO_Offset size, int *error_code) { - int err; + int err, rank; static char myname[] = "ADIOI_GEN_RESIZE"; - err = ftruncate(fd->fd_sys, size); + MPI_Comm_rank(fd->comm, &rank); + + /* first aggregator performs ftruncate() */ + if (rank == fd->hints->ranklist[0]) { + err = ftruncate(fd->fd_sys, size); + } + + /* bcast return value */ + MPI_Bcast(&err, 1, MPI_INT, fd->hints->ranklist[0], fd->comm); /* --BEGIN ERROR HANDLING-- */ if (err == -1) { diff --git a/ompi/mca/io/romio/romio/adio/common/ad_set_sh_fp.c b/ompi/mca/io/romio/romio/adio/common/ad_set_sh_fp.c index 7de018a3be..c837dcb6e0 100644 --- a/ompi/mca/io/romio/romio/adio/common/ad_set_sh_fp.c +++ b/ompi/mca/io/romio/romio/adio/common/ad_set_sh_fp.c @@ -30,7 +30,7 @@ void ADIO_Set_shared_fp(ADIO_File fd, ADIO_Offset offset, int *error_code) fd->file_system, fd->fns, ADIO_CREATE | ADIO_RDWR | ADIO_DELETE_ON_CLOSE, - 0, MPI_BYTE, MPI_BYTE, 0, + 0, MPI_BYTE, MPI_BYTE, MPI_INFO_NULL, ADIO_PERM_NULL, error_code); } diff --git a/ompi/mca/io/romio/romio/adio/common/ad_write_coll.c b/ompi/mca/io/romio/romio/adio/common/ad_write_coll.c index 0817c6f361..dc00f9e684 100644 --- a/ompi/mca/io/romio/romio/adio/common/ad_write_coll.c +++ b/ompi/mca/io/romio/romio/adio/common/ad_write_coll.c @@ -83,6 +83,7 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, void *buf, int count, unsigned long long max_pe_request = 0; unsigned long long min_rd_request = ULONG_MAX; unsigned long long max_rd_request = 0; + int old_error; MPI_Info_get(fd->info, "ompi_enable_parallel_optimizations", MPI_MAX_INFO_VAL, value, &info_flag); @@ -274,6 +275,34 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, void *buf, int count, len_list, contig_access_count, min_st_offset, fd_size, fd_start, fd_end, buf_idx, error_code); + /* If this collective write is followed by an independent write, + * it's possible to have those subsequent writes on other processes + * race ahead and sneak in before the read-modify-write completes. + * We carry out a collective communication at the end here so no one + * can start independent i/o before collective I/O completes. + * + * optimization: if only one process performing i/o, we can perform + * a less-expensive Bcast + * + * need to do some gymnastics with the error codes so that if something + * went wrong, all processes report error, but if a process has a more + * specific error code, we can still have that process report the + * additional information */ + + old_error = *error_code; + if (*error_code != MPI_SUCCESS) *error_code = MPI_ERR_IO; + + if (fd->hints->cb_nodes == 1) + MPI_Bcast(error_code, 1, MPI_INT, + fd->hints->ranklist[0], fd->comm); + else + MPI_Allreduce(MPI_IN_PLACE, error_code, 1, MPI_INT, + MPI_MAX, fd->comm); + + if ( (old_error != MPI_SUCCESS) && (old_error != MPI_ERR_IO) ) + *error_code = old_error; + + if (!buftype_is_contig) ADIOI_Delete_flattened(datatype); /* free all memory allocated for collective I/O */ @@ -334,6 +363,7 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype array to a file, where each local array is 8Mbytes, requiring at least another 8Mbytes of temp space is unacceptable. */ + /* TODO: 'hole' not used outside of ADIOI_W_Exchange_data */ int hole, i, j, m, size=0, ntimes, max_ntimes, buftype_is_contig; ADIO_Offset st_loc=-1, end_loc=-1, off, done, req_off; char *write_buf=NULL; diff --git a/ompi/mca/io/romio/romio/adio/common/ad_write_str_naive.c b/ompi/mca/io/romio/romio/adio/common/ad_write_str_naive.c index e9f88985b9..c8247fb888 100644 --- a/ompi/mca/io/romio/romio/adio/common/ad_write_str_naive.c +++ b/ompi/mca/io/romio/romio/adio/common/ad_write_str_naive.c @@ -64,7 +64,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, void *buf, int count, /* if atomicity is true, lock (exclusive) the region to be accessed */ if ((fd->atomicity) && (fd->file_system != ADIO_PIOFS) && - (fd->file_system != ADIO_PVFS)) + (fd->file_system != ADIO_PVFS) && (fd->file_system != ADIO_PVFS2)) { ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); } @@ -95,7 +95,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, void *buf, int count, } if ((fd->atomicity) && (fd->file_system != ADIO_PIOFS) && - (fd->file_system != ADIO_PVFS)) + (fd->file_system != ADIO_PVFS) && (fd->file_system != ADIO_PVFS2)) { ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); } @@ -215,7 +215,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, void *buf, int count, /* if atomicity is true, lock (exclusive) the region to be accessed */ if ((fd->atomicity) && (fd->file_system != ADIO_PIOFS) && - (fd->file_system != ADIO_PVFS)) + (fd->file_system != ADIO_PVFS) && (fd->file_system != ADIO_PVFS2)) { ADIOI_WRITE_LOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); } @@ -353,7 +353,7 @@ void ADIOI_GEN_WriteStrided_naive(ADIO_File fd, void *buf, int count, /* unlock the file region if we locked it */ if ((fd->atomicity) && (fd->file_system != ADIO_PIOFS) && - (fd->file_system != ADIO_PVFS)) + (fd->file_system != ADIO_PVFS) && (fd->file_system != ADIO_PVFS2)) { ADIOI_UNLOCK(fd, start_off, SEEK_SET, end_offset-start_off+1); } diff --git a/ompi/mca/io/romio/romio/adio/common/cb_config_list.c b/ompi/mca/io/romio/romio/adio/common/cb_config_list.c index 0204752db8..908d6d184a 100644 --- a/ompi/mca/io/romio/romio/adio/common/cb_config_list.c +++ b/ompi/mca/io/romio/romio/adio/common/cb_config_list.c @@ -109,6 +109,7 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm, int *procname_len = NULL, my_procname_len, *disp = NULL, i; int commsize, commrank, found; ADIO_cb_name_array array = NULL; + int alloc_size; if (cb_config_list_keyval == MPI_KEYVAL_INVALID) { MPI_Keyval_create((MPI_Copy_function *) ADIOI_cb_copy_name_array, @@ -166,25 +167,27 @@ int ADIOI_cb_gather_name_array(MPI_Comm comm, } #endif + alloc_size = 0; for (i=0; i < commsize; i++) { /* add one to the lengths because we need to count the * terminator, and we are going to use this list of lengths * again in the gatherv. */ - procname_len[i]++; - procname[i] = ADIOI_Malloc(procname_len[i]); - if (procname[i] == NULL) { - return -1; - } + alloc_size += ++procname_len[i]; + } + + procname[0] = ADIOI_Malloc(alloc_size); + if (procname[0] == NULL) { + return -1; + } + + for (i=1; i < commsize; i++) { + procname[i] = procname[i-1] + procname_len[i-1]; } /* create our list of displacements for the gatherv. we're going * to do everything relative to the start of the region allocated * for procname[0] - * - * I suppose it is theoretically possible that the distance between - * malloc'd regions could be more than will fit in an int. We don't - * cover that case. */ disp = ADIOI_Malloc(commsize * sizeof(int)); disp[0] = 0; @@ -398,10 +401,13 @@ int ADIOI_cb_delete_name_array(MPI_Comm comm, array->refct--; if (array->refct <= 0) { - /* time to free the structures (names, array of ptrs to names, struct) + /* time to free the structures (names, array of ptrs to names, struct) */ - for (i=0; i < array->namect; i++) { - ADIOI_Free(array->names[i]); + if (array->namect) { + /* Note that array->names[i], where i > 0, + * are just pointers into the allocated region array->names[0] + */ + ADIOI_Free(array->names[0]); } if (array->names != NULL) ADIOI_Free(array->names); ADIOI_Free(array); diff --git a/ompi/mca/io/romio/romio/adio/common/flatten.c b/ompi/mca/io/romio/romio/adio/common/flatten.c index 3cfa5d65bb..e147b6e6ca 100644 --- a/ompi/mca/io/romio/romio/adio/common/flatten.c +++ b/ompi/mca/io/romio/romio/adio/common/flatten.c @@ -1,6 +1,7 @@ -/* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* - * $Id: flatten.c,v 1.22 2005/08/12 18:56:56 thakur Exp $ +/* -*- Mode: C; c-basic-offset:4 ; -*- + * vim: ts=8 sts=4 sw=4 noexpandtab + * + * $Id: flatten.c,v 1.24 2006/07/05 20:40:13 robl Exp $ * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. @@ -217,7 +218,8 @@ void ADIOI_Flatten(MPI_Datatype datatype, ADIOI_Flatlist_node *flat, MPI_Type_size(types[0], &old_size); flat->blocklens[j] = ints[1] * old_size; for (i=j+1; iindices[i] = flat->indices[i-1] + ints[2]*old_size; + flat->indices[i] = flat->indices[i-1] + + (unsigned) ints[2] * (unsigned) old_size; flat->blocklens[i] = flat->blocklens[j]; } *curr_index = i; @@ -731,14 +733,17 @@ int ADIOI_Count_contiguous_blocks(MPI_Datatype datatype, int *curr_index) * together, resulting in a shorter blocklist (and thus fewer * contiguous operations). * - * Q: IS IT SAFE TO REMOVE THE 0-LENGTH BLOCKS TOO? + * NOTE: a further optimization would be to remove zero length blocks. However, + * we do not do this as parts of the code use the presence of zero length + * blocks to indicate UB and LB. + * */ void ADIOI_Optimize_flattened(ADIOI_Flatlist_node *flat_type) { int i, j, opt_blocks; int *opt_blocklens; ADIO_Offset *opt_indices; - + opt_blocks = 1; /* save number of noncontiguous blocks in opt_blocks */ diff --git a/ompi/mca/io/romio/romio/adio/common/gencheck.c b/ompi/mca/io/romio/romio/adio/common/gencheck.c deleted file mode 100644 index a6013f0347..0000000000 --- a/ompi/mca/io/romio/romio/adio/common/gencheck.c +++ /dev/null @@ -1,31 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* - * - * Copyright (C) 2002 University of Chicago. - * See COPYRIGHT notice in top-level directory. - */ - -#include "adio.h" - -/* we special-case TESTFS because all it does is wrap logging info around GEN */ -int ADIOI_Uses_generic_read(ADIO_File fd) -{ - ADIOI_Fns *fns = fd->fns; - if (fns->ADIOI_xxx_ReadStridedColl == ADIOI_GEN_ReadStridedColl || - fd->file_system == ADIO_TESTFS ) - { - return 1; - } - return 0; -} - -int ADIOI_Uses_generic_write(ADIO_File fd) -{ - ADIOI_Fns *fns = fd->fns; - if (fns->ADIOI_xxx_WriteStridedColl == ADIOI_GEN_WriteStridedColl || - fd->file_system == ADIO_TESTFS ) - { - return 1; - } - return 0; -} diff --git a/ompi/mca/io/romio/romio/adio/common/req_malloc.c b/ompi/mca/io/romio/romio/adio/common/req_malloc.c index 225aca44e2..5e7fb6c0ba 100644 --- a/ompi/mca/io/romio/romio/adio/common/req_malloc.c +++ b/ompi/mca/io/romio/romio/adio/common/req_malloc.c @@ -23,7 +23,12 @@ struct ADIOI_RequestD *ADIOI_Malloc_request(void) if (!ADIOI_Req_avail_head) { ADIOI_Req_avail_head = (ADIOI_Req_node *) - ADIOI_Malloc(NUM*sizeof(ADIOI_Req_node)); + ADIOI_Malloc(NUM*sizeof(ADIOI_Req_node)); + if (ADIOI_Req_avail_head == NULL) + { + /* FIXME: Insert error here */ + return NULL; + } curr = ADIOI_Req_avail_head; for (i=1; inext = ADIOI_Req_avail_head+i; diff --git a/ompi/mca/io/romio/romio/adio/include/.cvsignore b/ompi/mca/io/romio/romio/adio/include/.cvsignore new file mode 100644 index 0000000000..b78c533683 --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/include/.cvsignore @@ -0,0 +1,7 @@ +romioconf.h +romioconf.h.in +.deps +.libs +.libstamp* +*.lo +*-cache diff --git a/ompi/mca/io/romio/romio/adio/include/.state-cache b/ompi/mca/io/romio/romio/adio/include/.state-cache new file mode 100644 index 0000000000..6e051c415b --- /dev/null +++ b/ompi/mca/io/romio/romio/adio/include/.state-cache @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/adio/include/adio.h b/ompi/mca/io/romio/romio/adio/include/adio.h index 32b0dc78ce..86a1f1d939 100644 --- a/ompi/mca/io/romio/romio/adio/include/adio.h +++ b/ompi/mca/io/romio/romio/adio/include/adio.h @@ -227,7 +227,6 @@ typedef struct ADIOI_FileD { ADIOI_Fns *fns; /* struct of I/O functions to use */ MPI_Comm comm; /* communicator indicating who called open */ MPI_Comm agg_comm; /* deferred open: aggregators who called open */ - int io_worker; /* bool: if one proc should do io, is it me? */ int is_open; /* deferred open: 0: not open yet 1: is open */ char *filename; int file_system; /* type of file system */ @@ -251,6 +250,7 @@ typedef struct ADIOI_FileD { int async_count; /* count of outstanding nonblocking operations */ int perm; int atomicity; /* true=atomic, false=nonatomic */ + int fortran_handle; /* handle for Fortran interface if needed */ MPI_Errhandler err_handler; void *fs_ptr; /* file-system specific information */ } ADIOI_FileD; @@ -342,7 +342,7 @@ void ADIO_End(int *error_code); MPI_File ADIO_Open(MPI_Comm orig_comm, MPI_Comm comm, char *filename, int file_system, ADIOI_Fns *ops, int access_mode, ADIO_Offset disp, MPI_Datatype etype, - MPI_Datatype filetype, int iomode, + MPI_Datatype filetype, MPI_Info info, int perm, int *error_code); void ADIO_ImmediateOpen(ADIO_File fd, int *error_code); void ADIO_Close(ADIO_File fd, int *error_code); diff --git a/ompi/mca/io/romio/romio/adio/include/adioi_error.h b/ompi/mca/io/romio/romio/adio/include/adioi_error.h index faaee6afb9..448acf340d 100644 --- a/ompi/mca/io/romio/romio/adio/include/adioi_error.h +++ b/ompi/mca/io/romio/romio/adio/include/adioi_error.h @@ -1,5 +1,5 @@ /* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* $Id: adioi_error.h,v 1.11 2005/02/18 00:39:02 robl Exp $ +/* $Id: adioi_error.h,v 1.12 2006/01/05 23:53:58 robl Exp $ * * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. @@ -45,7 +45,7 @@ if (datatype == MPI_DATATYPE_NULL) { \ } #define MPIO_CHECK_READABLE(fh, myname, error_code) \ -if (fh->access_mode & MPI_MODE_WRONLY) { \ +if (fh->access_mode & ADIO_WRONLY) { \ error_code = MPIO_Err_create_code(MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, \ myname, __LINE__, \ @@ -56,7 +56,7 @@ if (fh->access_mode & MPI_MODE_WRONLY) { \ } #define MPIO_CHECK_WRITABLE(fh, myname, error_code) \ -if (fh->access_mode & MPI_MODE_RDONLY) { \ +if (fh->access_mode & ADIO_RDONLY) { \ error_code = MPIO_Err_create_code(MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, \ myname, __LINE__, \ @@ -68,7 +68,7 @@ if (fh->access_mode & MPI_MODE_RDONLY) { \ } #define MPIO_CHECK_NOT_SEQUENTIAL_MODE(fh, myname, error_code) \ -if (fh->access_mode & MPI_MODE_SEQUENTIAL) { \ +if (fh->access_mode & ADIO_SEQUENTIAL) { \ error_code = MPIO_Err_create_code(MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, \ myname, __LINE__, \ diff --git a/ompi/mca/io/romio/romio/configure.in b/ompi/mca/io/romio/romio/configure.in index 99a19abddc..00aad57833 100644 --- a/ompi/mca/io/romio/romio/configure.in +++ b/ompi/mca/io/romio/romio/configure.in @@ -762,13 +762,13 @@ AC_CHECK_HEADERS(unistd.h fcntl.h malloc.h stddef.h) CROSS_SIZEOF_INT=${CROSS_SIZEOF_INT:-0} CROSS_SIZEOF_VOID_P=${CROSS_SIZEOF_VOID_P:-0} AC_CHECK_SIZEOF(int,$CROSS_SIZEOF_INT) -AC_CHECK_SIZEOF(void*,$CROSS_SIZEOF_VOID_P) +AC_CHECK_SIZEOF(void *,$CROSS_SIZEOF_VOID_P) AC_CACHE_CHECK([for int large enough for pointers], pac_cv_int_hold_pointer,[ if test "$ac_cv_sizeof_int" = "0" -o \ - "$ac_cv_sizeof_voidp" = "0" ; then + "$ac_cv_sizeof_void_p" = "0" ; then pac_cv_int_hold_pointer=unknown -elif test "$ac_cv_sizeof_int" -lt "$ac_cv_sizeof_voidp" ; then +elif test "$ac_cv_sizeof_int" -lt "$ac_cv_sizeof_void_p" ; then pac_cv_int_hold_pointer=no else pac_cv_int_hold_pointer=yes @@ -841,6 +841,47 @@ else PAC_MPI_OFFSET_KIND_4BYTE fi fi +# +# Test that we can use the FORTRAN_MPI_OFFSET type. If the environment +# is a strict Fortran 90/95 or later compiler, the "integer*8" format +# may not work. +if test "$NOF77" = 0 ; then + rm -f conftest* + ac_cv_f77_offset_type_works=no + AC_MSG_CHECKING([that we can use $FORTRAN_MPI_OFFSET to declare MPI_DISPLACMENT_CURRENT]) + cat >conftest.f <>config.log 2>&1 && test -x conftest ; then + ac_cv_f77_offset_type_works=yes + fi + rm -f conftest* + AC_MSG_RESULT($ac_cv_f77_offset_type_works) + + if test "$ac_cv_f77_offset_type_works" != "yes" ; then + AC_MSG_CHECKING([whether we can use KIND with the selected F77 compiler $F77]) + ac_cv_f77_allows_offset_kind=no + rm -f conftest* + cat >conftest.f <>config.log 2>&1 && test -x conftest ; then + ac_cv_f77_allows_offset_kind=yes + fi + rm -f conftest* + AC_MSG_RESULT($ac_cv_f77_allows_offset_kind) + if test "$ac_cv_f77_allows_offset_kind" ; then + FORTRAN_MPI_OFFSET="integer (kind=$MPI_OFFSET_KIND)" + else + AC_MSG_WARN([Could not find a way to declare an integer type corresponding to MPI_Offset in Fortran.]) + fi + fi +fi + # # check if MPI_Info functions are defined in the MPI implementation if test $WITHIN_KNOWN_MPI_IMPL = no ; then @@ -927,6 +968,36 @@ EOF ac_link2='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest1.c conftest2.c $LIBS >conftest.out 2>&1' if eval $ac_link2 ; then AC_MSG_RESULT(yes) + AC_MSG_CHECKING([that the compiler correctly implements weak symbols]) + # The gcc 3.4.x compiler accepts the pragma weak, but does not + # correctly implement it on systems where the loader doesn't + # support weak symbols (e.g., cygwin). This is a bug in gcc, but it + # it is one that *we* have to detect. + rm -f conftest* + cat >>conftest1.c <>conftest2.c <> config.log + echo "Failed program was" >> config.log + cat conftest1.c >>config.log + cat conftest2.c >>config.log + if test -s conftest.out ; then cat conftest.out >> config.log ; fi + has_pragma_weak=0 + fi else echo "$ac_link2" 1>&AC_FD_CC echo "Failed program was" 1>&AC_FD_CC @@ -1056,8 +1127,8 @@ if test -n "$file_system_xfs"; then AC_CACHE_CHECK([for memory alignment needed for direct I/O], pac_cv_memalignval, [ - /bin/rm -f confmemalignval - /bin/rm -f /tmp/romio_tmp.bin + rm -f confmemalignval + rm -f /tmp/romio_tmp.bin AC_TRY_RUN([ #include #include @@ -1077,8 +1148,8 @@ if test -n "$file_system_xfs"; then pac_cv_memalignval=`cat confmemalignval`, pac_cv_memalignval="unknown",pac_cv_memalignval="unknown" ) - /bin/rm -f confmemalignval - /bin/rm -f /tmp/romio_tmp.bin + rm -f confmemalignval + rm -f /tmp/romio_tmp.bin ]) if test -n "$pac_cv_memalignval" -a "$pac_cv_memalignval" != 0 -a \ "$pac_cv_memalignval" != "unknown" ; then @@ -1155,19 +1226,65 @@ fi save_libs=$LIBS LIBS= # -# Some systems need pthreads to get AIO to work +# Some systems need pthreads to get AIO to work. However, we don't want +# to add pthreads just because it is there, as that can cause problems +# with some implementations of pthreads and compilers (e.g., gcc version 3 +# would fail if there was an int a[100000] on the stack if the application +# was *linked* with pthreads, but would succeed if the application was +# *not linked* with pthreads. # if test "x$disable_aio" = "xno" ; then - AC_SEARCH_LIBS(pthread_create,pthread, - ROMIO_LIBLIST="$ROMIO_LIBLIST $LIBS" - MPI_LIB="$MPI_LIB $LIBS" - ) + foundPTHREAD=no + + # Do we have aio_write in aio or rt? + saveLIBS=$LIBS LIBS= - AC_SEARCH_LIBS(aio_write,aio rt, - ROMIO_LIBLIST="$ROMIO_LIBLIST $LIBS" - MPI_LIB="$MPI_LIB $LIBS" - aio_write_found=yes - ) + AC_SEARCH_LIBS(aio_write,aio rt,foundAIO=yes,foundAIO=no) + if test "$foundAIO" = yes ; then + AIOLIBS=$LIBS + LIBS="$saveLIBS $LIBS" + else + LIBS="$saveLIBS" + fi + + # If not, try finding pthread_create first, and if found, try the + # test again. + if test "$foundAIO" = no ; then + saveLIBS=$LIBS + LIBS= + AC_SEARCH_LIBS(pthread_create,pthread,foundPTHREAD=yes, + foundPTHREAD=no) + if test "$foundPTHREAD" = yes ; then + AC_SEARCH_LIBS(aio_write,aio rt,foundAIO=yes,foundAIO=no) + + if test "$foundAIO" = yes ; then + AIO_LIBS=$LIBS + LIBS="$saveLIBS $LIBS" + else + LIBS=$saveLIBS + fi + else + LIBS=$saveLIBS + fi + fi + + + if test "$foundAIO" = yes ; then + ROMIO_LIBLIST="$ROMIO_LIBLIST $AIOLIBS" + MPI_LIB="$MPI_LIB $AIOLIBS" + aio_write_found=yes + fi + +dnl AC_SEARCH_LIBS(pthread_create,pthread, +dnl ROMIO_LIBLIST="$ROMIO_LIBLIST $LIBS" +dnl MPI_LIB="$MPI_LIB $LIBS" +dnl ) +dnl LIBS= +dnl AC_SEARCH_LIBS(aio_write,aio rt, +dnl ROMIO_LIBLIST="$ROMIO_LIBLIST $LIBS" +dnl MPI_LIB="$MPI_LIB $LIBS" +dnl aio_write_found=yes +dnl ) fi LIBS=$save_libs diff --git a/ompi/mca/io/romio/romio/doc/Makefile.am b/ompi/mca/io/romio/romio/doc/Makefile.am index f36afc5ddb..b6005c0c27 100644 --- a/ompi/mca/io/romio/romio/doc/Makefile.am +++ b/ompi/mca/io/romio/romio/doc/Makefile.am @@ -18,7 +18,7 @@ # Portions taken from original ROMIO Makefile* # -EXTRA_DIST = users-guide.bbl users-guide.ps.gz users-guide.tex README +EXTRA_DIST = users-guide.bbl users-guide.ps.gz users-guide.tex source-guide.tex README all: latex users-guide.tex diff --git a/ompi/mca/io/romio/romio/doc/source-guide.tex b/ompi/mca/io/romio/romio/doc/source-guide.tex new file mode 100644 index 0000000000..3e1f7f8434 --- /dev/null +++ b/ompi/mca/io/romio/romio/doc/source-guide.tex @@ -0,0 +1,494 @@ +% \documentstyle[11pt,psfig]{article} +\documentclass[11pt]{article} +\hoffset=-.7in +\voffset=-.6in +\textwidth=6.5in +\textheight=8.5in + +\begin{document} +\vspace*{-1in} +\thispagestyle{empty} +\begin{center} +ARGONNE NATIONAL LABORATORY \\ +9700 South Cass Avenue \\ +Argonne, IL 60439 +\end{center} +\vskip .5 in + +\begin{center} +\rule{1.75in}{.01in} \\ +\vspace{.1in} + +ANL/MCS-TM-XXX \\ + +\rule{1.75in}{.01in} \\ + +\vskip 1.3 in +{\Large\bf A Guide to the ROMIO MPI-IO Implementation } \\ +by \\ [2ex] +{\large\it Robert Ross, Robert Latham, and Rajeev Thakur} +\vspace{1in} + +Mathematics and Computer Science Division + +\bigskip + +Technical Memorandum No.\ XXX + + +% \vspace{1.4in} +% Revised May 2004 + +\end{center} + +\vfill + +{\small +\noindent +This work was supported by the Mathematical, Information, and +Computational Sciences Division subprogram of the Office of Advanced +Scientific Computing Research, U.S. Department of Energy, under +Contract W-31-109-Eng-38; and by the Scalable I/O Initiative, a +multiagency project funded by the Defense Advanced Research Projects +Agency (Contract DABT63-94-C-0049), the Department of Energy, the +National Aeronautics and Space Administration, and the National +Science Foundation.} + +\newpage + + +%% Line Spacing (e.g., \ls{1} for single, \ls{2} for double, even \ls{1.5}) +%% + +\newcommand{\ls}[1] + {\dimen0=\fontdimen6\the\font + \lineskip=#1\dimen0 + \advance\lineskip.5\fontdimen5\the\font + \advance\lineskip-\dimen0 + \lineskiplimit=.9\lineskip + \baselineskip=\lineskip + \advance\baselineskip\dimen0 + \normallineskip\lineskip + \normallineskiplimit\lineskiplimit + \normalbaselineskip\baselineskip + \ignorespaces + } +\renewcommand{\baselinestretch}{1} +\newcommand {\ix} {\hspace*{2em}} +\newcommand {\mc} {\multicolumn} + + +\tableofcontents +\thispagestyle{empty} +\newpage + +\pagenumbering{arabic} +\setcounter{page}{1} +\begin{center} +{\bf Users Guide for ROMIO: A High-Performance,\\[1ex] +Portable MPI-IO Implementation} \\ [2ex] +by \\ [2ex] +{\it Rajeev Thakur, Robert Ross, Ewing Lusk, and William Gropp} + +\end{center} +\addcontentsline{toc}{section}{Abstract} +\begin{abstract} +\noindent +ROMIO is a high-performance, portable implementation of MPI-IO (the +I/O chapter in \mbox{MPI-2}). +This document describes the internals of the ROMIO implementation. +\end{abstract} + +\section{Introduction} + +The ROMIO MPI-IO implementation, originally written by Rajeev Thakur, has been +in existence since XXX. + +... Discussion of the evolution of ROMIO ... + +Architecturally, ROMIO is broken up into three layers: a layer implementing +the MPI I/O routines in terms of an abstract device for I/O (ADIO), a layer of +common code implementing a subset of the ADIO interface, and a set of storage +system specific functions that complete the ADIO implementation in terms of +that storage type. These three layers work together to provide I/O support +for MPI applications. + +In this document we will discuss the details of the ROMIO implementation, +including the major components, how those components are implemented, and +where those components are located in the ROMIO source tree. + +\section{The Directory Structure} + +The ROMIO directory structure consists of two main branches, the MPI-IO branch +(mpi-io) and the ADIO branch (adio). The MPI-IO branch contains code that +implements the functions defined in the MPI-2 specification for I/O, such as +MPI\_File\_open. These functions are then written in terms of other functions +that provide an abstract interface to I/O resources, the ADIO functions. +There is an additional glue subdirectory in the MPI-IO branch that defines +functions related to the MPI implementation as a whole, such as how to +allocate MPI\_File structures and how to report errors. + +Code for the ADIO functions is located under the ADIO branch. This code is +responsible for performing I/O operations on whatever underlying storage is +available. There are two categories of directories in this branch. The first +is the common directory. This directory contains two distinct types of +source: source that is used by all ADIO implementations and source that is +common across many ADIO implementations. This distinction will become more +apparent when we discuss file system implementations. + +The second category of directory in the ADIO branch is the file system +specific directory (e.g. ad\_ufs, ad\_pvfs2). These directories provide code +that is specific to a particular file system type and is only built if that +file system type is selected at configure time. + +\section{The Configure Process} + +... What can be specified, AIO stuff, where romioconf exists, how to add +another Makefile.in into the list. + +\section{File System Implementations} + +Each file system implementation exists in its own subdirectory under the adio +directory in the source tree. Each of these subdirectories must contain at +least two files, a Makefile.in (describing how to build the code in the +directory) and a C source file describing the mapping of ADIO operations to C +functions. + +The common practice is to name this file based on the name of the ADIO +implementation. In the ad\_ufs implementation this file is called ad\_ufs.c, +and contains the following: + +\begin{verbatim} +struct ADIOI_Fns_struct ADIO_UFS_operations = { + ADIOI_UFS_Open, /* Open */ + ADIOI_GEN_ReadContig, /* ReadContig */ + ADIOI_GEN_WriteContig, /* WriteContig */ + ADIOI_GEN_ReadStridedColl, /* ReadStridedColl */ + ADIOI_GEN_WriteStridedColl, /* WriteStridedColl */ + ADIOI_GEN_SeekIndividual, /* SeekIndividual */ + ADIOI_GEN_Fcntl, /* Fcntl */ + ADIOI_GEN_SetInfo, /* SetInfo */ + ADIOI_GEN_ReadStrided, /* ReadStrided */ + ADIOI_GEN_WriteStrided, /* WriteStrided */ + ADIOI_GEN_Close, /* Close */ + ADIOI_GEN_IreadContig, /* IreadContig */ + ADIOI_GEN_IwriteContig, /* IwriteContig */ + ADIOI_GEN_IODone, /* ReadDone */ + ADIOI_GEN_IODone, /* WriteDone */ + ADIOI_GEN_IOComplete, /* ReadComplete */ + ADIOI_GEN_IOComplete, /* WriteComplete */ + ADIOI_GEN_IreadStrided, /* IreadStrided */ + ADIOI_GEN_IwriteStrided, /* IwriteStrided */ + ADIOI_GEN_Flush, /* Flush */ + ADIOI_GEN_Resize, /* Resize */ + ADIOI_GEN_Delete, /* Delete */ +}; +\end{verbatim} + +The ADIOI\_Fns\_struct structure is defined in adio/include/adioi.h. This +structure holds pointers to appropriate functions for a given file system +type. "Generic" functions, defined in adio/common, are denoted by the +"ADIOI\_GEN" prefix, while file system specific functions use a file system +related prefix. In this example, the only file system specific function is +ADIOI\_UFS\_Open. All other operations use the generic versions. + +Typically a third file, a header with file system specific defines and +includes, is also provided and named based on the name of the ADIO +implementation (e.g. ad\_ufs.h). + +Because the UFS implementation provides its own open function, that code must be provided in the ad\_ufs subdirectory. That function is implemented in adio/ad\_ufs/ad\_ufs\_open.c. + +\section{Generic Functions} + +As we saw in the discussion above, generic ADIO function implementations are +used to minimize the amount of code in the ROMIO tree by sharing common +functionality between ADIO implementations. As the ROMIO implementation has +grown, a few categories of generic implementations have developed. At this +time, these are all lumped into the adio/common subdirectory together, which +can be confusing. + +The easiest category of generic functions to understand is the ones that +implement functionality in terms of some other ADIO function. +ADIOI\_GEN\_ReadStridedColl is a good example of this type of function and is +implemented in adio/common/ad\_read\_coll.c. This function implements +collective read operations (e.g. MPI\_File\_read\_at\_all). We will discuss how +it works later in this document, but for the time being it is sufficient to +note that it is written in terms of ADIO ReadStrided or ReadContig calls. + +A second category of generic functions are ones that implement functionality +in terms of POSIX I/O calls. ADIOI\_GEN\_ReadContig (adio/common/ad\_read.c) is +a good example of this type of function. These "generic" functions are the +result of a large number of ADIO implementations that are largely POSIX I/O +based, such as the UFS, XFS, and PANFS implementations. We have discussed +moving these functions into a separate common/posix subdirectory and renaming +them with ADIOI\_POSIX prefixes, but this has not been done as of the writing +of this document. + +The next category of generic functions holds functions that do not actually +require I/O at all. ADIOI\_GEN\_SeekIndividual (adio/common/ad\_seek.c) is a +good example of this. Since we don't need to actually perform I/O at seek +time, we can just update local variables at each process. In fact, one could +argue that we no longer need the ADIO SeekIndividual function at all - all the +ADIO implementations simply use this generic version (with the exception of +TESTFS, which prints the value as well). + +The next category of generic functions are the "FAKE" functions (e.g. +ADIOI\_FAKE\_IODone implemented in adio/common/ad\_done\_fake.c). These functions +are all related to asynchronous I/O (AIO) operations. These implement the AIO +operations in terms of blocking operations - in other words, they follow the +standard but do not allow for overlap of I/O and computation or communication. +These are used in cases where AIO support is otherwise unavailable or +unimplemented. + +The final category of generic functions are the "naïve" functions (e.g. +ADIOI\_GEN\_WriteStrided\_naive in adio/common/ad\_write\_str\_naive.c). These +functions avoid the use of certain optimizations, such as data sieving. + +Other Things in adio/common + +... what else is in there? + +\subsection{Calling ADIO Functions} + +Throughout the code you will see calls to functions such as ADIO\_ReadContig. +There is no such function - this is actually a macro defined in +adio/include/adioi.h that calls the particular function out of the correct +ADIOI\_Fns\_struct for the file being accessed. This is done for convenience. + +Exceptions!!! ADIO\_Open, ADIO\_Close... + +\section{ROMIO Implementation Details} + +The ROMIO Implementation relies on some basic concepts in order to operate and +to optimize I/O access. In this section we will discuss these concepts and +how they are implemented within ROMIO. Before we do that though, we will +discuss the core data structure of ROMIO, the ADIO\_File structure. + +\subsection{ADIO\_File} + +... discussion ... + +\subsection{I/O Aggregation and Aggregators} + +When performing collective I/O operations, it is often to our advantage to +combine operations or eliminate redundant operations altogether. We call this +combining process "aggregation", and processes that perform these combined +operations aggregators. + +Aggregators are defined at the time the file is opened. A collection of MPI +hints can be used to tune what processes become aggregators for a given file +(see ROMIO User's Guide). The aggregators will then interact with the file +system during collective operations. + +Note that it is possible to implement a system where ALL I/O operations pass +exclusively through aggregators, including independent I/O operations from +non-aggregators. However, this would require a guarantee of progress from the +aggregators that for portability would mean adding a thread to manage I/O. We +have chosen not to pursue this path at this time, so independent operations +continue to be serviced by the process making the call. + +... how implemented ... + +Rank 0 in the communicator opening a file \emph{always} processes the +cb\_config\_list hint using ADIOI\_cb\_config\_list\_parse. A previous call to +ADIOI\_cb\_gather\_name\_array had collected the processor names from all hosts +into an array that is cached on the communicator (so we don't have to gather +it more than once). This creates an ordered array of ranks (relative to the +communicator used to open the file) that will be aggregators. This array is +distributed to all processes using ADIOI\_cb\_bcast\_rank\_map. Aggregators are +referenced by their rank in the communicator used to open the file. These +ranks are stored in fd->hints->ranklist[]. + +Note that this could be a big list for very large runs. If we were to +restrict aggregators to a rank order subset, we could use a bitfield instead. + +If the user specified hints and met conditions for deferred open, then a +separate communicator is also set up (fd->agg\_comm) that contains all the +aggregators, in order of their original ranks (not their order in the rank +list). Otherwise this communicator is set to MPI\_COMM\_NULL, and in any case +it is set to this for non-aggregators. This communicator is currently only +used at ADIO\_Close (adio/common/ad\_close.c), but could be useful in two-phase +I/O as well (discussed later). + + +\subsection{Deferred Open} + +We do not always want all processes to attempt to actually open a file when +MPI\_File\_open is called. We might want to avoid this open because in fact +some processes (non-aggregators) cannot access the file at all and would get +an error, or we might want to avoid this open to avoid a storm of system calls +hitting the file system all at once. In either case, ROMIO implements a +"deferred open" mode that allows some processes to avoid opening the file +until such time as they perform an independent I/O operation on the file (see +ROMIO User's Guide). + +Deferred open has a broad impact on the ROMIO implementation, because with its +addition there are now many places where we must first check to see if we have +called the file system specific ADIO Open call before performing I/O. This +impact is limited to the MPI-IO layer by semantically guaranteeing the FS ADIO +Open call has been made by the process prior to calling a read or write +function. + +... how implemented ... + +\subsection{Two-Phase I/O} + +Two-Phase I/O is a technique for increasing the efficiency of I/O operations +by reordering data between processes, either before writes, or after reads. + +ROMIO implements two-phase I/O as part of the generic implementations of +ADIO\_WriteStridedColl and ADIO\_ReadStridedColl. These implementations in turn +rely heavily on the aggregation code to determine what processes will actually +perform I/O on behalf of the application as a whole. + + + +\subsection{Data Sieving} + +Data sieving is a single-process technique for reducing the number of I/O +operations used to service a MPI read or write operation by accessing a +contiguous region of the file that contains more than one desired region at +once. Because often I/O operations require data movement across the network, +this is usually a more efficient way to access data. + +Data sieving is implemented in the common strided I/O routines +(adio/common/ad\_write\_str.c and adio/common/ad\_read\_str.c). These functions +use the contig read and write routines to perform actual I/O. In the case of +a write operation, a read/modify/write sequence is used. In that case, as +well as in the atomic mode case, locking is required on the region. Some of +the ADIO implementations do not currently support locking, and in those cases +it would be erroneous to use the generic strided I/O routines. + +\subsection{Shared File Pointers} + +Because no file systems supported by ROMIO currently support a shared file +pointer mode, ROMIO must implement shared file pointers under the covers on +its own. + +Currently ROMIO implements shared file pointers by storing the file pointer +value in a separate file... + +Note that the ROMIO team has devised a portable method for implementing shared +file pointers using only MPI-1 and MPI-2 functions. However, this method has +not yet been implemented in ROMIO. + +file name is selected at end of mpi-io/open.c. + +\subsection{Error Handling} + +\subsection{MPI and MPIO Requests} + +\section*{Appendix A: ADIO Functions and Semantics} + +ADIOI\_Open(ADIO\_File fd, int *error\_code) + +Open is used in a strange way in ROMIO, as described previously. + +The Open function is used to perform whatever operations are necessary prior +to actually accessing a file using read or write. The file name for the file +is stored in fd->filename prior to Open being called. + +Note that when deferred open is in effect, all processes may not immediately +call Open at MPI\_File\_open time, but instead call open if they perform +independent I/O. This can result in somewhat unusual error returns to +processes (e.g. learning that a file is not accessible at write time). + +ADIOI\_ReadContig(ADIO\_File fd, void *buf, int count, MPI\_Datatype datatype, +int file\_ptr\_type, ADIO\_Offset offset, ADIO\_Status *status, int *error\_code) + +ReadContig is used to read a contiguous region from a file into a contiguous +buffer. The datatype (which refers to the buffer) can be assumed to be +contiguous. The offset is in bytes and is an absolute offset if +ADIO\_EXPLICIT\_OFFSET was passed as the file\_ptr\_type or relative to the +current individual file pointer if ADIO\_INDIVIDUAL was passed as +file\_ptr\_type. Open has been called by this process prior to the call to +ReadContig. There is no guarantee that any other processes will call this +function at the same time. + +ADIOI\_WriteContig(ADIO\_File fd, void *buf, int count, MPI\_Datatype datatype, +int file\_ptr\_type, ADIO\_Offset offset, ADIO\_Status *status, int *error\_code) + +WriteContig is used to write a contiguous region to a file from a contiguous +buffer. The datatype (which refers to the buffer) can be assumed to be +contiguous. The offset is in bytes and is an absolute offset if +ADIO\_EXPLICIT\_OFFSET was passed as the file\_ptr\_type or relative to the +current individual file pointer if ADIO\_INDIVIDUAL was passed as +file\_ptr\_type. Open has been called by this process prior to the call to +WriteContig. There is no guarantee that any other processes will call this +function at the same time. + +ADIOI\_ReadStridedColl + +ADIOI\_WriteStridedColl + +ADIOI\_SeekIndividual + +ADIOI\_Fcntl + +ADIOI\_SetInfo + +ADIOI\_ReadStrided + +ADIOI\_WriteStrided + +ADIOI\_Close(ADIO\_File fd, int *error\_code) + +Close is responsible for releasing any resources associated with an open file. +It is called on all processes that called the corresponding ADIOI Open, which +might not be all the processes that opened the file (due to deferred open). +Thus it is not safe to perform collective communication among all processes in +the communicator during Close, although collective communication between +aggregators would be safe (if desired). + +For performance reasons ROMIO does not guarantee that all file data is written +to "storage" at MPI\_File\_close, instead only performing synchronization +operations at MPI\_File\_sync time. As a result, our Close implementations do +not typically call a sync. However, any locally cached data, if any, should +be passed on to the underlying storage system at this time. + +Note that ADIOI\_GEN\_Close is implemented in adio/common/adi\_close.c; +ad\_close.c implements ADIO\_Close, which is called by all processes that opened +the file. + +ADIOI\_IreadContig + +ADIOI\_IwriteContig + +ADIOI\_ReadDone + +ADIOI\_WriteDone + +ADIOI\_ReadComplete + +ADIOI\_WriteComplete + +ADIOI\_IreadStrided + +ADIOI\_IwriteStrided + +ADIOI\_Flush + +ADIOI\_Resize(ADIO\_File fd, ADIO\_Offset size, int *error\_code) + +Resize is called collectively by all processes that opened the file referenced +by fd. It is not required that the Resize implementation block until all +processes have completed resize operations, but each process should be able to +see the correct size with a corresponding MPI\_File\_get\_size operation (an +independent operation that results in an ADIO Fcntl to obtain the file size). + +ADIOI\_Delete(char *filename, int *error\_code) + +Delete is called independently, and because only a filename is passed, there +is no opportunity to coordinate deletion if an application were to choose to +have all processes call MPI\_File\_delete. That's not likely to be an issue +though. + +\section*{Appendix B: Status of ADIO Implementations} + +... who wrote what, status, etc. + +Appendix C: Adding a New ADIO Implementation + +References + +\end{document} diff --git a/ompi/mca/io/romio/romio/include/.cvsignore b/ompi/mca/io/romio/romio/include/.cvsignore new file mode 100644 index 0000000000..07e689471d --- /dev/null +++ b/ompi/mca/io/romio/romio/include/.cvsignore @@ -0,0 +1,6 @@ +mpio.h mpiof.h +.deps +.libs +.libstamp* +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/localdefs.in b/ompi/mca/io/romio/romio/localdefs.in index bba0bc3d2a..d26086d53e 100644 --- a/ompi/mca/io/romio/romio/localdefs.in +++ b/ompi/mca/io/romio/romio/localdefs.in @@ -1,3 +1,4 @@ #! /bin/sh LIBS="$LIBS @ROMIO_LIBLIST@" MPI_OFFSET_TYPE="@MPI_OFFSET_TYPE@" +FORTRAN_MPI_OFFSET="@FORTRAN_MPI_OFFSET@" diff --git a/ompi/mca/io/romio/romio/man/man3/MPIO_Request_c2f.3 b/ompi/mca/io/romio/romio/man/man3/MPIO_Request_c2f.3 new file mode 100644 index 0000000000..96ee72baa9 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPIO_Request_c2f.3 @@ -0,0 +1,17 @@ +.TH MPIO_Request_c2f 3 "11/3/1998" " " "MPI-2" +.SH NAME +MPIO_Request_c2f \- Translates a C I/O-request handle to a Fortran I/O-request handle +.SH SYNOPSIS +.nf +#include "mpi.h" +MPI_Fint MPIO_Request_c2f(MPIO_Request request) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B request +- C I/O-request handle (handle) +.PD 1 + +.SH RETURN VALUE +Fortran I/O-request handle (integer) diff --git a/ompi/mca/io/romio/romio/man/man3/MPIO_Request_f2c.3 b/ompi/mca/io/romio/romio/man/man3/MPIO_Request_f2c.3 new file mode 100644 index 0000000000..4c24c3dde9 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPIO_Request_f2c.3 @@ -0,0 +1,17 @@ +.TH MPIO_Request_f2c 3 "11/3/1998" " " "MPI-2" +.SH NAME +MPIO_Request_f2c \- Translates a Fortran I/O-request handle to a C I/O-request handle +.SH SYNOPSIS +.nf +#include "mpi.h" +MPIO_Request MPIO_Request_f2c(MPI_Fint request) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B request +- Fortran I/O-request handle (integer) +.PD 1 + +.SH RETURN VALUE +C I/O-request handle (handle) diff --git a/ompi/mca/io/romio/romio/man/man3/MPIO_Test.3 b/ompi/mca/io/romio/romio/man/man3/MPIO_Test.3 new file mode 100644 index 0000000000..1021bee7ba --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPIO_Test.3 @@ -0,0 +1,36 @@ +.TH MPIO_Test 3 "2/5/1998" " " "MPI-2" +.SH NAME +MPIO_Test \- Test the completion of a nonblocking read or write +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPIO_Test(MPIO_Request *request, int *flag, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B request +- request object (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B flag +- true if operation completed (logical) +.PD 1 +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPIO_Wait.3 b/ompi/mca/io/romio/romio/man/man3/MPIO_Wait.3 new file mode 100644 index 0000000000..c2bcb80438 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPIO_Wait.3 @@ -0,0 +1,31 @@ +.TH MPIO_Wait 3 "2/5/1998" " " "MPI-2" +.SH NAME +MPIO_Wait \- Waits for the completion of a nonblocking read or write +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPIO_Wait(MPIO_Request *request, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B request +- request object (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_c2f.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_c2f.3 new file mode 100644 index 0000000000..c10f218da1 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_c2f.3 @@ -0,0 +1,17 @@ +.TH MPI_File_c2f 3 "11/3/1998" " " "MPI-2" +.SH NAME +MPI_File_c2f \- Translates a C file handle to a Fortran file handle +.SH SYNOPSIS +.nf +#include "mpi.h" +MPI_Fint MPI_File_c2f(MPI_File fh) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- C file handle (handle) +.PD 1 + +.SH RETURN VALUE +Fortran file handle (integer) diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_close.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_close.3 new file mode 100644 index 0000000000..de9504a2d7 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_close.3 @@ -0,0 +1,24 @@ +.TH MPI_File_close 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_close \- Closes a file +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_close(MPI_File *fh) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_delete.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_delete.3 new file mode 100644 index 0000000000..e3cceec68e --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_delete.3 @@ -0,0 +1,29 @@ +.TH MPI_File_delete 3 "2/12/1998" " " "MPI-2" +.SH NAME +MPI_File_delete \- Deletes a file +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_delete(char *filename, MPI_Info info) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B filename +- name of file to delete (string) +.PD 1 +.PD 0 +.TP +.B info +- info object (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_f2c.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_f2c.3 new file mode 100644 index 0000000000..dbeb597df7 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_f2c.3 @@ -0,0 +1,17 @@ +.TH MPI_File_f2c 3 "11/3/1998" " " "MPI-2" +.SH NAME +MPI_File_f2c \- Translates a Fortran file handle to a C file handle +.SH SYNOPSIS +.nf +#include "mpi.h" +MPI_File MPI_File_f2c(MPI_Fint fh) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- Fortran file handle (integer) +.PD 1 + +.SH RETURN VALUE +C file handle (handle) diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_get_amode.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_amode.3 new file mode 100644 index 0000000000..cd888a32b0 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_amode.3 @@ -0,0 +1,31 @@ +.TH MPI_File_get_amode 3 "2/5/1998" " " "MPI-2" +.SH NAME +MPI_File_get_amode \- Returns the file access mode +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_get_amode(MPI_File fh, int *amode) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B amode +- access mode (integer) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_get_atomicity.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_atomicity.3 new file mode 100644 index 0000000000..ee2c120b91 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_atomicity.3 @@ -0,0 +1,31 @@ +.TH MPI_File_get_atomicity 3 "2/5/1998" " " "MPI-2" +.SH NAME +MPI_File_get_atomicity \- Returns the atomicity mode +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_get_atomicity(MPI_File fh, int *flag) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B flag +- true if atomic mode, false if nonatomic mode (logical) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_get_byte_offset.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_byte_offset.3 new file mode 100644 index 0000000000..f2ef28b4ca --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_byte_offset.3 @@ -0,0 +1,36 @@ +.TH MPI_File_get_byte_offset 3 "3/4/1999" " " "MPI-2" +.SH NAME +MPI_File_get_byte_offset \- Returns the absolute byte position in the file corresponding to "offset" etypes relative to the current view +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, MPI_Offset *disp) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B offset +- offset (nonnegative integer) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B disp +- absolute byte position of offset (nonnegative integer) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_get_group.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_group.3 new file mode 100644 index 0000000000..74ab1826e1 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_group.3 @@ -0,0 +1,31 @@ +.TH MPI_File_get_group 3 "2/5/1998" " " "MPI-2" +.SH NAME +MPI_File_get_group \- Returns the group of processes that opened the file +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_get_group(MPI_File fh, MPI_Group *group) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B group +- group that opened the file (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_get_info.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_info.3 new file mode 100644 index 0000000000..2bdb1931f6 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_info.3 @@ -0,0 +1,31 @@ +.TH MPI_File_get_info 3 "2/5/1998" " " "MPI-2" +.SH NAME +MPI_File_get_info \- Returns the hints for a file that are actually being used by MPI +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_get_info(MPI_File fh, MPI_Info *info_used) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B info_used +- info object (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_get_position.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_position.3 new file mode 100644 index 0000000000..41c5827b49 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_position.3 @@ -0,0 +1,31 @@ +.TH MPI_File_get_position 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_get_position \- Returns the current position of the individual file pointer in etype units relative to the current view +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_get_position(MPI_File fh, MPI_Offset *offset) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B offset +- offset of individual file pointer (nonnegative integer) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_get_position_shared.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_position_shared.3 new file mode 100644 index 0000000000..6b0ee36b22 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_position_shared.3 @@ -0,0 +1,31 @@ +.TH MPI_File_get_position_shared 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_get_position_shared \- Returns the current position of the shared file pointer in etype units relative to the current view +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_get_position_shared(MPI_File fh, MPI_Offset *offset) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B offset +- offset of shared file pointer (nonnegative integer) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_get_size.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_size.3 new file mode 100644 index 0000000000..55927e4198 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_size.3 @@ -0,0 +1,31 @@ +.TH MPI_File_get_size 3 "2/5/1998" " " "MPI-2" +.SH NAME +MPI_File_get_size \- Returns the file size +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_get_size(MPI_File fh, MPI_Offset *size) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B size +- size of the file in bytes (nonnegative integer) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_get_type_extent.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_type_extent.3 new file mode 100644 index 0000000000..74c3ac7a19 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_type_extent.3 @@ -0,0 +1,37 @@ +.TH MPI_File_get_type_extent 3 "2/5/1998" " " "MPI-2" +.SH NAME +MPI_File_get_type_extent \- Returns the extent of datatype in the file +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype, + MPI_Aint *extent) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B extent +- extent of the datatype (nonnegative integer) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_get_view.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_view.3 new file mode 100644 index 0000000000..6470b0a847 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_get_view.3 @@ -0,0 +1,47 @@ +.TH MPI_File_get_view 3 "4/6/1998" " " "MPI-2" +.SH NAME +MPI_File_get_view \- Returns the file view +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype, + MPI_Datatype *filetype, char *datarep) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B disp +- displacement (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B etype +- elementary datatype (handle) +.PD 1 +.PD 0 +.TP +.B filetype +- filetype (handle) +.PD 1 +.PD 0 +.TP +.B datarep +- data representation (string) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_iread.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_iread.3 new file mode 100644 index 0000000000..5bbc1c35ca --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_iread.3 @@ -0,0 +1,47 @@ +.TH MPI_File_iread 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_iread \- Nonblocking read using individual file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_iread(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPIO_Request *request) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B request +- request object (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_iread_at.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_iread_at.3 new file mode 100644 index 0000000000..d1ad5271d2 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_iread_at.3 @@ -0,0 +1,53 @@ +.TH MPI_File_iread_at 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_iread_at \- Nonblocking read using explict offset +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, + MPIO_Request *request) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B offset +- file offset (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B request +- request object (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_iread_shared.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_iread_shared.3 new file mode 100644 index 0000000000..e71c55df64 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_iread_shared.3 @@ -0,0 +1,47 @@ +.TH MPI_File_iread_shared 3 "9/3/1998" " " "MPI-2" +.SH NAME +MPI_File_iread_shared \- Nonblocking read using shared file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_iread_shared(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPIO_Request *request) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B request +- request object (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_iwrite.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_iwrite.3 new file mode 100644 index 0000000000..447dec5f9f --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_iwrite.3 @@ -0,0 +1,47 @@ +.TH MPI_File_iwrite 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_iwrite \- Nonblocking write using individual file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_iwrite(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPIO_Request *request) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B request +- request object (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_iwrite_at.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_iwrite_at.3 new file mode 100644 index 0000000000..4d54b60dae --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_iwrite_at.3 @@ -0,0 +1,53 @@ +.TH MPI_File_iwrite_at 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_iwrite_at \- Nonblocking write using explict offset +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, + MPIO_Request *request) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B offset +- file offset (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B request +- request object (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_iwrite_shared.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_iwrite_shared.3 new file mode 100644 index 0000000000..80ce107f3a --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_iwrite_shared.3 @@ -0,0 +1,47 @@ +.TH MPI_File_iwrite_shared 3 "9/3/1998" " " "MPI-2" +.SH NAME +MPI_File_iwrite_shared \- Nonblocking write using shared file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_iwrite_shared(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPIO_Request *request) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B request +- request object (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_open.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_open.3 new file mode 100644 index 0000000000..6bf223d1bd --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_open.3 @@ -0,0 +1,47 @@ +.TH MPI_File_open 3 "3/4/1999" " " "MPI-2" +.SH NAME +MPI_File_open \- Opens a file +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_open(MPI_Comm comm, char *filename, int amode, + MPI_Info info, MPI_File *fh) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B comm +- communicator (handle) +.PD 1 +.PD 0 +.TP +.B filename +- name of file to open (string) +.PD 1 +.PD 0 +.TP +.B amode +- file access mode (integer) +.PD 1 +.PD 0 +.TP +.B info +- info object (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_preallocate.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_preallocate.3 new file mode 100644 index 0000000000..02154daae4 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_preallocate.3 @@ -0,0 +1,29 @@ +.TH MPI_File_preallocate 3 "3/4/1998" " " "MPI-2" +.SH NAME +MPI_File_preallocate \- Preallocates storage space for a file +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_preallocate(MPI_File fh, MPI_Offset size) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B size +- size to preallocate (nonnegative integer) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_read.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_read.3 new file mode 100644 index 0000000000..f71c361b09 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_read.3 @@ -0,0 +1,47 @@ +.TH MPI_File_read 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_read \- Read using individual file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_read(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_read_all.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_all.3 new file mode 100644 index 0000000000..5d3eb8448a --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_all.3 @@ -0,0 +1,47 @@ +.TH MPI_File_read_all 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_read_all \- Collective read using individual file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_read_all(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_read_all_begin.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_all_begin.3 new file mode 100644 index 0000000000..4a5f95ce89 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_all_begin.3 @@ -0,0 +1,42 @@ +.TH MPI_File_read_all_begin 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_read_all_begin \- Begin a split collective read using individual file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_read_all_begin(MPI_File fh, void *buf, int count, + MPI_Datatype datatype) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_read_all_end.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_all_end.3 new file mode 100644 index 0000000000..fe194e862d --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_all_end.3 @@ -0,0 +1,36 @@ +.TH MPI_File_read_all_end 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_read_all_end \- Complete a split collective read using individual file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_read_all_end(MPI_File fh, void *buf, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_read_at.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_at.3 new file mode 100644 index 0000000000..b3f8d10f7a --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_at.3 @@ -0,0 +1,52 @@ +.TH MPI_File_read_at 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_read_at \- Read using explict offset +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B offset +- file offset (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_read_at_all.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_at_all.3 new file mode 100644 index 0000000000..cacdd659b8 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_at_all.3 @@ -0,0 +1,53 @@ +.TH MPI_File_read_at_all 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_read_at_all \- Collective read using explict offset +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, + MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B offset +- file offset (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_read_at_all_begin.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_at_all_begin.3 new file mode 100644 index 0000000000..1d983667fe --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_at_all_begin.3 @@ -0,0 +1,47 @@ +.TH MPI_File_read_at_all_begin 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_read_at_all_begin \- Begin a split collective read using explict offset +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_read_at_all_begin(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B offset +- file offset (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_read_at_all_end.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_at_all_end.3 new file mode 100644 index 0000000000..ec3e90c300 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_at_all_end.3 @@ -0,0 +1,36 @@ +.TH MPI_File_read_at_all_end 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_read_at_all_end \- Complete a split collective read using explict offset +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_read_at_all_end(MPI_File fh, void *buf, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_read_ordered.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_ordered.3 new file mode 100644 index 0000000000..68c2772f70 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_ordered.3 @@ -0,0 +1,47 @@ +.TH MPI_File_read_ordered 3 "9/3/1998" " " "MPI-2" +.SH NAME +MPI_File_read_ordered \- Collective read using shared file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_read_ordered(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_read_ordered_begin.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_ordered_begin.3 new file mode 100644 index 0000000000..ae77d71aea --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_ordered_begin.3 @@ -0,0 +1,42 @@ +.TH MPI_File_read_ordered_begin 3 "9/3/1998" " " "MPI-2" +.SH NAME +MPI_File_read_ordered_begin \- Begin a split collective read using shared file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_read_ordered_begin(MPI_File fh, void *buf, int count, + MPI_Datatype datatype) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_read_ordered_end.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_ordered_end.3 new file mode 100644 index 0000000000..27b9fb50ea --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_ordered_end.3 @@ -0,0 +1,36 @@ +.TH MPI_File_read_ordered_end 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_read_ordered_end \- Complete a split collective read using shared file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_read_ordered_end(MPI_File fh, void *buf, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_read_shared.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_shared.3 new file mode 100644 index 0000000000..2736b8c3ca --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_read_shared.3 @@ -0,0 +1,47 @@ +.TH MPI_File_read_shared 3 "9/3/1998" " " "MPI-2" +.SH NAME +MPI_File_read_shared \- Read using shared file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_read_shared(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_seek.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_seek.3 new file mode 100644 index 0000000000..e4ba73a08c --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_seek.3 @@ -0,0 +1,34 @@ +.TH MPI_File_seek 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_seek \- Updates the individual file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B offset +- file offset (integer) +.PD 1 +.PD 0 +.TP +.B whence +- update mode (state) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_seek_shared.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_seek_shared.3 new file mode 100644 index 0000000000..3420094564 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_seek_shared.3 @@ -0,0 +1,34 @@ +.TH MPI_File_seek_shared 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_seek_shared \- Updates the shared file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B offset +- file offset (integer) +.PD 1 +.PD 0 +.TP +.B whence +- update mode (state) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_set_atomicity.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_set_atomicity.3 new file mode 100644 index 0000000000..010935d129 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_set_atomicity.3 @@ -0,0 +1,29 @@ +.TH MPI_File_set_atomicity 3 "3/4/1998" " " "MPI-2" +.SH NAME +MPI_File_set_atomicity \- Sets the atomicity mode +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_set_atomicity(MPI_File fh, int flag) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B flag +- true to set atomic mode, false to set nonatomic mode (logical) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_set_info.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_set_info.3 new file mode 100644 index 0000000000..5beb0885e3 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_set_info.3 @@ -0,0 +1,29 @@ +.TH MPI_File_set_info 3 "2/5/1998" " " "MPI-2" +.SH NAME +MPI_File_set_info \- Sets new values for the hints associated with a file +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_set_info(MPI_File fh, MPI_Info info) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B info +- info object (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_set_size.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_set_size.3 new file mode 100644 index 0000000000..5761975eb7 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_set_size.3 @@ -0,0 +1,29 @@ +.TH MPI_File_set_size 3 "3/10/1998" " " "MPI-2" +.SH NAME +MPI_File_set_size \- Sets the file size +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_set_size(MPI_File fh, MPI_Offset size) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B size +- size to truncate or expand file (nonnegative integer) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_set_view.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_set_view.3 new file mode 100644 index 0000000000..5230aa9668 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_set_view.3 @@ -0,0 +1,50 @@ +.TH MPI_File_set_view 3 "3/4/1999" " " "MPI-2" +.SH NAME +MPI_File_set_view \- Sets the file view +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, + MPI_Datatype filetype, char *datarep, MPI_Info info) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B disp +- displacement (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B etype +- elementary datatype (handle) +.PD 1 +.PD 0 +.TP +.B filetype +- filetype (handle) +.PD 1 +.PD 0 +.TP +.B datarep +- data representation (string) +.PD 1 +.PD 0 +.TP +.B info +- info object (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_sync.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_sync.3 new file mode 100644 index 0000000000..ab6169fec3 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_sync.3 @@ -0,0 +1,24 @@ +.TH MPI_File_sync 3 "2/5/1998" " " "MPI-2" +.SH NAME +MPI_File_sync \- Causes all previous writes to be transferred to the storage device +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_sync(MPI_File fh) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_write.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_write.3 new file mode 100644 index 0000000000..8860a7243c --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_write.3 @@ -0,0 +1,47 @@ +.TH MPI_File_write 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_write \- Write using individual file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_write(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_write_all.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_all.3 new file mode 100644 index 0000000000..2b2ec5b64a --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_all.3 @@ -0,0 +1,47 @@ +.TH MPI_File_write_all 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_write_all \- Collective write using individual file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_write_all(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_write_all_begin.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_all_begin.3 new file mode 100644 index 0000000000..f1dbad6f59 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_all_begin.3 @@ -0,0 +1,40 @@ +.TH MPI_File_write_all_begin 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_write_all_begin \- Begin a split collective write using individual file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_write_all_begin(MPI_File fh, void *buf, int count, + MPI_Datatype datatype) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_write_all_end.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_all_end.3 new file mode 100644 index 0000000000..131ee76be3 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_all_end.3 @@ -0,0 +1,36 @@ +.TH MPI_File_write_all_end 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_write_all_end \- Complete a split collective write using individual file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_write_all_end(MPI_File fh, void *buf, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_write_at.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_at.3 new file mode 100644 index 0000000000..9668d93ab5 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_at.3 @@ -0,0 +1,53 @@ +.TH MPI_File_write_at 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_write_at \- Write using explict offset +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_write_at(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, + MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B offset +- file offset (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_write_at_all.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_at_all.3 new file mode 100644 index 0000000000..2a7bc1db1f --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_at_all.3 @@ -0,0 +1,53 @@ +.TH MPI_File_write_at_all 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_write_at_all \- Collective write using explict offset +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, + MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B offset +- file offset (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_write_at_all_begin.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_at_all_begin.3 new file mode 100644 index 0000000000..fbe4e3a4bc --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_at_all_begin.3 @@ -0,0 +1,45 @@ +.TH MPI_File_write_at_all_begin 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_write_at_all_begin \- Begin a split collective write using explict offset +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_write_at_all_begin(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B offset +- file offset (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_write_at_all_end.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_at_all_end.3 new file mode 100644 index 0000000000..f72cd4fa07 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_at_all_end.3 @@ -0,0 +1,36 @@ +.TH MPI_File_write_at_all_end 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_write_at_all_end \- Complete a split collective write using explict offset +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_write_at_all_end(MPI_File fh, void *buf, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_write_ordered.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_ordered.3 new file mode 100644 index 0000000000..28a477b0e0 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_ordered.3 @@ -0,0 +1,47 @@ +.TH MPI_File_write_ordered 3 "9/3/1998" " " "MPI-2" +.SH NAME +MPI_File_write_ordered \- Collective write using shared file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_write_ordered(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_write_ordered_begin.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_ordered_begin.3 new file mode 100644 index 0000000000..e59436a7d2 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_ordered_begin.3 @@ -0,0 +1,42 @@ +.TH MPI_File_write_ordered_begin 3 "9/3/1998" " " "MPI-2" +.SH NAME +MPI_File_write_ordered_begin \- Begin a split collective write using shared file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_write_ordered_begin(MPI_File fh, void *buf, int count, + MPI_Datatype datatype) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_write_ordered_end.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_ordered_end.3 new file mode 100644 index 0000000000..a3e8e23684 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_ordered_end.3 @@ -0,0 +1,36 @@ +.TH MPI_File_write_ordered_end 3 "8/31/1998" " " "MPI-2" +.SH NAME +MPI_File_write_ordered_end \- Complete a split collective write using shared file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_write_ordered_end(MPI_File fh, void *buf, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_File_write_shared.3 b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_shared.3 new file mode 100644 index 0000000000..ddfcea9251 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_File_write_shared.3 @@ -0,0 +1,47 @@ +.TH MPI_File_write_shared 3 "9/3/1998" " " "MPI-2" +.SH NAME +MPI_File_write_shared \- Write using shared file pointer +.SH SYNOPSIS +.nf +#include "mpi.h" +int MPI_File_write_shared(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Status *status) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B fh +- file handle (handle) +.PD 1 +.PD 0 +.TP +.B buf +- initial address of buffer (choice) +.PD 1 +.PD 0 +.TP +.B count +- number of elements in buffer (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B datatype +- datatype of each buffer element (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B status +- status object (Status) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for 'MPI_WTIME' and 'MPI_WTICK') +have an additional argument 'ierr' at the end of the argument list. +'ierr' is an integer and has the same meaning as the return value of +the routine in C. In Fortran, MPI routines are subroutines and are +invoked with the 'call' statement. + +All MPI objects (e.g., 'MPI_Datatype', 'MPI_Comm', 'MPI_File') are of +type 'INTEGER' in Fortran. diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_Info_c2f.3 b/ompi/mca/io/romio/romio/man/man3/MPI_Info_c2f.3 new file mode 100644 index 0000000000..21b7fe9969 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_Info_c2f.3 @@ -0,0 +1,18 @@ +.TH MPI_Info_c2f 3 "2/9/2000" " " "MPI-2" +.SH NAME +MPI_Info_c2f \- Translates a C info handle to a Fortran info handle +.SH SYNOPSIS +.nf +MPI_Fint MPI_Info_c2f(MPI_Info info) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B info +- C info handle (integer) +.PD 1 + +.SH RETURN VALUE +Fortran info handle (handle) +.SH LOCATION +info_c2f.c diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_Info_create.3 b/ompi/mca/io/romio/romio/man/man3/MPI_Info_create.3 new file mode 100644 index 0000000000..e637f4a391 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_Info_create.3 @@ -0,0 +1,38 @@ +.TH MPI_Info_create 3 "2/9/2000" " " "MPI-2" +.SH NAME +MPI_Info_create \- Creates a new info object +.SH SYNOPSIS +.nf +int MPI_Info_create(MPI_Info *info) +.fi +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B info +- info object (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for +.I MPI_WTIME +and +.I MPI_WTICK +) have +an additional argument +.I ierr +at the end of the argument list. +.I ierr +is an integer and has the same meaning as the return value of the routine +in C. In Fortran, MPI routines are subroutines, and are invoked with the +.I call +statement. + +All MPI objects (e.g., +.I MPI_Datatype +, +.I MPI_Comm +) are of type +.I INTEGER +in Fortran. +.SH LOCATION +info_create.c diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_Info_delete.3 b/ompi/mca/io/romio/romio/man/man3/MPI_Info_delete.3 new file mode 100644 index 0000000000..b6bbf8cf49 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_Info_delete.3 @@ -0,0 +1,43 @@ +.TH MPI_Info_delete 3 "2/9/2000" " " "MPI-2" +.SH NAME +MPI_Info_delete \- Deletes a (key,value) pair from info +.SH SYNOPSIS +.nf +int MPI_Info_delete(MPI_Info info, char *key) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B info +- info object (handle) +.PD 1 +.PD 0 +.TP +.B key +- key (string) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for +.I MPI_WTIME +and +.I MPI_WTICK +) have +an additional argument +.I ierr +at the end of the argument list. +.I ierr +is an integer and has the same meaning as the return value of the routine +in C. In Fortran, MPI routines are subroutines, and are invoked with the +.I call +statement. + +All MPI objects (e.g., +.I MPI_Datatype +, +.I MPI_Comm +) are of type +.I INTEGER +in Fortran. +.SH LOCATION +info_delete.c diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_Info_dup.3 b/ompi/mca/io/romio/romio/man/man3/MPI_Info_dup.3 new file mode 100644 index 0000000000..dcc5c3ab88 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_Info_dup.3 @@ -0,0 +1,45 @@ +.TH MPI_Info_dup 3 "2/9/2000" " " "MPI-2" +.SH NAME +MPI_Info_dup \- Returns a duplicate of the info object +.SH SYNOPSIS +.nf +int MPI_Info_dup(MPI_Info info, MPI_Info *newinfo) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B info +- info object (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B newinfo +- duplicate of info object (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for +.I MPI_WTIME +and +.I MPI_WTICK +) have +an additional argument +.I ierr +at the end of the argument list. +.I ierr +is an integer and has the same meaning as the return value of the routine +in C. In Fortran, MPI routines are subroutines, and are invoked with the +.I call +statement. + +All MPI objects (e.g., +.I MPI_Datatype +, +.I MPI_Comm +) are of type +.I INTEGER +in Fortran. +.SH LOCATION +info_dup.c diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_Info_f2c.3 b/ompi/mca/io/romio/romio/man/man3/MPI_Info_f2c.3 new file mode 100644 index 0000000000..6649c82c71 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_Info_f2c.3 @@ -0,0 +1,18 @@ +.TH MPI_Info_f2c 3 "2/9/2000" " " "MPI-2" +.SH NAME +MPI_Info_f2c \- Translates a Fortran info handle to a C info handle +.SH SYNOPSIS +.nf +MPI_Info MPI_Info_f2c(MPI_Fint info) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B info +- Fortran info handle (integer) +.PD 1 + +.SH RETURN VALUE +C info handle (handle) +.SH LOCATION +info_f2c.c diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_Info_free.3 b/ompi/mca/io/romio/romio/man/man3/MPI_Info_free.3 new file mode 100644 index 0000000000..f76d68f8c8 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_Info_free.3 @@ -0,0 +1,38 @@ +.TH MPI_Info_free 3 "2/9/2000" " " "MPI-2" +.SH NAME +MPI_Info_free \- Frees an info object +.SH SYNOPSIS +.nf +int MPI_Info_free(MPI_Info *info) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B info +- info object (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for +.I MPI_WTIME +and +.I MPI_WTICK +) have +an additional argument +.I ierr +at the end of the argument list. +.I ierr +is an integer and has the same meaning as the return value of the routine +in C. In Fortran, MPI routines are subroutines, and are invoked with the +.I call +statement. + +All MPI objects (e.g., +.I MPI_Datatype +, +.I MPI_Comm +) are of type +.I INTEGER +in Fortran. +.SH LOCATION +info_free.c diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_Info_get.3 b/ompi/mca/io/romio/romio/man/man3/MPI_Info_get.3 new file mode 100644 index 0000000000..a9433ab033 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_Info_get.3 @@ -0,0 +1,60 @@ +.TH MPI_Info_get 3 "2/9/2000" " " "MPI-2" +.SH NAME +MPI_Info_get \- Retrieves the value associated with a key +.SH SYNOPSIS +.nf +int MPI_Info_get(MPI_Info info, char *key, int valuelen, char *value, int *flag) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B info +- info object (handle) +.PD 1 +.PD 0 +.TP +.B key +- key (string) +.PD 1 +.PD 0 +.TP +.B valuelen +- length of value argument (integer) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B value +- value (string) +.PD 1 +.PD 0 +.TP +.B flag +- true if key defined, false if not (boolean) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for +.I MPI_WTIME +and +.I MPI_WTICK +) have +an additional argument +.I ierr +at the end of the argument list. +.I ierr +is an integer and has the same meaning as the return value of the routine +in C. In Fortran, MPI routines are subroutines, and are invoked with the +.I call +statement. + +All MPI objects (e.g., +.I MPI_Datatype +, +.I MPI_Comm +) are of type +.I INTEGER +in Fortran. +.SH LOCATION +info_get.c diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_Info_get_nkeys.3 b/ompi/mca/io/romio/romio/man/man3/MPI_Info_get_nkeys.3 new file mode 100644 index 0000000000..ec3196e459 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_Info_get_nkeys.3 @@ -0,0 +1,45 @@ +.TH MPI_Info_get_nkeys 3 "2/9/2000" " " "MPI-2" +.SH NAME +MPI_Info_get_nkeys \- Returns the number of currently defined keys in info +.SH SYNOPSIS +.nf +int MPI_Info_get_nkeys(MPI_Info info, int *nkeys) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B info +- info object (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B nkeys +- number of defined keys (integer) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for +.I MPI_WTIME +and +.I MPI_WTICK +) have +an additional argument +.I ierr +at the end of the argument list. +.I ierr +is an integer and has the same meaning as the return value of the routine +in C. In Fortran, MPI routines are subroutines, and are invoked with the +.I call +statement. + +All MPI objects (e.g., +.I MPI_Datatype +, +.I MPI_Comm +) are of type +.I INTEGER +in Fortran. +.SH LOCATION +info_getnks.c diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_Info_get_nthkey.3 b/ompi/mca/io/romio/romio/man/man3/MPI_Info_get_nthkey.3 new file mode 100644 index 0000000000..c29d98847c --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_Info_get_nthkey.3 @@ -0,0 +1,50 @@ +.TH MPI_Info_get_nthkey 3 "2/9/2000" " " "MPI-2" +.SH NAME +MPI_Info_get_nthkey \- Returns the nth defined key in info +.SH SYNOPSIS +.nf +int MPI_Info_get_nthkey(MPI_Info info, int n, char *key) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B info +- info object (handle) +.PD 1 +.PD 0 +.TP +.B n +- key number (integer) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B keys +- key (string) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for +.I MPI_WTIME +and +.I MPI_WTICK +) have +an additional argument +.I ierr +at the end of the argument list. +.I ierr +is an integer and has the same meaning as the return value of the routine +in C. In Fortran, MPI routines are subroutines, and are invoked with the +.I call +statement. + +All MPI objects (e.g., +.I MPI_Datatype +, +.I MPI_Comm +) are of type +.I INTEGER +in Fortran. +.SH LOCATION +info_getnth.c diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_Info_get_valuelen.3 b/ompi/mca/io/romio/romio/man/man3/MPI_Info_get_valuelen.3 new file mode 100644 index 0000000000..a65604fd18 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_Info_get_valuelen.3 @@ -0,0 +1,55 @@ +.TH MPI_Info_get_valuelen 3 "2/9/2000" " " "MPI-2" +.SH NAME +MPI_Info_get_valuelen \- Retrieves the length of the value associated with a key +.SH SYNOPSIS +.nf +int MPI_Info_get_valuelen(MPI_Info info, char *key, int *valuelen, int *flag) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B info +- info object (handle) +.PD 1 +.PD 0 +.TP +.B key +- key (string) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B valuelen +- length of value argument (integer) +.PD 1 +.PD 0 +.TP +.B flag +- true if key defined, false if not (boolean) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for +.I MPI_WTIME +and +.I MPI_WTICK +) have +an additional argument +.I ierr +at the end of the argument list. +.I ierr +is an integer and has the same meaning as the return value of the routine +in C. In Fortran, MPI routines are subroutines, and are invoked with the +.I call +statement. + +All MPI objects (e.g., +.I MPI_Datatype +, +.I MPI_Comm +) are of type +.I INTEGER +in Fortran. +.SH LOCATION +info_getvln.c diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_Info_set.3 b/ompi/mca/io/romio/romio/man/man3/MPI_Info_set.3 new file mode 100644 index 0000000000..589762a320 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_Info_set.3 @@ -0,0 +1,48 @@ +.TH MPI_Info_set 3 "2/9/2000" " " "MPI-2" +.SH NAME +MPI_Info_set \- Adds a (key,value) pair to info +.SH SYNOPSIS +.nf +int MPI_Info_set(MPI_Info info, char *key, char *value) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B info +- info object (handle) +.PD 1 +.PD 0 +.TP +.B key +- key (string) +.PD 1 +.PD 0 +.TP +.B value +- value (string) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for +.I MPI_WTIME +and +.I MPI_WTICK +) have +an additional argument +.I ierr +at the end of the argument list. +.I ierr +is an integer and has the same meaning as the return value of the routine +in C. In Fortran, MPI routines are subroutines, and are invoked with the +.I call +statement. + +All MPI objects (e.g., +.I MPI_Datatype +, +.I MPI_Comm +) are of type +.I INTEGER +in Fortran. +.SH LOCATION +info_set.c diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_Type_create_darray.3 b/ompi/mca/io/romio/romio/man/man3/MPI_Type_create_darray.3 new file mode 100644 index 0000000000..e164c58829 --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_Type_create_darray.3 @@ -0,0 +1,89 @@ +.TH MPI_Type_create_darray 3 "2/9/2000" " " "MPI-2" +.SH NAME +MPI_Type_create_darray \- Creates a datatype corresponding to a distributed, multidimensional array +.SH SYNOPSIS +.nf +int MPI_Type_create_darray(int size, int rank, int ndims, + int *array_of_gsizes, int *array_of_distribs, + int *array_of_dargs, int *array_of_psizes, + int order, MPI_Datatype oldtype, + MPI_Datatype *newtype) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B size +- size of process group (positive integer) +.PD 1 +.PD 0 +.TP +.B rank +- rank in process group (nonnegative integer) +.PD 1 +.PD 0 +.TP +.B ndims +- number of array dimensions as well as process grid dimensions (positive integer) +.PD 1 +.PD 0 +.TP +.B array_of_gsizes +- number of elements of type oldtype in each dimension of global array (array of positive integers) +.PD 1 +.PD 0 +.TP +.B array_of_distribs +- distribution of array in each dimension (array of state) +.PD 1 +.PD 0 +.TP +.B array_of_dargs +- distribution argument in each dimension (array of positive integers) +.PD 1 +.PD 0 +.TP +.B array_of_psizes +- size of process grid in each dimension (array of positive integers) +.PD 1 +.PD 0 +.TP +.B order +- array storage order flag (state) +.PD 1 +.PD 0 +.TP +.B oldtype +- old datatype (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B newtype +- new datatype (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for +.I MPI_WTIME +and +.I MPI_WTICK +) have +an additional argument +.I ierr +at the end of the argument list. +.I ierr +is an integer and has the same meaning as the return value of the routine +in C. In Fortran, MPI routines are subroutines, and are invoked with the +.I call +statement. + +All MPI objects (e.g., +.I MPI_Datatype +, +.I MPI_Comm +) are of type +.I INTEGER +in Fortran. +.SH LOCATION +darray.c diff --git a/ompi/mca/io/romio/romio/man/man3/MPI_Type_create_subarray.3 b/ompi/mca/io/romio/romio/man/man3/MPI_Type_create_subarray.3 new file mode 100644 index 0000000000..f1b142dd3f --- /dev/null +++ b/ompi/mca/io/romio/romio/man/man3/MPI_Type_create_subarray.3 @@ -0,0 +1,73 @@ +.TH MPI_Type_create_subarray 3 "2/9/2000" " " "MPI-2" +.SH NAME +MPI_Type_create_subarray \- Creates a datatype describing a subarray of a multidimensional array +.SH SYNOPSIS +.nf +int MPI_Type_create_subarray(int ndims, int *array_of_sizes, + int *array_of_subsizes, int *array_of_starts, + int order, MPI_Datatype oldtype, + MPI_Datatype *newtype) +.fi +.SH INPUT PARAMETERS +.PD 0 +.TP +.B ndims +- number of array dimensions (positive integer) +.PD 1 +.PD 0 +.TP +.B array_of_sizes +- number of elements of type oldtype in each dimension of the full array (array of positive integers) +.PD 1 +.PD 0 +.TP +.B array_of_subsizes +- number of elements of type oldtype in each dimension of the subarray (array of positive integers) +.PD 1 +.PD 0 +.TP +.B array_of_starts +- starting coordinates of the subarray in each dimension (array of nonnegative integers) +.PD 1 +.PD 0 +.TP +.B order +- array storage order flag (state) +.PD 1 +.PD 0 +.TP +.B oldtype +- old datatype (handle) +.PD 1 + +.SH OUTPUT PARAMETERS +.PD 0 +.TP +.B newtype +- new datatype (handle) +.PD 1 + +.SH NOTES FOR FORTRAN +All MPI routines in Fortran (except for +.I MPI_WTIME +and +.I MPI_WTICK +) have +an additional argument +.I ierr +at the end of the argument list. +.I ierr +is an integer and has the same meaning as the return value of the routine +in C. In Fortran, MPI routines are subroutines, and are invoked with the +.I call +statement. + +All MPI objects (e.g., +.I MPI_Datatype +, +.I MPI_Comm +) are of type +.I INTEGER +in Fortran. +.SH LOCATION +subarray.c diff --git a/ompi/mca/io/romio/romio/mpi-io/.cvsignore b/ompi/mca/io/romio/romio/mpi-io/.cvsignore new file mode 100644 index 0000000000..3cde712c1f --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi-io/.cvsignore @@ -0,0 +1,9 @@ +Makefile +.deps +*.o +*.bb +*.bbg +.libs +.libstamp* +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/mpi-io/.state-cache b/ompi/mca/io/romio/romio/mpi-io/.state-cache new file mode 100644 index 0000000000..d2fabc5ed2 --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi-io/.state-cache @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/mpi-io/close.c b/ompi/mca/io/romio/romio/mpi-io/close.c index ae233838a1..495ec3a54e 100644 --- a/ompi/mca/io/romio/romio/mpi-io/close.c +++ b/ompi/mca/io/romio/romio/mpi-io/close.c @@ -42,7 +42,7 @@ int MPI_File_close(MPI_File *mpi_fh) HPMP_IO_WSTART(fl_xmpi, BLKMPIFILECLOSE, TRDTBLOCK, *fh); #endif /* MPI_hpux */ - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(*mpi_fh); @@ -61,19 +61,32 @@ int MPI_File_close(MPI_File *mpi_fh) pointer is opened with COMM_SELF. We don't want it to be deleted while others are still accessing it. */ MPI_Barrier((fh)->comm); - if ((fh)->shared_fp_fd != ADIO_FILE_NULL) + if ((fh)->shared_fp_fd != ADIO_FILE_NULL) { ADIO_Close((fh)->shared_fp_fd, &error_code); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) goto fn_fail; + /* --END ERROR HANDLING-- */ + } } ADIO_Close(fh, &error_code); MPIO_File_free(mpi_fh); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) goto fn_fail; + /* --END ERROR HANDLING-- */ #ifdef MPI_hpux HPMP_IO_WEND(fl_xmpi); #endif /* MPI_hpux */ -fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); +fn_exit: + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; +fn_fail: + /* --BEGIN ERROR HANDLING-- */ + MPIR_Nest_decr(); + error_code = MPIO_Err_return_file(fh, error_code); + goto fn_exit; + /* --END ERROR HANDLING-- */ } diff --git a/ompi/mca/io/romio/romio/mpi-io/delete.c b/ompi/mca/io/romio/romio/mpi-io/delete.c index 1e7bcb4ac0..e328850c71 100644 --- a/ompi/mca/io/romio/romio/mpi-io/delete.c +++ b/ompi/mca/io/romio/romio/mpi-io/delete.c @@ -49,7 +49,7 @@ int MPI_File_delete(char *filename, MPI_Info info) MPIU_UNREFERENCED_ARG(info); - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); /* first check if ADIO has been initialized. If not, initialize it */ @@ -108,6 +108,10 @@ int MPI_File_delete(char *filename, MPI_Info info) /* call the fs-specific delete function */ (fsops->ADIOI_xxx_Delete)(filename, &error_code); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(MPI_FILE_NULL, error_code); + /* --END ERROR HANDLING-- */ #ifdef MPI_hpux HPMP_IO_END(fl_xmpi, MPI_FILE_NULL, MPI_DATATYPE_NULL, -1); @@ -115,6 +119,6 @@ int MPI_File_delete(char *filename, MPI_Info info) fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/.cvsignore b/ompi/mca/io/romio/romio/mpi-io/fortran/.cvsignore new file mode 100644 index 0000000000..3f1ed56ae5 --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/.cvsignore @@ -0,0 +1,10 @@ +Makefile +Debug* +Release* +g77 +intel +.deps +.libs +.libstamp* +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/.state-cache b/ompi/mca/io/romio/romio/mpi-io/fortran/.state-cache new file mode 100644 index 0000000000..80b886ffac --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/.state-cache @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/deletef.c b/ompi/mca/io/romio/romio/mpi-io/fortran/deletef.c index e5108ceba4..08953a297f 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fortran/deletef.c +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/deletef.c @@ -94,15 +94,15 @@ extern FORTRAN_API void FORT_CALL mpi_file_delete_( char * FORT_MIXED_LEN_DECL, /* Prototype to keep compiler happy */ /* -FORTRAN_API void FORT_CALL mpi_file_delete_(char *filename, MPI_Fint *info, int *ierr, int str_len); +FORTRAN_API void FORT_CALL mpi_file_delete_(char *filename, MPI_Fint *info, MPI_Fint *ierr, int str_len); #ifdef _UNICOS -void mpi_file_delete_(_fcd filename_fcd, MPI_Fint *info, int *ierr) +void mpi_file_delete_(_fcd filename_fcd, MPI_Fint *info, MPI_Fint *ierr) { char *filename = _fcdtocp(filename_fcd); int str_len = _fcdlen(filename_fcd); #else -FORTRAN_API void FORT_CALL mpi_file_delete_(char *filename, MPI_Fint *info, int *ierr, int str_len) +FORTRAN_API void FORT_CALL mpi_file_delete_(char *filename, MPI_Fint *info, MPI_Fint *ierr, int str_len) */ /* Prototype to keep compiler happy */ FORTRAN_API void FORT_CALL mpi_file_delete_(char *filename FORT_MIXED_LEN_DECL, MPI_Fint *info, MPI_Fint *ierr FORT_END_LEN_DECL); diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/get_extentf.c b/ompi/mca/io/romio/romio/mpi-io/fortran/get_extentf.c index 5bc7386127..9fea49a72a 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fortran/get_extentf.c +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/get_extentf.c @@ -92,10 +92,10 @@ extern FORTRAN_API void FORT_CALL mpi_file_get_type_extent_( MPI_Fint *, MPI_Fin #if defined(MPIHP) || defined(MPILAM) /* Prototype to keep compiler happy */ void mpi_file_get_type_extent_(MPI_Fint *fh,MPI_Fint *datatype, - MPI_Fint *extent, int *ierr ); + MPI_Fint *extent, MPI_Fint *ierr ); void mpi_file_get_type_extent_(MPI_Fint *fh,MPI_Fint *datatype, - MPI_Fint *extent, int *ierr ) + MPI_Fint *extent, MPI_Fint *ierr ) { MPI_File fh_c; MPI_Datatype datatype_c; diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/get_groupf.c b/ompi/mca/io/romio/romio/mpi-io/fortran/get_groupf.c index a76ebdc086..11c39b5326 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fortran/get_groupf.c +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/get_groupf.c @@ -104,9 +104,9 @@ void mpi_file_get_group_(MPI_Fint *fh, MPI_Fint *group, MPI_Fint *ierr ) } #else /* Prototype to keep compiler happy */ -FORTRAN_API void FORT_CALL mpi_file_get_group_(MPI_Fint *fh,MPI_Group *group, int *ierr ); +FORTRAN_API void FORT_CALL mpi_file_get_group_(MPI_Fint *fh,MPI_Group *group, MPI_Fint *ierr ); -FORTRAN_API void FORT_CALL mpi_file_get_group_(MPI_Fint *fh,MPI_Group *group, int *ierr ) +FORTRAN_API void FORT_CALL mpi_file_get_group_(MPI_Fint *fh,MPI_Group *group, MPI_Fint *ierr ) { MPI_File fh_c; diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/get_viewf.c b/ompi/mca/io/romio/romio/mpi-io/fortran/get_viewf.c index 6ddb5b5c7a..b011b612f4 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fortran/get_viewf.c +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/get_viewf.c @@ -95,10 +95,10 @@ extern FORTRAN_API void FORT_CALL mpi_file_get_view_( MPI_Fint *, MPI_Offset*, M #if defined(MPIHP) || defined(MPILAM) /* Prototype to keep compiler happy */ void mpi_file_get_view_(MPI_Fint *fh,MPI_Offset *disp,MPI_Fint *etype, - MPI_Fint *filetype,char *datarep, int *ierr, int str_len ); + MPI_Fint *filetype,char *datarep, MPI_Fint *ierr, int str_len ); void mpi_file_get_view_(MPI_Fint *fh,MPI_Offset *disp,MPI_Fint *etype, - MPI_Fint *filetype,char *datarep, int *ierr, int str_len ) + MPI_Fint *filetype,char *datarep, MPI_Fint *ierr, int str_len ) { MPI_File fh_c; MPI_Datatype etype_c, filetype_c; @@ -137,7 +137,7 @@ void mpi_file_get_view_(MPI_Fint *fh,MPI_Offset *disp,MPI_Fint *etype, #ifdef _UNICOS void mpi_file_get_view_(MPI_Fint *fh,MPI_Offset *disp,MPI_Fint *etype, - MPI_Fint *filetype, _fcd datarep_fcd, int *ierr) + MPI_Fint *filetype, _fcd datarep_fcd, MPI_Fint *ierr) { char *datarep = _fcdtocp(datarep_fcd); int str_len = _fcdlen(datarep_fcd); diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/iotestf.c b/ompi/mca/io/romio/romio/mpi-io/fortran/iotestf.c index 6f424fb8c7..db6bf92c7b 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fortran/iotestf.c +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/iotestf.c @@ -13,16 +13,16 @@ #if defined(HAVE_WEAK_SYMBOLS) #if defined(HAVE_PRAGMA_WEAK) #if defined(FORTRANCAPS) -FORTRAN_API void FORT_CALL MPIO_TEST(MPI_Fint *request,int *flag,MPI_Status *status, int *ierr ); +FORTRAN_API void FORT_CALL MPIO_TEST(MPI_Fint *request,MPI_Fint *flag,MPI_Status *status, MPI_Fint *ierr ); #pragma weak MPIO_TEST = PMPIO_TEST #elif defined(FORTRANDOUBLEUNDERSCORE) -FORTRAN_API void FORT_CALL mpio_test__(MPI_Fint *request,int *flag,MPI_Status *status, int *ierr ); +FORTRAN_API void FORT_CALL mpio_test__(MPI_Fint *request,MPI_Fint *flag,MPI_Status *status, MPI_Fint *ierr ); #pragma weak mpio_test__ = pmpio_test__ #elif !defined(FORTRANUNDERSCORE) -FORTRAN_API void FORT_CALL mpio_test(MPI_Fint *request,int *flag,MPI_Status *status, int *ierr ); +FORTRAN_API void FORT_CALL mpio_test(MPI_Fint *request,MPI_Fint *flag,MPI_Status *status, MPI_Fint *ierr ); #pragma weak mpio_test = pmpio_test #else -FORTRAN_API void FORT_CALL mpio_test_(MPI_Fint *request,int *flag,MPI_Status *status, int *ierr ); +FORTRAN_API void FORT_CALL mpio_test_(MPI_Fint *request,MPI_Fint *flag,MPI_Status *status, MPI_Fint *ierr ); #pragma weak mpio_test_ = pmpio_test_ #endif diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/iread_atf.c b/ompi/mca/io/romio/romio/mpi-io/fortran/iread_atf.c index c88a0f9ea9..d81d49f467 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fortran/iread_atf.c +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/iread_atf.c @@ -113,7 +113,7 @@ void mpi_file_iread_at_(MPI_Fint *fh,MPI_Offset *offset,void *buf, #else /* Prototype to keep compiler happy */ FORTRAN_API void FORT_CALL mpi_file_iread_at_(MPI_Fint *fh,MPI_Offset *offset,void *buf, - int *count,MPI_Datatype *datatype, + MPI_Fint *count,MPI_Datatype *datatype, MPI_Fint *request, MPI_Fint *ierr ); FORTRAN_API void FORT_CALL mpi_file_iread_at_(MPI_Fint *fh,MPI_Offset *offset,void *buf, diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/iread_shf.c b/ompi/mca/io/romio/romio/mpi-io/fortran/iread_shf.c index db09f8c319..0c07d52337 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fortran/iread_shf.c +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/iread_shf.c @@ -91,10 +91,10 @@ extern FORTRAN_API void FORT_CALL mpi_file_iread_shared_( MPI_Fint *, void*, MPI #if defined(MPIHP) || defined(MPILAM) /* Prototype to keep compiler happy */ -void mpi_file_iread_shared_(MPI_Fint *fh,void *buf,int *count, +void mpi_file_iread_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Fint *request, MPI_Fint *ierr ); -void mpi_file_iread_shared_(MPI_Fint *fh,void *buf,int *count, +void mpi_file_iread_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Fint *request, MPI_Fint *ierr ) { MPI_File fh_c; @@ -108,10 +108,10 @@ void mpi_file_iread_shared_(MPI_Fint *fh,void *buf,int *count, } #else /* Prototype to keep compiler happy */ -FORTRAN_API void FORT_CALL mpi_file_iread_shared_(MPI_Fint *fh,void *buf,int *count, +FORTRAN_API void FORT_CALL mpi_file_iread_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Datatype *datatype,MPI_Fint *request, MPI_Fint *ierr ); -FORTRAN_API void FORT_CALL mpi_file_iread_shared_(MPI_Fint *fh,void *buf,int *count, +FORTRAN_API void FORT_CALL mpi_file_iread_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Datatype *datatype,MPI_Fint *request, MPI_Fint *ierr ) { MPI_File fh_c; diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/ireadf.c b/ompi/mca/io/romio/romio/mpi-io/fortran/ireadf.c index 14abba906a..10c7e4088a 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fortran/ireadf.c +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/ireadf.c @@ -91,10 +91,10 @@ extern FORTRAN_API void FORT_CALL mpi_file_iread_( MPI_Fint *, void*, MPI_Fint * #if defined(MPIHP) || defined(MPILAM) /* Prototype to keep compiler happy */ -void mpi_file_iread_(MPI_Fint *fh,void *buf,int *count, +void mpi_file_iread_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Fint *request, MPI_Fint *ierr ); -void mpi_file_iread_(MPI_Fint *fh,void *buf,int *count, +void mpi_file_iread_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Fint *request, MPI_Fint *ierr ) { MPI_File fh_c; @@ -108,10 +108,10 @@ void mpi_file_iread_(MPI_Fint *fh,void *buf,int *count, } #else /* Prototype to keep compiler happy */ -FORTRAN_API void FORT_CALL mpi_file_iread_(MPI_Fint *fh,void *buf,int *count, +FORTRAN_API void FORT_CALL mpi_file_iread_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Datatype *datatype,MPI_Fint *request, MPI_Fint *ierr ); -FORTRAN_API void FORT_CALL mpi_file_iread_(MPI_Fint *fh,void *buf,int *count, +FORTRAN_API void FORT_CALL mpi_file_iread_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Datatype *datatype,MPI_Fint *request, MPI_Fint *ierr ) { MPI_File fh_c; diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/iwrite_shf.c b/ompi/mca/io/romio/romio/mpi-io/fortran/iwrite_shf.c index 8fd4248caf..f44cf568f4 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fortran/iwrite_shf.c +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/iwrite_shf.c @@ -91,9 +91,9 @@ extern FORTRAN_API void FORT_CALL mpi_file_iwrite_shared_( MPI_Fint *, void*, MP #if defined(MPIHP) || defined(MPILAM) /* Prototype to keep compiler happy */ -void mpi_file_iwrite_shared_(MPI_Fint *fh,void *buf,int *count, +void mpi_file_iwrite_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Fint *request, MPI_Fint *ierr ); -void mpi_file_iwrite_shared_(MPI_Fint *fh,void *buf,int *count, +void mpi_file_iwrite_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Fint *request, MPI_Fint *ierr ) { MPI_File fh_c; @@ -108,10 +108,10 @@ void mpi_file_iwrite_shared_(MPI_Fint *fh,void *buf,int *count, } #else /* Prototype to keep compiler happy */ -FORTRAN_API void FORT_CALL mpi_file_iwrite_shared_(MPI_Fint *fh,void *buf,int *count, +FORTRAN_API void FORT_CALL mpi_file_iwrite_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Datatype *datatype,MPI_Fint *request, MPI_Fint *ierr ); -FORTRAN_API void FORT_CALL mpi_file_iwrite_shared_(MPI_Fint *fh,void *buf,int *count, +FORTRAN_API void FORT_CALL mpi_file_iwrite_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Datatype *datatype,MPI_Fint *request, MPI_Fint *ierr ) { MPI_File fh_c; diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/iwritef.c b/ompi/mca/io/romio/romio/mpi-io/fortran/iwritef.c index ad403c051e..7288b0fbc3 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fortran/iwritef.c +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/iwritef.c @@ -91,10 +91,10 @@ extern FORTRAN_API void FORT_CALL mpi_file_iwrite_( MPI_Fint *, void*, MPI_Fint #if defined(MPIHP) || defined(MPILAM) /* Prototype to keep compiler happy */ -void mpi_file_iwrite_(MPI_Fint *fh,void *buf,int *count, +void mpi_file_iwrite_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Fint *request, MPI_Fint *ierr ); -void mpi_file_iwrite_(MPI_Fint *fh,void *buf,int *count, +void mpi_file_iwrite_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Fint *request, MPI_Fint *ierr ) { MPI_File fh_c; @@ -109,10 +109,10 @@ void mpi_file_iwrite_(MPI_Fint *fh,void *buf,int *count, } #else /* Prototype to keep compiler happy */ -FORTRAN_API void FORT_CALL mpi_file_iwrite_(MPI_Fint *fh,void *buf,int *count, +FORTRAN_API void FORT_CALL mpi_file_iwrite_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Datatype *datatype,MPI_Fint *request, MPI_Fint *ierr ); -FORTRAN_API void FORT_CALL mpi_file_iwrite_(MPI_Fint *fh,void *buf,int *count, +FORTRAN_API void FORT_CALL mpi_file_iwrite_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Datatype *datatype,MPI_Fint *request, MPI_Fint *ierr ) { MPI_File fh_c; diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/openf.c b/ompi/mca/io/romio/romio/mpi-io/fortran/openf.c index be6920635c..4c98389a8c 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fortran/openf.c +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/openf.c @@ -142,11 +142,11 @@ void mpi_file_open_(MPI_Fint *comm,_fcd filename_fcd,MPI_Fint *amode, #else /* Prototype to keep compiler happy */ /* -FORTRAN_API void FORT_CALL mpi_file_open_(MPI_Comm *comm,char *filename,int *amode, - MPI_Fint *info, MPI_Fint *fh, int *ierr, int str_len ); +FORTRAN_API void FORT_CALL mpi_file_open_(MPI_Comm *comm,char *filename,MPI_Fint *amode, + MPI_Fint *info, MPI_Fint *fh, MPI_Fint *ierr, int str_len ); -FORTRAN_API void FORT_CALL mpi_file_open_(MPI_Comm *comm,char *filename,int *amode, - MPI_Fint *info, MPI_Fint *fh, int *ierr, int str_len ) +FORTRAN_API void FORT_CALL mpi_file_open_(MPI_Comm *comm,char *filename,MPI_Fint *amode, + MPI_Fint *info, MPI_Fint *fh, MPI_Fint *ierr, int str_len ) */ /* Prototype to keep compiler happy */ FORTRAN_API void FORT_CALL mpi_file_open_(MPI_Fint *comm,char *filename FORT_MIXED_LEN_DECL,MPI_Fint *amode, diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/set_viewf.c b/ompi/mca/io/romio/romio/mpi-io/fortran/set_viewf.c index 0898d341a4..becd2c7ffc 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fortran/set_viewf.c +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/set_viewf.c @@ -95,11 +95,11 @@ extern FORTRAN_API void FORT_CALL mpi_file_set_view_( MPI_Fint *, MPI_Offset *, #if defined(MPIHP) || defined(MPILAM) /* Prototype to keep compiler happy */ void mpi_file_set_view_(MPI_Fint *fh,MPI_Offset *disp,MPI_Fint *etype, - MPI_Fint *filetype,char *datarep,MPI_Fint *info, int *ierr, + MPI_Fint *filetype,char *datarep,MPI_Fint *info, MPI_Fint *ierr, int str_len ); void mpi_file_set_view_(MPI_Fint *fh,MPI_Offset *disp,MPI_Fint *etype, - MPI_Fint *filetype,char *datarep,MPI_Fint *info, int *ierr, + MPI_Fint *filetype,char *datarep,MPI_Fint *info, MPI_Fint *ierr, int str_len ) { char *newstr; @@ -139,7 +139,7 @@ void mpi_file_set_view_(MPI_Fint *fh,MPI_Offset *disp,MPI_Fint *etype, #ifdef _UNICOS void mpi_file_set_view_(MPI_Fint *fh,MPI_Offset *disp,MPI_Datatype *etype, - MPI_Datatype *filetype,_fcd datarep_fcd,MPI_Fint *info, int *ierr) + MPI_Datatype *filetype,_fcd datarep_fcd,MPI_Fint *info, MPI_Fint *ierr) { char *datarep = _fcdtocp(datarep_fcd); int str_len = _fcdlen(datarep_fcd); diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/write_ordbf.c b/ompi/mca/io/romio/romio/mpi-io/fortran/write_ordbf.c index 459bc0b832..a4d6a844f9 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fortran/write_ordbf.c +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/write_ordbf.c @@ -94,7 +94,7 @@ extern FORTRAN_API void FORT_CALL mpi_file_write_ordered_begin_( MPI_Fint *, voi void mpi_file_write_ordered_begin_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr ); -void mpi_file_write_ordered_begin_(MPI_Fint *fh,void *buf,int *count, +void mpi_file_write_ordered_begin_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr ){ MPI_File fh_c; MPI_Datatype datatype_c; @@ -109,7 +109,7 @@ void mpi_file_write_ordered_begin_(MPI_Fint *fh,void *buf,int *count, FORTRAN_API void FORT_CALL mpi_file_write_ordered_begin_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr ); -FORTRAN_API void FORT_CALL mpi_file_write_ordered_begin_(MPI_Fint *fh,void *buf,int *count, +FORTRAN_API void FORT_CALL mpi_file_write_ordered_begin_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *ierr ){ MPI_File fh_c; diff --git a/ompi/mca/io/romio/romio/mpi-io/fortran/write_shf.c b/ompi/mca/io/romio/romio/mpi-io/fortran/write_shf.c index d6fd797217..c4575d9dda 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fortran/write_shf.c +++ b/ompi/mca/io/romio/romio/mpi-io/fortran/write_shf.c @@ -110,7 +110,7 @@ void mpi_file_write_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, FORTRAN_API void FORT_CALL mpi_file_write_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ); -FORTRAN_API void FORT_CALL mpi_file_write_shared_(MPI_Fint *fh,void *buf,int *count, +FORTRAN_API void FORT_CALL mpi_file_write_shared_(MPI_Fint *fh,void *buf,MPI_Fint *count, MPI_Fint *datatype,MPI_Status *status, MPI_Fint *ierr ) { MPI_File fh_c; diff --git a/ompi/mca/io/romio/romio/mpi-io/fsync.c b/ompi/mca/io/romio/romio/mpi-io/fsync.c index d1f127ed03..dfec3bf38c 100644 --- a/ompi/mca/io/romio/romio/mpi-io/fsync.c +++ b/ompi/mca/io/romio/romio/mpi-io/fsync.c @@ -43,7 +43,7 @@ int MPI_File_sync(MPI_File mpi_fh) HPMP_IO_START(fl_xmpi, BLKMPIFILESYNC, TRDTBLOCK, fh, MPI_DATATYPE_NULL, -1); #endif /* MPI_hpux */ - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -61,6 +61,10 @@ int MPI_File_sync(MPI_File mpi_fh) ADIOI_TEST_DEFERRED(fh, "MPI_File_sync", &error_code); ADIO_Flush(fh, &error_code); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ #ifdef MPI_hpux HPMP_IO_END(fl_xmpi, fh, MPI_DATATYPE_NULL, -1); @@ -68,6 +72,6 @@ int MPI_File_sync(MPI_File mpi_fh) fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/get_amode.c b/ompi/mca/io/romio/romio/mpi-io/get_amode.c index a982ad37d3..35f2e938d4 100644 --- a/ompi/mca/io/romio/romio/mpi-io/get_amode.c +++ b/ompi/mca/io/romio/romio/mpi-io/get_amode.c @@ -40,8 +40,6 @@ int MPI_File_get_amode(MPI_File mpi_fh, int *amode) static char myname[] = "MPI_FILE_GET_AMODE"; ADIO_File fh; - MPID_CS_ENTER(); - fh = MPIO_File_resolve(mpi_fh); /* --BEGIN ERROR HANDLING-- */ @@ -51,6 +49,5 @@ int MPI_File_get_amode(MPI_File mpi_fh, int *amode) *amode = fh->access_mode; fn_exit: - MPID_CS_EXIT(); return MPI_SUCCESS; } diff --git a/ompi/mca/io/romio/romio/mpi-io/get_atom.c b/ompi/mca/io/romio/romio/mpi-io/get_atom.c index 9a7955b34e..946cae7a39 100644 --- a/ompi/mca/io/romio/romio/mpi-io/get_atom.c +++ b/ompi/mca/io/romio/romio/mpi-io/get_atom.c @@ -40,7 +40,6 @@ int MPI_File_get_atomicity(MPI_File mpi_fh, int *flag) ADIO_File fh; static char myname[] = "MPI_FILE_GET_ATOMICITY"; - MPID_CS_ENTER(); fh = MPIO_File_resolve(mpi_fh); /* --BEGIN ERROR HANDLING-- */ @@ -50,6 +49,5 @@ int MPI_File_get_atomicity(MPI_File mpi_fh, int *flag) *flag = fh->atomicity; fn_exit: - MPID_CS_EXIT(); return MPI_SUCCESS; } diff --git a/ompi/mca/io/romio/romio/mpi-io/get_bytoff.c b/ompi/mca/io/romio/romio/mpi-io/get_bytoff.c index 2dfc72d3a9..e770b8a662 100644 --- a/ompi/mca/io/romio/romio/mpi-io/get_bytoff.c +++ b/ompi/mca/io/romio/romio/mpi-io/get_bytoff.c @@ -46,7 +46,6 @@ int MPI_File_get_byte_offset(MPI_File mpi_fh, ADIO_File fh; static char myname[] = "MPI_FILE_GET_BYTE_OFFSET"; - MPID_CS_ENTER(); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -70,7 +69,6 @@ int MPI_File_get_byte_offset(MPI_File mpi_fh, fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); return MPI_SUCCESS; } diff --git a/ompi/mca/io/romio/romio/mpi-io/get_errh.c b/ompi/mca/io/romio/romio/mpi-io/get_errh.c index 2d117d0341..1ea878c708 100644 --- a/ompi/mca/io/romio/romio/mpi-io/get_errh.c +++ b/ompi/mca/io/romio/romio/mpi-io/get_errh.c @@ -41,7 +41,7 @@ int MPI_File_get_errhandler(MPI_File mpi_fh, MPI_Errhandler *errhandler) ADIO_File fh; static char myname[] = "MPI_FILE_GET_ERRHANDLER"; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); if (mpi_fh == MPI_FILE_NULL) { *errhandler = ADIOI_DFLT_ERR_HANDLER; @@ -63,6 +63,6 @@ int MPI_File_get_errhandler(MPI_File mpi_fh, MPI_Errhandler *errhandler) } fn_exit: - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return MPI_SUCCESS; } diff --git a/ompi/mca/io/romio/romio/mpi-io/get_extent.c b/ompi/mca/io/romio/romio/mpi-io/get_extent.c index daabc6aeae..0ead1490ff 100644 --- a/ompi/mca/io/romio/romio/mpi-io/get_extent.c +++ b/ompi/mca/io/romio/romio/mpi-io/get_extent.c @@ -42,7 +42,6 @@ int MPI_File_get_type_extent(MPI_File mpi_fh, MPI_Datatype datatype, ADIO_File fh; static char myname[] = "MPI_FILE_GET_TYPE_EXTENT"; - MPID_CS_ENTER(); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -58,6 +57,5 @@ int MPI_File_get_type_extent(MPI_File mpi_fh, MPI_Datatype datatype, fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/get_group.c b/ompi/mca/io/romio/romio/mpi-io/get_group.c index d5dfe26085..fe6ebaa4ca 100644 --- a/ompi/mca/io/romio/romio/mpi-io/get_group.c +++ b/ompi/mca/io/romio/romio/mpi-io/get_group.c @@ -41,7 +41,7 @@ int MPI_File_get_group(MPI_File mpi_fh, MPI_Group *group) ADIO_File fh; static char myname[] = "MPI_FILE_GET_GROUP"; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -59,6 +59,6 @@ int MPI_File_get_group(MPI_File mpi_fh, MPI_Group *group) fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/get_info.c b/ompi/mca/io/romio/romio/mpi-io/get_info.c index 200cd0a2c9..4e88503faf 100644 --- a/ompi/mca/io/romio/romio/mpi-io/get_info.c +++ b/ompi/mca/io/romio/romio/mpi-io/get_info.c @@ -40,7 +40,7 @@ int MPI_File_get_info(MPI_File mpi_fh, MPI_Info *info_used) ADIO_File fh; static char myname[] = "MPI_FILE_GET_INFO"; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -50,9 +50,13 @@ int MPI_File_get_info(MPI_File mpi_fh, MPI_Info *info_used) /* --END ERROR HANDLING-- */ error_code = MPI_Info_dup(fh->info, info_used); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/get_posn.c b/ompi/mca/io/romio/romio/mpi-io/get_posn.c index 0b87635271..1db579b0ae 100644 --- a/ompi/mca/io/romio/romio/mpi-io/get_posn.c +++ b/ompi/mca/io/romio/romio/mpi-io/get_posn.c @@ -43,7 +43,6 @@ int MPI_File_get_position(MPI_File mpi_fh, MPI_Offset *offset) ADIO_File fh; static char myname[] = "MPI_FILE_GET_POSITION"; - MPID_CS_ENTER(); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -57,7 +56,6 @@ int MPI_File_get_position(MPI_File mpi_fh, MPI_Offset *offset) fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); return MPI_SUCCESS; } diff --git a/ompi/mca/io/romio/romio/mpi-io/get_posn_sh.c b/ompi/mca/io/romio/romio/mpi-io/get_posn_sh.c index c7bd94ae8c..a51dbbdb8c 100644 --- a/ompi/mca/io/romio/romio/mpi-io/get_posn_sh.c +++ b/ompi/mca/io/romio/romio/mpi-io/get_posn_sh.c @@ -41,7 +41,6 @@ int MPI_File_get_position_shared(MPI_File mpi_fh, MPI_Offset *offset) ADIO_File fh; static char myname[] = "MPI_FILE_GET_POSITION_SHARED"; - MPID_CS_ENTER(); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -55,10 +54,13 @@ int MPI_File_get_position_shared(MPI_File mpi_fh, MPI_Offset *offset) ADIOI_TEST_DEFERRED(fh, myname, &error_code); ADIO_Get_shared_fp(fh, 0, offset, &error_code); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/get_size.c b/ompi/mca/io/romio/romio/mpi-io/get_size.c index 721361a02e..4ff1c27f23 100644 --- a/ompi/mca/io/romio/romio/mpi-io/get_size.c +++ b/ompi/mca/io/romio/romio/mpi-io/get_size.c @@ -47,7 +47,6 @@ int MPI_File_get_size(MPI_File mpi_fh, MPI_Offset *size) MPI_DATATYPE_NULL, -1); #endif /* MPI_hpux */ - MPID_CS_ENTER(); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -60,6 +59,10 @@ int MPI_File_get_size(MPI_File mpi_fh, MPI_Offset *size) fcntl_struct = (ADIO_Fcntl_t *) ADIOI_Malloc(sizeof(ADIO_Fcntl_t)); ADIO_Fcntl(fh, ADIO_FCNTL_GET_FSIZE, fcntl_struct, &error_code); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ *size = fcntl_struct->fsize; ADIOI_Free(fcntl_struct); @@ -69,7 +72,6 @@ int MPI_File_get_size(MPI_File mpi_fh, MPI_Offset *size) fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/get_view.c b/ompi/mca/io/romio/romio/mpi-io/get_view.c index 145a128339..bc8c8bfbea 100644 --- a/ompi/mca/io/romio/romio/mpi-io/get_view.c +++ b/ompi/mca/io/romio/romio/mpi-io/get_view.c @@ -53,7 +53,7 @@ int MPI_File_get_view(MPI_File mpi_fh, MPI_Datatype copy_etype, copy_filetype; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -97,7 +97,7 @@ int MPI_File_get_view(MPI_File mpi_fh, fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return MPI_SUCCESS; } diff --git a/ompi/mca/io/romio/romio/mpi-io/glue/.cvsignore b/ompi/mca/io/romio/romio/mpi-io/glue/.cvsignore new file mode 100644 index 0000000000..f3c7a7c5da --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi-io/glue/.cvsignore @@ -0,0 +1 @@ +Makefile diff --git a/ompi/mca/io/romio/romio/mpi-io/glue/default/.cvsignore b/ompi/mca/io/romio/romio/mpi-io/glue/default/.cvsignore new file mode 100644 index 0000000000..72829a0d3b --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi-io/glue/default/.cvsignore @@ -0,0 +1,5 @@ +Makefile +.*-cache +.libs +.libstamp* +*.lo diff --git a/ompi/mca/io/romio/romio/mpi-io/glue/default/.state-cache b/ompi/mca/io/romio/romio/mpi-io/glue/default/.state-cache new file mode 100644 index 0000000000..6b4b4f0dbf --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi-io/glue/default/.state-cache @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/mpi-io/glue/mpich1/.cvsignore b/ompi/mca/io/romio/romio/mpi-io/glue/mpich1/.cvsignore new file mode 100644 index 0000000000..4038134bb4 --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi-io/glue/mpich1/.cvsignore @@ -0,0 +1,6 @@ +Makefile +*.o +.libs +.libstamp* +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/mpi-io/glue/mpich1/.state-cache b/ompi/mca/io/romio/romio/mpi-io/glue/mpich1/.state-cache new file mode 100644 index 0000000000..145531a15f --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi-io/glue/mpich1/.state-cache @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/mpi-io/glue/mpich1/mpio_file.c b/ompi/mca/io/romio/romio/mpi-io/glue/mpich1/mpio_file.c index 3c7ffa23a8..aaee32b98d 100644 --- a/ompi/mca/io/romio/romio/mpi-io/glue/mpich1/mpio_file.c +++ b/ompi/mca/io/romio/romio/mpi-io/glue/mpich1/mpio_file.c @@ -67,6 +67,10 @@ MPI_Fint MPIO_File_c2f(MPI_File fh) if ((fh <= (MPI_File) 0) || (fh->cookie != ADIOI_FILE_COOKIE)) return (MPI_Fint) 0; + + if (fh->fortran_handle != -1) + return fh->fortran_handle; + if (!ADIOI_Ftable) { ADIOI_Ftable_max = 1024; ADIOI_Ftable = (MPI_File *) @@ -84,6 +88,7 @@ MPI_Fint MPIO_File_c2f(MPI_File fh) } ADIOI_Ftable_ptr++; ADIOI_Ftable[ADIOI_Ftable_ptr] = fh; + fh->fortran_handle = ADIOI_Ftable_ptr; return (MPI_Fint) ADIOI_Ftable_ptr; #endif } diff --git a/ompi/mca/io/romio/romio/mpi-io/glue/mpich2/.cvsignore b/ompi/mca/io/romio/romio/mpi-io/glue/mpich2/.cvsignore new file mode 100644 index 0000000000..4038134bb4 --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi-io/glue/mpich2/.cvsignore @@ -0,0 +1,6 @@ +Makefile +*.o +.libs +.libstamp* +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/mpi-io/glue/mpich2/.state-cache b/ompi/mca/io/romio/romio/mpi-io/glue/mpich2/.state-cache new file mode 100644 index 0000000000..d7d42d6b5c --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi-io/glue/mpich2/.state-cache @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/mpi-io/glue/mpich2/mpio_err.c b/ompi/mca/io/romio/romio/mpi-io/glue/mpich2/mpio_err.c index 28215b9dfc..1ef679bdaa 100644 --- a/ompi/mca/io/romio/romio/mpi-io/glue/mpich2/mpio_err.c +++ b/ompi/mca/io/romio/romio/mpi-io/glue/mpich2/mpio_err.c @@ -11,6 +11,8 @@ #include "adio_extern.h" /* MPICH2 error handling implementation */ +/* FIXME: These external prototypes should be included from + mpich2/src/include/mpiext.h */ int MPIR_Err_create_code_valist(int, int, const char [], int, int, const char [], const char [], va_list ); int MPIR_Err_is_fatal(int); @@ -18,6 +20,8 @@ int MPIR_Err_is_fatal(int); void MPIR_Get_file_error_routine( MPI_Errhandler, void (**)(MPI_File *, int *, ...), int * ); +int MPIR_File_call_cxx_errhandler( MPI_File *, int *, + void (*)(MPI_File *, int *, ... ) ); int MPIO_Err_create_code(int lastcode, int fatal, const char fcname[], int line, int error_class, const char generic_msg[], @@ -89,7 +93,10 @@ int MPIO_Err_return_file(MPI_File mpi_fh, int error_code) } /* --END ERROR HANDLING-- */ else if (kind == 2) { - (*c_errhandler)( &mpi_fh, &error_code, 0 ); + (*c_errhandler)( &mpi_fh, &error_code, 0 ); + } + else if (kind == 3) { + MPIR_File_call_cxx_errhandler( &mpi_fh, &error_code, c_errhandler ); } /* kind == 1 just returns */ diff --git a/ompi/mca/io/romio/romio/mpi-io/glue/mpich2/mpio_file.c b/ompi/mca/io/romio/romio/mpi-io/glue/mpich2/mpio_file.c index 7c204d61c3..a52f97f92f 100644 --- a/ompi/mca/io/romio/romio/mpi-io/glue/mpich2/mpio_file.c +++ b/ompi/mca/io/romio/romio/mpi-io/glue/mpich2/mpio_file.c @@ -65,6 +65,10 @@ MPI_Fint MPIO_File_c2f(MPI_File fh) if ((fh <= (MPI_File) 0) || (fh->cookie != ADIOI_FILE_COOKIE)) return (MPI_Fint) 0; + + if (fh->fortran_handle != -1) + return fh->fortran_handle; + if (!ADIOI_Ftable) { ADIOI_Ftable_max = 1024; ADIOI_Ftable = (MPI_File *) @@ -82,6 +86,7 @@ MPI_Fint MPIO_File_c2f(MPI_File fh) } ADIOI_Ftable_ptr++; ADIOI_Ftable[ADIOI_Ftable_ptr] = fh; + fh->fortran_handle = ADIOI_Ftable_ptr; return (MPI_Fint) ADIOI_Ftable_ptr; #endif } diff --git a/ompi/mca/io/romio/romio/mpi-io/ioreq_c2f.c b/ompi/mca/io/romio/romio/mpi-io/ioreq_c2f.c index 86ac010527..1efb0bbee1 100644 --- a/ompi/mca/io/romio/romio/mpi-io/ioreq_c2f.c +++ b/ompi/mca/io/romio/romio/mpi-io/ioreq_c2f.c @@ -48,11 +48,11 @@ MPI_Fint MPIO_Request_c2f(MPIO_Request request) #else int i; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); if ((request <= (MPIO_Request) 0) || (request->cookie != ADIOI_REQ_COOKIE)) { - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return (MPI_Fint) 0; } if (!ADIOI_Reqtable) { @@ -73,7 +73,7 @@ MPI_Fint MPIO_Request_c2f(MPIO_Request request) ADIOI_Reqtable_ptr++; ADIOI_Reqtable[ADIOI_Reqtable_ptr] = request; - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return (MPI_Fint) ADIOI_Reqtable_ptr; #endif } diff --git a/ompi/mca/io/romio/romio/mpi-io/ioreq_f2c.c b/ompi/mca/io/romio/romio/mpi-io/ioreq_f2c.c index 97979b30e4..4d86161b45 100644 --- a/ompi/mca/io/romio/romio/mpi-io/ioreq_f2c.c +++ b/ompi/mca/io/romio/romio/mpi-io/ioreq_f2c.c @@ -47,7 +47,7 @@ MPIO_Request MPIO_Request_f2c(MPI_Fint request) int error_code; static char myname[] = "MPIO_REQUEST_F2C"; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); /* --BEGIN ERROR HANDLING-- */ if (!request) { @@ -64,7 +64,7 @@ MPIO_Request MPIO_Request_f2c(MPI_Fint request) /* --END ERROR HANDLING-- */ fn_exit: - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return ADIOI_Reqtable[request]; #endif } diff --git a/ompi/mca/io/romio/romio/mpi-io/iotest.c b/ompi/mca/io/romio/romio/mpi-io/iotest.c index 9ed7fba2ad..6a12fb68e7 100644 --- a/ompi/mca/io/romio/romio/mpi-io/iotest.c +++ b/ompi/mca/io/romio/romio/mpi-io/iotest.c @@ -55,7 +55,7 @@ int MPIO_Test(MPIO_Request *request, int *flag, MPI_Status *status) } #endif /* MPI_hpux */ - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); if (*request == MPIO_REQUEST_NULL) { error_code = MPI_SUCCESS; @@ -88,7 +88,7 @@ int MPIO_Test(MPIO_Request *request, int *flag, MPI_Status *status) #endif /* MPI_hpux */ fn_exit: - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } #endif diff --git a/ompi/mca/io/romio/romio/mpi-io/iotestall.c b/ompi/mca/io/romio/romio/mpi-io/iotestall.c index e2b48cdd29..46851c5a52 100644 --- a/ompi/mca/io/romio/romio/mpi-io/iotestall.c +++ b/ompi/mca/io/romio/romio/mpi-io/iotestall.c @@ -34,7 +34,7 @@ int MPIO_Testall(int count, MPIO_Request requests[], int *flag, int done, i, err; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); if (count == 1) { MPIR_Nest_decr(); err = MPIO_Test( requests, flag, statuses ); @@ -75,7 +75,7 @@ int MPIO_Testall(int count, MPIO_Request requests[], int *flag, err = MPI_SUCCESS; fn_exit: - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return err; } diff --git a/ompi/mca/io/romio/romio/mpi-io/iotestany.c b/ompi/mca/io/romio/romio/mpi-io/iotestany.c index cb6f12a345..81940dcc57 100644 --- a/ompi/mca/io/romio/romio/mpi-io/iotestany.c +++ b/ompi/mca/io/romio/romio/mpi-io/iotestany.c @@ -33,7 +33,7 @@ int MPIO_Testany(int count, MPIO_Request requests[], int *index, { int i, err; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); if (count == 1) { MPIR_Nest_incr(); @@ -79,6 +79,6 @@ int MPIO_Testany(int count, MPIO_Request requests[], int *index, fn_exit: - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return err; } diff --git a/ompi/mca/io/romio/romio/mpi-io/iotestsome.c b/ompi/mca/io/romio/romio/mpi-io/iotestsome.c index 7ce716625e..6f04bced60 100644 --- a/ompi/mca/io/romio/romio/mpi-io/iotestsome.c +++ b/ompi/mca/io/romio/romio/mpi-io/iotestsome.c @@ -34,7 +34,7 @@ int MPIO_Testsome(int count, MPIO_Request requests[], int *outcount, int i, err; int flag; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); if (count == 1) { MPIR_Nest_incr(); @@ -84,6 +84,6 @@ int MPIO_Testsome(int count, MPIO_Request requests[], int *outcount, fn_exit: - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return err; } diff --git a/ompi/mca/io/romio/romio/mpi-io/iowait.c b/ompi/mca/io/romio/romio/mpi-io/iowait.c index 25f719e7c2..58a5a56249 100644 --- a/ompi/mca/io/romio/romio/mpi-io/iowait.c +++ b/ompi/mca/io/romio/romio/mpi-io/iowait.c @@ -55,7 +55,7 @@ int MPIO_Wait(MPIO_Request *request, MPI_Status *status) } #endif /* MPI_hpux */ - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); if (*request == MPIO_REQUEST_NULL) { @@ -91,7 +91,7 @@ int MPIO_Wait(MPIO_Request *request, MPI_Status *status) fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } #endif diff --git a/ompi/mca/io/romio/romio/mpi-io/iowaitall.c b/ompi/mca/io/romio/romio/mpi-io/iowaitall.c index 6b242474b4..8bceb64fa5 100644 --- a/ompi/mca/io/romio/romio/mpi-io/iowaitall.c +++ b/ompi/mca/io/romio/romio/mpi-io/iowaitall.c @@ -32,7 +32,7 @@ int MPIO_Waitall( int count, MPIO_Request requests[], MPI_Status statuses[] ) { int notdone, i, flag, err; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); if (count == 1) { MPIR_Nest_incr(); @@ -71,7 +71,7 @@ int MPIO_Waitall( int count, MPIO_Request requests[], MPI_Status statuses[] ) err = MPI_SUCCESS; fn_exit: - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return err; } diff --git a/ompi/mca/io/romio/romio/mpi-io/iowaitany.c b/ompi/mca/io/romio/romio/mpi-io/iowaitany.c index 898e46d891..ba8d9c3091 100644 --- a/ompi/mca/io/romio/romio/mpi-io/iowaitany.c +++ b/ompi/mca/io/romio/romio/mpi-io/iowaitany.c @@ -33,7 +33,7 @@ int MPIO_Waitany(int count, MPIO_Request requests[], int *index, { int i, flag, err; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); if (count == 1) { MPIR_Nest_incr(); @@ -79,7 +79,7 @@ int MPIO_Waitany(int count, MPIO_Request requests[], int *index, } while (flag == 0); fn_exit: - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return err; } diff --git a/ompi/mca/io/romio/romio/mpi-io/iowaitsome.c b/ompi/mca/io/romio/romio/mpi-io/iowaitsome.c index 0c1cca51d5..4f9adaf94e 100644 --- a/ompi/mca/io/romio/romio/mpi-io/iowaitsome.c +++ b/ompi/mca/io/romio/romio/mpi-io/iowaitsome.c @@ -33,7 +33,7 @@ int MPIO_Waitsome(int count, MPIO_Request requests[], int *outcount, { int i, flag, err; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); if (count == 1) { MPIR_Nest_incr(); @@ -77,6 +77,6 @@ int MPIO_Waitsome(int count, MPIO_Request requests[], int *outcount, } while (*outcount == 0); fn_exit: - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return err; } diff --git a/ompi/mca/io/romio/romio/mpi-io/iread.c b/ompi/mca/io/romio/romio/mpi-io/iread.c index 85caf8cd8c..436380185b 100644 --- a/ompi/mca/io/romio/romio/mpi-io/iread.c +++ b/ompi/mca/io/romio/romio/mpi-io/iread.c @@ -68,14 +68,14 @@ static DWORD WINAPI iread_thread(LPVOID lpParameter) int MPI_File_iread(MPI_File mpi_fh, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) { - int error_code; + int error_code=MPI_SUCCESS; MPI_Status *status; #if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) iread_args *args; HANDLE hThread; #endif - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); @@ -112,6 +112,11 @@ int MPI_File_iread(MPI_File mpi_fh, void *buf, int count, /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ status->MPI_ERROR = error_code; + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(mpi_fh, error_code); + /* --END ERROR HANDLING-- */ + /* kick off the request */ MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, MPIU_Greq_cancel_fn, status, request); @@ -122,8 +127,8 @@ int MPI_File_iread(MPI_File mpi_fh, void *buf, int count, #endif MPIR_Nest_decr(); - MPID_CS_EXIT(); - return MPI_SUCCESS; + MPIU_THREAD_SINGLE_CS_EXIT("io"); + return error_code; } #else int MPI_File_iread(MPI_File mpi_fh, void *buf, int count, @@ -142,6 +147,11 @@ int MPI_File_iread(MPI_File mpi_fh, void *buf, int count, error_code = MPIOI_File_iread(mpi_fh, (MPI_Offset) 0, ADIO_INDIVIDUAL, buf, count, datatype, myname, request); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(mpi_fh, error_code); + /* --END ERROR HANDLING-- */ + #ifdef MPI_hpux HPMP_IO_END(fl_xmpi, mpi_fh, datatype, count); #endif /* MPI_hpux */ @@ -169,7 +179,7 @@ int MPIOI_File_iread(MPI_File mpi_fh, ADIO_File fh; ADIO_Offset off; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -249,9 +259,10 @@ int MPIOI_File_iread(MPI_File mpi_fh, } else ADIO_IreadStrided(fh, buf, count, datatype, file_ptr_type, offset, request, &error_code); + fn_exit: - MPID_CS_EXIT(); MPIR_Nest_decr(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/iread_at.c b/ompi/mca/io/romio/romio/mpi-io/iread_at.c index 820d3d0a59..476010ce3f 100644 --- a/ompi/mca/io/romio/romio/mpi-io/iread_at.c +++ b/ompi/mca/io/romio/romio/mpi-io/iread_at.c @@ -72,14 +72,14 @@ int MPI_File_iread_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) { - int error_code; + int error_code=MPI_SUCCESS; MPI_Status *status; #if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) iread_at_args *args; HANDLE hThread; #endif - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); @@ -118,6 +118,11 @@ int MPI_File_iread_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ status->MPI_ERROR = error_code; + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(mpi_fh, error_code); + /* --END ERROR HANDLING-- */ + /* kick off the request */ MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, MPIU_Greq_cancel_fn, status, request); @@ -127,9 +132,9 @@ int MPI_File_iread_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, #endif MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); - return MPI_SUCCESS; + return error_code; } #else int MPI_File_iread_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, @@ -150,6 +155,11 @@ int MPI_File_iread_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, error_code = MPIOI_File_iread(mpi_fh, offset, ADIO_EXPLICIT_OFFSET, buf, count, datatype, myname, request); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(mpi_fh, error_code); + /* --END ERROR HANDLING-- */ + #ifdef MPI_hpux HPMP_IO_END(fl_xmpi, mpi_fh, datatype, count); #endif /* MPI_hpux */ diff --git a/ompi/mca/io/romio/romio/mpi-io/iread_sh.c b/ompi/mca/io/romio/romio/mpi-io/iread_sh.c index 27290b80a2..262dffb362 100644 --- a/ompi/mca/io/romio/romio/mpi-io/iread_sh.c +++ b/ompi/mca/io/romio/romio/mpi-io/iread_sh.c @@ -69,7 +69,7 @@ static DWORD WINAPI iread_shared_thread(LPVOID lpParameter) int MPI_File_iread_shared(MPI_File mpi_fh, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) { - int error_code; + int error_code=MPI_SUCCESS; ADIO_File fh; MPI_Status *status; #if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) @@ -77,7 +77,7 @@ int MPI_File_iread_shared(MPI_File mpi_fh, void *buf, int count, HANDLE hThread; #endif - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -117,6 +117,11 @@ int MPI_File_iread_shared(MPI_File mpi_fh, void *buf, int count, /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ status->MPI_ERROR = error_code; + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(mpi_fh, error_code); + /* --END ERROR HANDLING-- */ + /* kick off the request */ MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, MPIU_Greq_cancel_fn, status, request); @@ -127,8 +132,8 @@ int MPI_File_iread_shared(MPI_File mpi_fh, void *buf, int count, #endif MPIR_Nest_decr(); - MPID_CS_EXIT(); - return MPI_SUCCESS; + MPIU_THREAD_SINGLE_CS_EXIT("io"); + return error_code; } #else int MPI_File_iread_shared(MPI_File mpi_fh, void *buf, int count, @@ -141,7 +146,7 @@ int MPI_File_iread_shared(MPI_File mpi_fh, void *buf, int count, ADIO_Status status; ADIO_Offset off, shared_fp; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -221,9 +226,14 @@ int MPI_File_iread_shared(MPI_File mpi_fh, void *buf, int count, shared_fp, request, &error_code); } + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } #endif diff --git a/ompi/mca/io/romio/romio/mpi-io/iwrite.c b/ompi/mca/io/romio/romio/mpi-io/iwrite.c index e5a9f8deec..6ebf76c81c 100644 --- a/ompi/mca/io/romio/romio/mpi-io/iwrite.c +++ b/ompi/mca/io/romio/romio/mpi-io/iwrite.c @@ -69,14 +69,14 @@ static DWORD WINAPI iwrite_thread(LPVOID lpParameter) int MPI_File_iwrite(MPI_File mpi_fh, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) { - int error_code; + int error_code=MPI_SUCCESS; MPI_Status *status; #if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) iwrite_args *args; HANDLE hThread; #endif - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); @@ -113,6 +113,11 @@ int MPI_File_iwrite(MPI_File mpi_fh, void *buf, int count, /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ status->MPI_ERROR = error_code; + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(mpi_fh, error_code); + /* --END ERROR HANDLING-- */ + /* kick off the request */ MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, MPIU_Greq_cancel_fn, status, request); @@ -123,11 +128,11 @@ int MPI_File_iwrite(MPI_File mpi_fh, void *buf, int count, /* FIXME: Shouldn't status be freed before leaving this function */ - MPID_CS_EXIT(); MPIR_Nest_decr(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); /* passed the buck to the blocking version...*/ - return MPI_SUCCESS; + return error_code; } #else int MPI_File_iwrite(MPI_File mpi_fh, void *buf, int count, @@ -146,6 +151,11 @@ int MPI_File_iwrite(MPI_File mpi_fh, void *buf, int count, error_code = MPIOI_File_iwrite(mpi_fh, (MPI_Offset) 0, ADIO_INDIVIDUAL, buf, count, datatype, myname, request); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(mpi_fh, error_code); + /* --END ERROR HANDLING-- */ + #ifdef MPI_hpux HPMP_IO_END(fl_xmpi, mpi_fh, datatype, count); #endif /* MPI_hpux */ @@ -173,7 +183,7 @@ int MPIOI_File_iwrite(MPI_File mpi_fh, ADIO_Offset off; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -258,8 +268,8 @@ int MPIOI_File_iwrite(MPI_File mpi_fh, offset, request, &error_code); } fn_exit: - MPID_CS_EXIT(); MPIR_Nest_decr(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/iwrite_at.c b/ompi/mca/io/romio/romio/mpi-io/iwrite_at.c index ff1a0165fb..8bbca39d88 100644 --- a/ompi/mca/io/romio/romio/mpi-io/iwrite_at.c +++ b/ompi/mca/io/romio/romio/mpi-io/iwrite_at.c @@ -72,14 +72,14 @@ int MPI_File_iwrite_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) { - int error_code; + int error_code=MPI_SUCCESS; MPI_Status *status; #if defined(HAVE_WINDOWS_H) && defined(USE_WIN_THREADED_IO) iwrite_at_args *args; HANDLE hThread; #endif - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); @@ -118,6 +118,11 @@ int MPI_File_iwrite_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, /* ROMIO-1 doesn't do anything with status.MPI_ERROR */ status->MPI_ERROR = error_code; + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(mpi_fh, error_code); + /* --END ERROR HANDLING-- */ + /* kick off the request */ MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, MPIU_Greq_cancel_fn, status, request); @@ -127,10 +132,10 @@ int MPI_File_iwrite_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, #endif MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); /* passed the buck to the blocking version...*/ - return MPI_SUCCESS; + return error_code; } #else int MPI_File_iwrite_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, @@ -154,6 +159,11 @@ int MPI_File_iwrite_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, error_code = MPIOI_File_iwrite(fh, offset, ADIO_EXPLICIT_OFFSET, buf, count, datatype, myname, request); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + #ifdef MPI_hpux HPMP_IO_END(fl_xmpi, mpi_fh, datatype, count) #endif /* MPI_hpux */ diff --git a/ompi/mca/io/romio/romio/mpi-io/iwrite_sh.c b/ompi/mca/io/romio/romio/mpi-io/iwrite_sh.c index badf046fcb..76e888684e 100644 --- a/ompi/mca/io/romio/romio/mpi-io/iwrite_sh.c +++ b/ompi/mca/io/romio/romio/mpi-io/iwrite_sh.c @@ -76,7 +76,7 @@ int MPI_File_iwrite_shared(MPI_File mpi_fh, void *buf, int count, HANDLE hThread; #endif - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); status = (MPI_Status *) ADIOI_Malloc(sizeof(MPI_Status)); @@ -123,7 +123,7 @@ int MPI_File_iwrite_shared(MPI_File mpi_fh, void *buf, int count, #endif MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); /* passed the buck to the blocking version...*/ return MPI_SUCCESS; @@ -139,7 +139,7 @@ int MPI_File_iwrite_shared(MPI_File mpi_fh, void *buf, int count, ADIO_Offset off, shared_fp; static char myname[] = "MPI_FILE_IWRITE_SHARED"; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -208,7 +208,7 @@ int MPI_File_iwrite_shared(MPI_File mpi_fh, void *buf, int count, fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/mpioimpl.h b/ompi/mca/io/romio/romio/mpi-io/mpioimpl.h index a50a20cae9..1864c3abd1 100644 --- a/ompi/mca/io/romio/romio/mpi-io/mpioimpl.h +++ b/ompi/mca/io/romio/romio/mpi-io/mpioimpl.h @@ -15,16 +15,31 @@ #include "adio.h" #include "mpio.h" +/* FIXME: We should be more restricted in what we include from MPICH2 + into ROMIO */ #ifdef ROMIO_INSIDE_MPICH2 #include "mpiimpl.h" #include "mpiimplthread.h" -#else + +/* Use the routine versions of the nest macros, to avoid requiring + access to the MPIR_Process and MPIR_Thread structures */ +#ifdef MPIR_Nest_incr +#undef MPIR_Nest_incr +#undef MPIR_Nest_decr +#endif + +void MPIR_Nest_incr_export(void); +void MPIR_Nest_decr_export(void); +#define MPIR_Nest_incr MPIR_Nest_incr_export +#define MPIR_Nest_decr MPIR_Nest_decr_export + +#else /* not ROMIO_INSIDE_MPICH2 */ /* Any MPI implementation that wishes to follow the thread-safety and error reporting features provided by MPICH2 must implement these four functions. Defining these as empty should not change the behavior of correct programs */ -#define MPID_CS_EXIT() -#define MPID_CS_ENTER() +#define MPIU_THREAD_SINGLE_CS_ENTER(_msg) +#define MPIU_THREAD_SINGLE_CS_EXIT(_msg) #define MPIR_Nest_incr() #define MPIR_Nest_decr() #ifdef HAVE_WINDOWS_H @@ -32,7 +47,7 @@ #else #define MPIU_UNREFERENCED_ARG(a) #endif -#endif +#endif /* ROMIO_INSIDE_MPICH2 */ /* info is a linked list of these structures */ struct MPIR_Info { diff --git a/ompi/mca/io/romio/romio/mpi-io/open.c b/ompi/mca/io/romio/romio/mpi-io/open.c index dabe3da880..01ab4912de 100644 --- a/ompi/mca/io/romio/romio/mpi-io/open.c +++ b/ompi/mca/io/romio/romio/mpi-io/open.c @@ -54,7 +54,7 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, HPMP_IO_OPEN_START(fl_xmpi, comm); #endif /* MPI_hpux */ - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); /* --BEGIN ERROR HANDLING-- */ @@ -63,8 +63,7 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_COMM, "**comm", 0); - error_code = MPIO_Err_return_comm(comm, error_code); - goto fn_exit; + goto fn_fail; } /* --END ERROR HANDLING-- */ @@ -75,8 +74,7 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_COMM, "**commnotintra", 0); - error_code = MPIO_Err_return_comm(comm, error_code); - goto fn_exit; + goto fn_fail; } if ( ((amode&MPI_MODE_RDONLY)?1:0) + ((amode&MPI_MODE_RDWR)?1:0) + @@ -85,8 +83,7 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_AMODE, "**fileamodeone", 0); - error_code = MPIO_Err_return_comm(comm, error_code); - goto fn_exit; + goto fn_fail; } if ((amode & MPI_MODE_RDONLY) && @@ -95,8 +92,7 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_AMODE, "**fileamoderead", 0); - error_code = MPIO_Err_return_comm(comm, error_code); - goto fn_exit; + goto fn_fail; } if ((amode & MPI_MODE_RDWR) && (amode & MPI_MODE_SEQUENTIAL)) @@ -104,8 +100,7 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_AMODE, "**fileamodeseq", 0); - error_code = MPIO_Err_return_comm(comm, error_code); - goto fn_exit; + goto fn_fail; } /* --END ERROR HANDLING-- */ @@ -132,8 +127,7 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_OTHER, "**initialized", 0); - error_code = MPIO_Err_return_comm(comm, error_code); - goto fn_exit; + goto fn_fail; } /* --END ERROR HANDLING-- */ @@ -164,8 +158,7 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, * possibly can or call MPIO_Err_setmsg. We just need to propagate * the error up. */ - error_code = MPIO_Err_return_comm(comm, error_code); - goto fn_exit; + goto fn_fail; } /* Test for invalid flags in amode. @@ -184,8 +177,7 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, myname, __LINE__, MPI_ERR_UNSUPPORTED_OPERATION, "**iosequnsupported", 0); - error_code = MPIO_Err_return_comm(comm, error_code); - goto fn_exit; + goto fn_fail; } /* --END ERROR HANDLING-- */ @@ -201,11 +193,12 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, /* use default values for disp, etype, filetype */ *fh = ADIO_Open(comm, dupcomm, filename, file_system, fsops, amode, 0, - MPI_BYTE, MPI_BYTE, 0, info, ADIO_PERM_NULL, &error_code); + MPI_BYTE, MPI_BYTE, info, ADIO_PERM_NULL, &error_code); /* --BEGIN ERROR HANDLING-- */ if (error_code != MPI_SUCCESS) { MPI_Comm_free(&dupcomm); + goto fn_fail; } /* --END ERROR HANDLING-- */ @@ -223,7 +216,7 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, indiv. file pointer already set to end of file in ADIO_Open. Here file view is just bytes. */ if ((*fh)->access_mode & MPI_MODE_APPEND) { - if ((*fh)->io_worker) /* only one person need set the sharedfp */ + if (rank == (*fh)->hints->ranklist[0]) /* only one person need set the sharedfp */ ADIO_Set_shared_fp(*fh, (*fh)->fp_ind, &error_code); MPI_Barrier(dupcomm); } @@ -233,8 +226,15 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, HPMP_IO_OPEN_END(fl_xmpi, *fh, comm); #endif /* MPI_hpux */ -fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + +fn_exit: + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; +fn_fail: + /* --BEGIN ERROR HANDLING-- */ + MPIR_Nest_decr(); + error_code = MPIO_Err_return_file(MPI_FILE_NULL, error_code); + goto fn_exit; + /* --END ERROR HANDLING-- */ } diff --git a/ompi/mca/io/romio/romio/mpi-io/prealloc.c b/ompi/mca/io/romio/romio/mpi-io/prealloc.c index 1579ee75e5..d34fcbb4b9 100644 --- a/ompi/mca/io/romio/romio/mpi-io/prealloc.c +++ b/ompi/mca/io/romio/romio/mpi-io/prealloc.c @@ -46,7 +46,7 @@ int MPI_File_preallocate(MPI_File mpi_fh, MPI_Offset size) fh, MPI_DATATYPE_NULL, -1); #endif /* MPI_hpux */ - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -84,6 +84,10 @@ int MPI_File_preallocate(MPI_File mpi_fh, MPI_Offset size) fcntl_struct->diskspace = size; ADIO_Fcntl(fh, ADIO_FCNTL_SET_DISKSPACE, fcntl_struct, &error_code); ADIOI_Free(fcntl_struct); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ } MPI_Barrier(fh->comm); @@ -94,7 +98,7 @@ int MPI_File_preallocate(MPI_File mpi_fh, MPI_Offset size) fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); /* TODO: bcast result? */ if (!mynod) return error_code; diff --git a/ompi/mca/io/romio/romio/mpi-io/read.c b/ompi/mca/io/romio/romio/mpi-io/read.c index 3343d10591..0581ff3be3 100644 --- a/ompi/mca/io/romio/romio/mpi-io/read.c +++ b/ompi/mca/io/romio/romio/mpi-io/read.c @@ -75,7 +75,7 @@ int MPIOI_File_read(MPI_File mpi_fh, ADIO_File fh; ADIO_Offset off; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -153,9 +153,14 @@ int MPIOI_File_read(MPI_File mpi_fh, /* For strided and atomic mode, locking is done in ADIO_ReadStrided */ } + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/read_all.c b/ompi/mca/io/romio/romio/mpi-io/read_all.c index 87f8972bc5..1aa271b48a 100644 --- a/ompi/mca/io/romio/romio/mpi-io/read_all.c +++ b/ompi/mca/io/romio/romio/mpi-io/read_all.c @@ -75,7 +75,7 @@ int MPIOI_File_read_all(MPI_File mpi_fh, int error_code, datatype_size; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -105,9 +105,15 @@ int MPIOI_File_read_all(MPI_File mpi_fh, ADIO_ReadStridedColl(fh, buf, count, datatype, file_ptr_type, offset, status, &error_code); + + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT() + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/read_allb.c b/ompi/mca/io/romio/romio/mpi-io/read_allb.c index 8f55884dad..6622618d87 100644 --- a/ompi/mca/io/romio/romio/mpi-io/read_allb.c +++ b/ompi/mca/io/romio/romio/mpi-io/read_allb.c @@ -62,7 +62,7 @@ int MPIOI_File_read_all_begin(MPI_File mpi_fh, int error_code, datatype_size; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -102,9 +102,15 @@ int MPIOI_File_read_all_begin(MPI_File mpi_fh, ADIO_ReadStridedColl(fh, buf, count, datatype, file_ptr_type, offset, &fh->split_status, &error_code); + + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/read_alle.c b/ompi/mca/io/romio/romio/mpi-io/read_alle.c index 78bbc002a4..2fb6dcb90d 100644 --- a/ompi/mca/io/romio/romio/mpi-io/read_alle.c +++ b/ompi/mca/io/romio/romio/mpi-io/read_alle.c @@ -58,7 +58,7 @@ int MPIOI_File_read_all_end(MPI_File mpi_fh, MPIU_UNREFERENCED_ARG(buf); - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -83,7 +83,7 @@ int MPIOI_File_read_all_end(MPI_File mpi_fh, fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return MPI_SUCCESS; } diff --git a/ompi/mca/io/romio/romio/mpi-io/read_at.c b/ompi/mca/io/romio/romio/mpi-io/read_at.c index d1a4eac688..d30e97ea52 100644 --- a/ompi/mca/io/romio/romio/mpi-io/read_at.c +++ b/ompi/mca/io/romio/romio/mpi-io/read_at.c @@ -51,7 +51,6 @@ int MPI_File_read_at(MPI_File mpi_fh, MPI_Offset offset, void *buf, count); #endif /* MPI_hpux */ - /* ADIOI_File_read() defined in mpi-io/read.c */ error_code = MPIOI_File_read(mpi_fh, offset, ADIO_EXPLICIT_OFFSET, buf, count, datatype, myname, status); diff --git a/ompi/mca/io/romio/romio/mpi-io/read_ord.c b/ompi/mca/io/romio/romio/mpi-io/read_ord.c index 854b92f93d..826d11ab6e 100644 --- a/ompi/mca/io/romio/romio/mpi-io/read_ord.c +++ b/ompi/mca/io/romio/romio/mpi-io/read_ord.c @@ -48,7 +48,7 @@ int MPI_File_read_ordered(MPI_File mpi_fh, void *buf, int count, ADIO_Offset shared_fp=0; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -93,9 +93,14 @@ int MPI_File_read_ordered(MPI_File mpi_fh, void *buf, int count, ADIO_ReadStridedColl(fh, buf, count, datatype, ADIO_EXPLICIT_OFFSET, shared_fp, status, &error_code); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); /* FIXME: Check for error code from ReadStridedColl? */ return error_code; diff --git a/ompi/mca/io/romio/romio/mpi-io/read_ordb.c b/ompi/mca/io/romio/romio/mpi-io/read_ordb.c index 4aa05cfcae..0d3386ccac 100644 --- a/ompi/mca/io/romio/romio/mpi-io/read_ordb.c +++ b/ompi/mca/io/romio/romio/mpi-io/read_ordb.c @@ -45,7 +45,7 @@ int MPI_File_read_ordered_begin(MPI_File mpi_fh, void *buf, int count, ADIO_File fh; static char myname[] = "MPI_FILE_READ_ORDERED_BEGIN"; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -101,9 +101,14 @@ int MPI_File_read_ordered_begin(MPI_File mpi_fh, void *buf, int count, ADIO_ReadStridedColl(fh, buf, count, datatype, ADIO_EXPLICIT_OFFSET, shared_fp, &fh->split_status, &error_code); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/read_orde.c b/ompi/mca/io/romio/romio/mpi-io/read_orde.c index bed42cee03..0d27799932 100644 --- a/ompi/mca/io/romio/romio/mpi-io/read_orde.c +++ b/ompi/mca/io/romio/romio/mpi-io/read_orde.c @@ -37,13 +37,13 @@ Output Parameters: @*/ int MPI_File_read_ordered_end(MPI_File mpi_fh, void *buf, MPI_Status *status) { - int error_code; + int error_code=MPI_SUCCESS; ADIO_File fh; static char myname[] = "MPI_FILE_READ_ORDERED_END"; MPIU_UNREFERENCED_ARG(buf); - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); fh = MPIO_File_resolve(mpi_fh); @@ -67,7 +67,7 @@ int MPI_File_read_ordered_end(MPI_File mpi_fh, void *buf, MPI_Status *status) fh->split_coll_count = 0; fn_exit: - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); - return MPI_SUCCESS; + return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/read_sh.c b/ompi/mca/io/romio/romio/mpi-io/read_sh.c index 4ae2dcda65..b2507bfcd2 100644 --- a/ompi/mca/io/romio/romio/mpi-io/read_sh.c +++ b/ompi/mca/io/romio/romio/mpi-io/read_sh.c @@ -48,7 +48,7 @@ int MPI_File_read_shared(MPI_File mpi_fh, void *buf, int count, ADIO_Offset off, shared_fp; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -118,9 +118,14 @@ int MPI_File_read_shared(MPI_File mpi_fh, void *buf, int count, /* For strided and atomic mode, locking is done in ADIO_ReadStrided */ } + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + fn_exit: - MPID_CS_EXIT(); MPIR_Nest_decr(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/register_datarep.c b/ompi/mca/io/romio/romio/mpi-io/register_datarep.c index 71fa15779b..1150c3984d 100644 --- a/ompi/mca/io/romio/romio/mpi-io/register_datarep.c +++ b/ompi/mca/io/romio/romio/mpi-io/register_datarep.c @@ -60,7 +60,7 @@ int MPI_Register_datarep(char *name, ADIOI_Datarep *datarep; static char myname[] = "MPI_REGISTER_DATAREP"; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); /* --BEGIN ERROR HANDLING-- */ /* check datarep name (use strlen instead of strnlen because @@ -156,7 +156,7 @@ int MPI_Register_datarep(char *name, error_code = MPI_SUCCESS; fn_exit: - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/seek.c b/ompi/mca/io/romio/romio/mpi-io/seek.c index c0e8caed47..46b27bcce6 100644 --- a/ompi/mca/io/romio/romio/mpi-io/seek.c +++ b/ompi/mca/io/romio/romio/mpi-io/seek.c @@ -47,7 +47,7 @@ int MPI_File_seek(MPI_File mpi_fh, MPI_Offset offset, int whence) HPMP_IO_START(fl_xmpi, BLKMPIFILESEEK, TRDTBLOCK, fh, MPI_DATATYPE_NULL, -1); #endif /* MPI_hpux */ - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -121,6 +121,11 @@ int MPI_File_seek(MPI_File mpi_fh, MPI_Offset offset, int whence) ADIO_SeekIndividual(fh, offset, ADIO_SEEK_SET, &error_code); /* TODO: what do we do with this error? */ + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + #ifdef MPI_hpux HPMP_IO_END(fl_xmpi, fh, MPI_DATATYPE_NULL, -1); #endif /* MPI_hpux */ @@ -129,6 +134,6 @@ int MPI_File_seek(MPI_File mpi_fh, MPI_Offset offset, int whence) fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/seek_sh.c b/ompi/mca/io/romio/romio/mpi-io/seek_sh.c index ea1a8a16a1..afeeb6bdb4 100644 --- a/ompi/mca/io/romio/romio/mpi-io/seek_sh.c +++ b/ompi/mca/io/romio/romio/mpi-io/seek_sh.c @@ -39,7 +39,7 @@ int MPI_File_seek_shared(MPI_File mpi_fh, MPI_Offset offset, int whence) MPI_Offset curr_offset, eof_offset, tmp_offset; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -177,8 +177,8 @@ int MPI_File_seek_shared(MPI_File mpi_fh, MPI_Offset offset, int whence) error_code = MPI_SUCCESS; fn_exit: - MPID_CS_EXIT(); MPIR_Nest_decr(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/set_atom.c b/ompi/mca/io/romio/romio/mpi-io/set_atom.c index 317fe267a3..d4faf19e5f 100644 --- a/ompi/mca/io/romio/romio/mpi-io/set_atom.c +++ b/ompi/mca/io/romio/romio/mpi-io/set_atom.c @@ -39,7 +39,7 @@ int MPI_File_set_atomicity(MPI_File mpi_fh, int flag) ADIO_Fcntl_t *fcntl_struct; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -77,10 +77,15 @@ int MPI_File_set_atomicity(MPI_File mpi_fh, int flag) ADIO_Fcntl(fh, ADIO_FCNTL_SET_ATOMICITY, fcntl_struct, &error_code); /* TODO: what do we do with this error code? */ + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + ADIOI_Free(fcntl_struct); fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/set_errh.c b/ompi/mca/io/romio/romio/mpi-io/set_errh.c index 994a170bd5..51727d92ea 100644 --- a/ompi/mca/io/romio/romio/mpi-io/set_errh.c +++ b/ompi/mca/io/romio/romio/mpi-io/set_errh.c @@ -39,7 +39,7 @@ int MPI_File_set_errhandler(MPI_File mpi_fh, MPI_Errhandler errhandler) static char myname[] = "MPI_FILE_SET_ERRHANDLER"; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); if (mpi_fh == MPI_FILE_NULL) { ADIOI_DFLT_ERR_HANDLER = errhandler; @@ -68,6 +68,6 @@ int MPI_File_set_errhandler(MPI_File mpi_fh, MPI_Errhandler errhandler) } fn_exit: - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/set_info.c b/ompi/mca/io/romio/romio/mpi-io/set_info.c index a4a7ce1a82..751f46ebd0 100644 --- a/ompi/mca/io/romio/romio/mpi-io/set_info.c +++ b/ompi/mca/io/romio/romio/mpi-io/set_info.c @@ -38,7 +38,7 @@ int MPI_File_set_info(MPI_File mpi_fh, MPI_Info info) static char myname[] = "MPI_FILE_SET_INFO"; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -51,9 +51,14 @@ int MPI_File_set_info(MPI_File mpi_fh, MPI_Info info) ADIO_SetInfo(fh, info, &error_code); /* TODO: what to do with error code? */ + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/set_size.c b/ompi/mca/io/romio/romio/mpi-io/set_size.c index cfd9dc6fbe..0fa9654266 100644 --- a/ompi/mca/io/romio/romio/mpi-io/set_size.c +++ b/ompi/mca/io/romio/romio/mpi-io/set_size.c @@ -46,13 +46,14 @@ int MPI_File_set_size(MPI_File mpi_fh, MPI_Offset size) MPI_DATATYPE_NULL, -1); #endif /* MPI_hpux */ - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); /* --BEGIN ERROR HANDLING-- */ MPIO_CHECK_FILE_HANDLE(fh, myname, error_code); + MPIO_CHECK_NOT_SEQUENTIAL_MODE(fh, myname, error_code); if (size < 0) { error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, @@ -81,13 +82,18 @@ int MPI_File_set_size(MPI_File mpi_fh, MPI_Offset size) ADIO_Resize(fh, size, &error_code); /* TODO: what to do with error code? */ + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + #ifdef MPI_hpux HPMP_IO_END(fl_xmpi, fh, MPI_DATATYPE_NULL, -1); #endif /* MPI_hpux */ fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/set_view.c b/ompi/mca/io/romio/romio/mpi-io/set_view.c index 2824d0fafa..eda02b2288 100644 --- a/ompi/mca/io/romio/romio/mpi-io/set_view.c +++ b/ompi/mca/io/romio/romio/mpi-io/set_view.c @@ -44,7 +44,7 @@ int MPI_File_set_view(MPI_File mpi_fh, MPI_Offset disp, MPI_Datatype etype, ADIO_Offset shared_fp, byte_off; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -137,6 +137,13 @@ int MPI_File_set_view(MPI_File mpi_fh, MPI_Offset disp, MPI_Datatype etype, ADIO_Set_view(fh, disp, etype, filetype, info, &error_code); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) { + error_code = MPIO_Err_return_file(fh, error_code); + goto fn_exit; + } + /* --END ERROR HANDLING-- */ + /* reset shared file pointer to zero */ if ((fh->file_system != ADIO_PIOFS) && (fh->file_system != ADIO_PVFS) && @@ -153,6 +160,10 @@ int MPI_File_set_view(MPI_File mpi_fh, MPI_Offset disp, MPI_Datatype etype, stored in bytes. */ ADIO_Set_shared_fp(fh, 0, &error_code); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ } if ((fh->file_system != ADIO_PIOFS) && @@ -164,7 +175,7 @@ int MPI_File_set_view(MPI_File mpi_fh, MPI_Offset disp, MPI_Datatype etype, fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/write.c b/ompi/mca/io/romio/romio/mpi-io/write.c index a2fa94070a..9ba2befa17 100644 --- a/ompi/mca/io/romio/romio/mpi-io/write.c +++ b/ompi/mca/io/romio/romio/mpi-io/write.c @@ -75,7 +75,7 @@ int MPIOI_File_write(MPI_File mpi_fh, ADIO_Offset off; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -157,9 +157,14 @@ int MPIOI_File_write(MPI_File mpi_fh, offset, status, &error_code); } + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/write_all.c b/ompi/mca/io/romio/romio/mpi-io/write_all.c index 121b22bdef..4ced9d4be1 100644 --- a/ompi/mca/io/romio/romio/mpi-io/write_all.c +++ b/ompi/mca/io/romio/romio/mpi-io/write_all.c @@ -75,7 +75,7 @@ int MPIOI_File_write_all(MPI_File mpi_fh, int error_code, datatype_size; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -105,9 +105,15 @@ int MPIOI_File_write_all(MPI_File mpi_fh, ADIO_WriteStridedColl(fh, buf, count, datatype, file_ptr_type, offset, status, &error_code); + + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/write_allb.c b/ompi/mca/io/romio/romio/mpi-io/write_allb.c index 78651b1590..4559f9eed6 100644 --- a/ompi/mca/io/romio/romio/mpi-io/write_allb.c +++ b/ompi/mca/io/romio/romio/mpi-io/write_allb.c @@ -61,7 +61,7 @@ int MPIOI_File_write_all_begin(MPI_File mpi_fh, int error_code, datatype_size; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -101,9 +101,15 @@ int MPIOI_File_write_all_begin(MPI_File mpi_fh, fh->split_datatype = datatype; ADIO_WriteStridedColl(fh, buf, count, datatype, file_ptr_type, offset, &fh->split_status, &error_code); + + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/write_alle.c b/ompi/mca/io/romio/romio/mpi-io/write_alle.c index e63d94c4fd..c1352c99b0 100644 --- a/ompi/mca/io/romio/romio/mpi-io/write_alle.c +++ b/ompi/mca/io/romio/romio/mpi-io/write_alle.c @@ -57,7 +57,7 @@ int MPIOI_File_write_all_end(MPI_File mpi_fh, MPIU_UNREFERENCED_ARG(buf); - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -88,7 +88,7 @@ int MPIOI_File_write_all_end(MPI_File mpi_fh, fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi-io/write_atall.c b/ompi/mca/io/romio/romio/mpi-io/write_atall.c index 78df6fec07..0987df45b2 100644 --- a/ompi/mca/io/romio/romio/mpi-io/write_atall.c +++ b/ompi/mca/io/romio/romio/mpi-io/write_atall.c @@ -55,7 +55,6 @@ int MPI_File_write_at_all(MPI_File mpi_fh, MPI_Offset offset, void *buf, error_code = MPIOI_File_write_all(mpi_fh, offset, ADIO_EXPLICIT_OFFSET, buf, count, datatype, myname, status); - #ifdef MPI_hpux HPMP_IO_END(fl_xmpi, fh, datatype, count); #endif /* MPI_hpux */ diff --git a/ompi/mca/io/romio/romio/mpi-io/write_ord.c b/ompi/mca/io/romio/romio/mpi-io/write_ord.c index 7931e9e0e1..ad3d6cf7c2 100644 --- a/ompi/mca/io/romio/romio/mpi-io/write_ord.c +++ b/ompi/mca/io/romio/romio/mpi-io/write_ord.c @@ -48,7 +48,7 @@ int MPI_File_write_ordered(MPI_File mpi_fh, void *buf, int count, ADIO_Offset shared_fp; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -95,9 +95,15 @@ int MPI_File_write_ordered(MPI_File mpi_fh, void *buf, int count, ADIO_WriteStridedColl(fh, buf, count, datatype, ADIO_EXPLICIT_OFFSET, shared_fp, status, &error_code); + + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); /* FIXME: Check for error code from WriteStridedColl? */ return error_code; diff --git a/ompi/mca/io/romio/romio/mpi-io/write_ordb.c b/ompi/mca/io/romio/romio/mpi-io/write_ordb.c index 578ffa848f..7253d32d83 100644 --- a/ompi/mca/io/romio/romio/mpi-io/write_ordb.c +++ b/ompi/mca/io/romio/romio/mpi-io/write_ordb.c @@ -45,7 +45,7 @@ int MPI_File_write_ordered_begin(MPI_File mpi_fh, void *buf, int count, ADIO_Offset shared_fp; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -103,9 +103,14 @@ int MPI_File_write_ordered_begin(MPI_File mpi_fh, void *buf, int count, ADIO_WriteStridedColl(fh, buf, count, datatype, ADIO_EXPLICIT_OFFSET, shared_fp, &fh->split_status, &error_code); + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); /* FIXME: Check for error code from WriteStridedColl? */ return error_code; diff --git a/ompi/mca/io/romio/romio/mpi-io/write_orde.c b/ompi/mca/io/romio/romio/mpi-io/write_orde.c index d0b86f2006..af894880ef 100644 --- a/ompi/mca/io/romio/romio/mpi-io/write_orde.c +++ b/ompi/mca/io/romio/romio/mpi-io/write_orde.c @@ -43,7 +43,7 @@ int MPI_File_write_ordered_end(MPI_File mpi_fh, void *buf, MPI_Status *status) MPIU_UNREFERENCED_ARG(buf); - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); fh = MPIO_File_resolve(mpi_fh); @@ -68,6 +68,6 @@ int MPI_File_write_ordered_end(MPI_File mpi_fh, void *buf, MPI_Status *status) fn_exit: - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return MPI_SUCCESS; } diff --git a/ompi/mca/io/romio/romio/mpi-io/write_sh.c b/ompi/mca/io/romio/romio/mpi-io/write_sh.c index 48cb4611f3..47fd9cdd6d 100644 --- a/ompi/mca/io/romio/romio/mpi-io/write_sh.c +++ b/ompi/mca/io/romio/romio/mpi-io/write_sh.c @@ -48,7 +48,7 @@ int MPI_File_write_shared(MPI_File mpi_fh, void *buf, int count, ADIO_Offset off, shared_fp; ADIO_File fh; - MPID_CS_ENTER(); + MPIU_THREAD_SINGLE_CS_ENTER("io"); MPIR_Nest_incr(); fh = MPIO_File_resolve(mpi_fh); @@ -118,8 +118,13 @@ int MPI_File_write_shared(MPI_File mpi_fh, void *buf, int count, /* For strided and atomic mode, locking is done in ADIO_WriteStrided */ } + /* --BEGIN ERROR HANDLING-- */ + if (error_code != MPI_SUCCESS) + error_code = MPIO_Err_return_file(fh, error_code); + /* --END ERROR HANDLING-- */ + fn_exit: MPIR_Nest_decr(); - MPID_CS_EXIT(); + MPIU_THREAD_SINGLE_CS_EXIT("io"); return error_code; } diff --git a/ompi/mca/io/romio/romio/mpi2-other/array/.cvsignore b/ompi/mca/io/romio/romio/mpi2-other/array/.cvsignore new file mode 100644 index 0000000000..60c6ae3c29 --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi2-other/array/.cvsignore @@ -0,0 +1,6 @@ +Makefile +.deps +.libs +.libstamp* +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/mpi2-other/array/.state-cache b/ompi/mca/io/romio/romio/mpi2-other/array/.state-cache new file mode 100644 index 0000000000..098a86a4d8 --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi2-other/array/.state-cache @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/mpi2-other/array/fortran/.cvsignore b/ompi/mca/io/romio/romio/mpi2-other/array/fortran/.cvsignore new file mode 100644 index 0000000000..60c6ae3c29 --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi2-other/array/fortran/.cvsignore @@ -0,0 +1,6 @@ +Makefile +.deps +.libs +.libstamp* +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/mpi2-other/array/fortran/.state-cache b/ompi/mca/io/romio/romio/mpi2-other/array/fortran/.state-cache new file mode 100644 index 0000000000..cb56597056 --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi2-other/array/fortran/.state-cache @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/mpi2-other/info/.cvsignore b/ompi/mca/io/romio/romio/mpi2-other/info/.cvsignore new file mode 100644 index 0000000000..60c6ae3c29 --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi2-other/info/.cvsignore @@ -0,0 +1,6 @@ +Makefile +.deps +.libs +.libstamp* +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/mpi2-other/info/.state-cache b/ompi/mca/io/romio/romio/mpi2-other/info/.state-cache new file mode 100644 index 0000000000..ed093d7da9 --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi2-other/info/.state-cache @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/mpi2-other/info/fortran/.cvsignore b/ompi/mca/io/romio/romio/mpi2-other/info/fortran/.cvsignore new file mode 100644 index 0000000000..60c6ae3c29 --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi2-other/info/fortran/.cvsignore @@ -0,0 +1,6 @@ +Makefile +.deps +.libs +.libstamp* +*.lo +.*-cache diff --git a/ompi/mca/io/romio/romio/mpi2-other/info/fortran/.state-cache b/ompi/mca/io/romio/romio/mpi2-other/info/fortran/.state-cache new file mode 100644 index 0000000000..964dba3cf3 --- /dev/null +++ b/ompi/mca/io/romio/romio/mpi2-other/info/fortran/.state-cache @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/test/.cvsignore b/ompi/mca/io/romio/romio/test/.cvsignore new file mode 100644 index 0000000000..80dde7c15f --- /dev/null +++ b/ompi/mca/io/romio/romio/test/.cvsignore @@ -0,0 +1,12 @@ +Makefile +runtests +misc.c +fmisc.f +large_file.c +fcoll_test.f +fperf.f +pfcoll_test.f +*.out +romiotests +.deps +.*-cache diff --git a/ompi/mca/io/romio/romio/test/.state-cache b/ompi/mca/io/romio/romio/test/.state-cache new file mode 100644 index 0000000000..7c8e85db96 --- /dev/null +++ b/ompi/mca/io/romio/romio/test/.state-cache @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ompi/mca/io/romio/romio/test/Makefile.in b/ompi/mca/io/romio/romio/test/Makefile.in index 2a8b1a739f..c282d884d2 100644 --- a/ompi/mca/io/romio/romio/test/Makefile.in +++ b/ompi/mca/io/romio/romio/test/Makefile.in @@ -2,7 +2,7 @@ CC = @TEST_CC@ F77 = @TEST_F77@ INCLUDE_DIR = @ROMIO_INCLUDE@ # because := is not universally avalible, we have to play games to use the -# user-specificed LDFLAGS and OUR_LIBS env. variables (if set) +# user-specified LDFLAGS and OUR_LIBS env. variables (if set) OUR_LIBS = @TEST_LIBNAME@ @MPI_LIB@ @ROMIO_LIBLIST@ ${LDFLAGS} ${LIBS} USER_CFLAGS = @CPPFLAGS@ @USER_CFLAGS@ $(INCLUDE_DIR) USER_FFLAGS = @CPPFLAGS@ @USER_FFLAGS@ $(INCLUDE_DIR) @@ -35,31 +35,6 @@ clean: rm -f $(CTESTS) $(FTESTS) @-rm -f work.pc work.pcl -simple: simple.o -psimple: psimple.o -perf: perf.o -excl: excl.o -status: status.o -async: async.o -atomicity: atomicity.o -coll_test: coll_test.o -coll_perf: coll_perf.o -misc: misc.o -noncontig: noncontig.o -i_noncontig: i_noncontig.o -noncontig_coll: noncontig_coll.o -noncontig_coll2: noncontig_coll2.o -file_info: file_info.o -error: error.o -shared_fp: shared_fp.o -split_coll: split_coll.o -#fperf: fperf.o -#fcoll_test: fcoll_test.o -#pfcoll_test: pfcoll_test.o -#fmisc: fmisc.o -large_file: large_file.o -large_array: large_array.o - # # The Fortran tests must be built with the Fortran linker fperf: fperf.o @@ -78,4 +53,5 @@ pfcoll_test: pfcoll_test.o # -./runtests $(TESTARGS) cleanall: - -@rm -f .P* PI* misc.c large_file.c fcoll_test.f fmisc.f fperf.f \mpif.h simple async coll_test coll_perf misc perf fcoll_test fperf fmisc file_info excl large_array large_file noncontig i_noncontig noncontig_coll atomicity *.out runtests pfcoll_test.f pfcoll_test noncontig_coll2 + -@rm -f .P* PI* misc.c large_file.c fcoll_test.f fmisc.f fperf.f \ + mpif.h $(CTESTS) $(FTESTS) *.out runtests pfcoll_test.f diff --git a/ompi/mca/io/romio/romio/test/Mfile.in b/ompi/mca/io/romio/romio/test/Mfile.in index 772f970032..c2e1c29825 100644 --- a/ompi/mca/io/romio/romio/test/Mfile.in +++ b/ompi/mca/io/romio/romio/test/Mfile.in @@ -68,11 +68,11 @@ pfcoll_test: pfcoll_test.f # # Make sure that we remove executables for specific architectures clean: - @-/bin/rm -f *.o *~ PI* $(EXECS) *.out core pt2pt.diff $(OTHEREXECS) \ + @-rm -f *.o *~ PI* $(EXECS) *.out core pt2pt.diff $(OTHEREXECS) \ *.trace rdb.* startup.* mpif.h ${srcdir}/*.o *.stdo @-rm -f work.pc work.pcl @-for file in $(EXECS) Makefile ; do \ - /bin/rm -f $$file.sun4 $$file.alpha $$file.IRIX $$file.freebsd ;\ + rm -f $$file.sun4 $$file.alpha $$file.IRIX $$file.freebsd ;\ done .c: $(CC) $(CFLAGS) -o $* $< $(LIBS) diff --git a/ompi/mca/io/romio/romio/test/file_info.c b/ompi/mca/io/romio/romio/test/file_info.c index 845ee7bf43..1a6141c3a2 100644 --- a/ompi/mca/io/romio/romio/test/file_info.c +++ b/ompi/mca/io/romio/romio/test/file_info.c @@ -8,7 +8,8 @@ #include #include -static int verbose = 0; +/* Set verbose to 0 only if you want no information about any failure */ +static int verbose = 1; int main(int argc, char **argv) { @@ -168,7 +169,7 @@ int main(int argc, char **argv) MPI_Info_set(info, "cb_buffer_size", "8388608"); /* number of processes that actually perform I/O in collective I/O */ - sprintf(value, "%d", nprocs/2 ? 0 : 1); + sprintf(value, "%d", nprocs/2); MPI_Info_set(info, "cb_nodes", value); /* buffer size for data sieving in independent reads */ @@ -261,10 +262,10 @@ int main(int argc, char **argv) } } else if (!strcmp("cb_nodes", key)) { - if (atoi(value) != nprocs/2 ? 0 : 1) { + if (atoi(value) != (nprocs/2)) { errs++; if (verbose) fprintf(stderr, "cb_nodes is %d; should be %d\n", atoi(value), - nprocs/2 ? 0 : 1); + nprocs/2); } } else if (!strcmp("romio_no_indep_rw", key)) { diff --git a/ompi/mca/io/romio/romio/test/pfcoll_test.f.in b/ompi/mca/io/romio/romio/test/pfcoll_test.f.in index 17a9e8794a..975ccd0b98 100644 --- a/ompi/mca/io/romio/romio/test/pfcoll_test.f.in +++ b/ompi/mca/io/romio/romio/test/pfcoll_test.f.in @@ -149,7 +149,7 @@ ! check the data read do i=1, bufcount if (readbuf(i) .ne. writebuf(i)) then - errs = errs + 1 + errs = errs + 1 print *, 'Node ', mynod, ' readbuf ', readbuf(i), & & ' writebuf ', writebuf(i), ' i', i end if diff --git a/ompi/mca/io/romio/romio/test/runtests.in b/ompi/mca/io/romio/romio/test/runtests.in index fd93a18870..104ea8e6be 100644 --- a/ompi/mca/io/romio/romio/test/runtests.in +++ b/ompi/mca/io/romio/romio/test/runtests.in @@ -83,7 +83,7 @@ MakeExe() { # CleanExe program-name CleanExe() { if [ $makeeach = 1 ] ; then - /bin/rm -f $1 $1.o + rm -f $1 $1.o fi } # Output marker @@ -362,7 +362,7 @@ else fi # # echo '*** Checking for differences from expected output ***' -# /bin/rm -f iotests.diff +# rm -f iotests.diff # nodiff=1 # for file in $testfiles ; do # stdfile="${srcdir}/std/`basename $file .out`.std" diff --git a/ompi/mca/io/romio/romio/util/.cvsignore b/ompi/mca/io/romio/romio/util/.cvsignore new file mode 100644 index 0000000000..4284cb7b4d --- /dev/null +++ b/ompi/mca/io/romio/romio/util/.cvsignore @@ -0,0 +1,3 @@ +romioinstall +.deps +.*-cache diff --git a/ompi/mca/io/romio/romio/util/.state-cache b/ompi/mca/io/romio/romio/util/.state-cache new file mode 100644 index 0000000000..3ba81b4a15 --- /dev/null +++ b/ompi/mca/io/romio/romio/util/.state-cache @@ -0,0 +1,7 @@ + + + + + + +