Skip to content
This repository has been archived by the owner on Feb 24, 2018. It is now read-only.

test->filePerProc is ignored in MPIIO_GetFileSize #33

Open
artemyvo opened this issue Oct 5, 2017 · 0 comments
Open

test->filePerProc is ignored in MPIIO_GetFileSize #33

artemyvo opened this issue Oct 5, 2017 · 0 comments

Comments

@artemyvo
Copy link

artemyvo commented Oct 5, 2017

At line 433:
MPI_CHECK(MPI_File_open(testComm, testFileName, MPI_MODE_RDONLY, MPI_INFO_NULL, &fd), "cannot open file to get file size");
Always passes testComm to MPI_File_open regardless of value of test->filePerProc
When running in file per proc it breaks after initial file inflation.

Should be something like

IOR_offset_t MPIIO_GetFileSize(IOR_param_t * test, MPI_Comm testComm,
                               char *testFileName)
{
        IOR_offset_t aggFileSizeFromStat, tmpMin, tmpMax, tmpSum;
        MPI_File fd;
        MPI_Comm comm = testComm;

        if (test->filePerProc == TRUE)
                comm = MPI_COMM_SELF;

        MPI_CHECK(MPI_File_open(comm, testFileName, MPI_MODE_RDONLY,
                                MPI_INFO_NULL, &fd),
                  "cannot open file to get file size");
        MPI_CHECK(MPI_File_get_size(fd, (MPI_Offset *) & aggFileSizeFromStat),
                  "cannot get file size");

or maybe having the if below that re-arranged with opening file inside it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant