Skip to content

Conversation

edgargabriel
Copy link
Member

this fixes the issue reported by Nicolas Joly on the mailing: the sharedfp/lockedfile component does not support right now a scenario where multiple jobs read from the same input file, due to a collision of the filenames utilized for the sharedfp handle. Although not part of the oroginal report, the same occurs for the sharedfp/sm component. Add therefore the jobid to be part of the lockedfilename/sm file name.

Fixes: #3098

Signed-off-by: Edgar Gabriel [email protected]

@edgargabriel edgargabriel force-pushed the pr/sharedfp-name-collision-fix branch from 36fd37b to cf08409 Compare March 5, 2017 14:19
if ( 0 == comm->c_my_rank ) {
ompi_proc_t *masterproc = ompi_group_peer_lookup(comm->c_local_group, 0 );
opal_process_name_t *mastername = &(masterproc->super.proc_name);
masterjobid = mastername->jobid;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the "correct" way to get the jobid involves using a macro:

    OMPI_CAST_RTE_NAME(&proc->super.proc_name)->jobid = jobid;

Other than that, this should be fine.

this fixes the issue reported by Nicolas Joly on the mailing: the sharedfp/lockedfile component does not support right now a scenario where multiple jobs read from the same input file, due to a collision of the filenames utilized for the sharedfp handle. Although not part of the oroginal report, the same occurs for the sharedfp/sm component. Add therefore the jobid to be part of the lockedfilename/sm file name.

use the OMPI_CAST_RTE_NAME macro to determine jobid

Fixes: open-mpi#3098

Signed-off-by: Edgar Gabriel <[email protected]>
@edgargabriel edgargabriel force-pushed the pr/sharedfp-name-collision-fix branch from cf08409 to 2d462b3 Compare March 5, 2017 17:29
@edgargabriel
Copy link
Member Author

Thanks Ralph, I incorporated your suggestion.

Copy link
Contributor

@rhc54 rhc54 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - thanks!

@edgargabriel edgargabriel merged commit 607dc2c into open-mpi:master Mar 5, 2017
@edgargabriel edgargabriel deleted the pr/sharedfp-name-collision-fix branch March 5, 2017 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sharedfp:lockedfile: add support for multiple jobs using the same file
2 participants