Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sharedfp_sm_file_component_query: add file open to ensure correct ope… #9784

Merged
merged 1 commit into from
Dec 22, 2021

Conversation

edgargabriel
Copy link
Member

…rations

try to actually open the sharedfp/sm file during the query operation to ensure
that the component can actually run. This is based on some reports on the mailing list that
the sharedfp/sm operation causes problems in certain circumstances.

Fixes issue #9656

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

char *filename_basename = basename((char*)fh->f_filename);

/* format is "%s/%s_cid-%d-%d.sm", see below */
int sm_filename_length = strlen(ompi_process_info.job_session_dir) + 1 + strlen(filename_basename) + 5 + (3*sizeof(uint32_t)+1) + 4;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just use asprintf()?

Copy link
Member Author

Choose a reason for hiding this comment

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

you are right, thanks! This simplifies the code a bit.

…rations

try to actually open the sharedfp/sm file during the query operation to ensure
that the component can actually run. This is based on some reports on the mailing list that
the sharedfp/sm operation causes problems in certain circumstances.

Fixes issue open-mpi#9656

Signed-off-by: Edgar Gabriel <[email protected]>
@edgargabriel edgargabriel force-pushed the topic/sharedfp-sm-init branch from 5e6b71a to d8464d2 Compare December 21, 2021 20:28
@edgargabriel edgargabriel merged commit 42ccd38 into open-mpi:master Dec 22, 2021
@edgargabriel edgargabriel deleted the topic/sharedfp-sm-init branch March 3, 2023 14:20
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.

2 participants