-
Notifications
You must be signed in to change notification settings - Fork 53
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
Conversation
The mac jobs are failing due to |
Looks like they deprecated the macos-10.15 container on gh actions? actions/runner-images#5583 |
I switched in mfem/mfem#3162 to Should we do the same here? |
There was a problem hiding this 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(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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_ptr
s are referencing the stack allocated streamstream
s 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 ?
display
andupdate
methodsReadInputStreams
fromglvis.cpp
tolib/stream_state.*
keep_attr
is now a member ofStreamState