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

Include Yaml #1482

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

emily-howell
Copy link
Member

No description provided.

@emily-howell emily-howell linked an issue Mar 18, 2025 that may be closed by this pull request
Copy link
Member

@cyrush cyrush left a comment

Choose a reason for hiding this comment

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

Looks great, to small suggestions to wrap up the PR.


#ifdef ASCENT_MPI_ENABLED
// make sure all ranks error if the parsing on rank 0 failed.
MPI_Bcast(&include_file_valid, 1, MPI_INT, 0, mpi_comm);
Copy link
Member

Choose a reason for hiding this comment

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

If we have an error, we should broadcast the error message from rank 0 to all other ranks so their exceptions match

#ifdef ASCENT_MPI_ENABLED
relay::mpi::broadcast_using_schema(node, 0, mpi_comm);
#endif

detail::load_included_files_in_node_tree(node, mpi_comm_id);
node.print();
Copy link
Member

Choose a reason for hiding this comment

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

Comment out the node.print()

…-2-14_1435-a-few-actions-improvements-ideas-include-yaml
Broadcasting error message to all ranks.
Removing print statement.
…clude-yaml' of github.com:Alpine-DAV/ascent into task/2025-2-14_1435-a-few-actions-improvements-ideas-include-yaml
@emily-howell
Copy link
Member Author

@cyrush Thank you for the feedback. I addressed your comments

@emily-howell emily-howell self-assigned this Mar 19, 2025
MPI_Bcast(&line_size, 1, MPI_INT, 0, mpi_comm);
if (rank != 0)
emsg.resize(line_size);
MPI_Bcast(const_cast<char*>(emsg.data()), line_size, MPI_CHAR, 0, mpi_comm);
Copy link
Member

Choose a reason for hiding this comment

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

it's scary to write into an std::string as a buffer, how about:

Node n_emsg;
if(rank == 0)
{
   n_emsg.set(emsg);
}

relay::mpi::broadcast_using_schema(n_emsg, 0, mpi_comm);
emsg = n_emsg.as_string();

Copy link
Member Author

Choose a reason for hiding this comment

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

That is a much better way of doing that. Thank you

Copy link
Member

@cyrush cyrush 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!

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.

a few actions improvements ideas
2 participants