8000 Parallel streams for web version by tomstitt · Pull Request #235 · GLVis/glvis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Parallel streams for web version #235

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

Merged
merged 4 commits into from
Aug 31, 2022
Merged

Parallel streams for web version #235

merged 4 commits into from
Aug 31, 2022

Conversation

tomstitt
Copy link
Member
@tomstitt tomstitt commented Aug 3, 2022
  • Adds and renames the display and update methods
  • Moves ReadInputStreams from glvis.cpp to lib/stream_state.*
    • keep_attr is now a member of StreamState

@tomstitt tomstitt self-assigned this Aug 3, 2022
@tomstitt tomstitt requested review from publixsubfan and tzanio August 3, 2022 18:31
@tomstitt
Copy link
Member Author
tomstitt commented Aug 3, 2022

The mac jobs are failing due to GitHub Actions has encountered an internal error when running your job, any ideas?

@publixsubfan
Copy link
Contributor

Looks like they deprecated the macos-10.15 container on gh actions? actions/runner-images#5583

@tzanio
Copy link
Member
tzanio commented Aug 21, 2022

I switched in mfem/mfem#3162 to macos-latest.

Should we do the same here?

@tomstitt tomstitt changed the title Draft: Parallel streams for web version Parallel streams for web version Aug 25, 2022
Copy link
Member
@tzanio tzanio left a comment

Choose a reason for hiding this comment

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

Thanks @tomstitt !

// HACK: don't let unique_ptr free the data
for (int i = 0; i < streams.size(); ++i)
{
istreams[i].release();
Copy link
Contributor

Choose a reason for hid 8000 ing this comment

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

Are these streams being used elsewhere outside this function?

Copy link
Member Author

Choose a reason for hiding this comment

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

No they are not.

Ideally we can come up with a way to get a std::vector<std::unique_ptr<std::istream>> view of the std::vector<std::string> argument but I'm not sure how to do that. Any ideas? The other option is to change the signature of ReadStream but that would mean changing glvis.cpp

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess I was asking more about the use of unique_ptr::release(); I think the use of std::stringstream is fine given that we also have to handle the case of live sockets via mfem's socketstream when running as a desktop application. It also looks like the mfem::Mesh and GridFunction ctors expect an std::istream-like argument.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah! Good question. The unique_ptrs are referencing the stack allocated streamstreams and I don't want uniq 8000 ue_ptr to try to destruct them since that would be a double-free. I'm not sure if we can improve, thoughts ?

@tzanio tzanio merged commit 8fd02cd into master Aug 31, 2022
@tzanio tzanio deleted the web-parallel-streams branch August 31, 2022 21:52
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.

3 participants
0