-
Notifications
You must be signed in to change notification settings - Fork 23
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
Stream log to stdout? #599
Comments
Log file is created by server (workers streams to the server and it writes the data). |
Hi, this is an interesting use-case. It's definitely something that could be useful, although it would be quite complex to implement, and we would have to think about various edge-cases (what should happen when the client disconnects?). I expect that this could take several weeks or months to implement, if we decide to do it. Btw, how do you envision handling of output of multiple tasks? If you do something like |
At least for Flux, when there are multiple output stream we still direct the users to look at different log files. |
Interesting. Let me ask something else than: what's the added value of this feature, vs |
This feature would show the log streaming in real time, vs the wait and cat requires the job to completely finish before showing the log. |
I see. I suppose that for your use-case it wouldn't be enough to read from the logfile in a streaming fashion instead, and you need the output to be streamed via the network connection between the server and the client? |
Yes, but please don’t consider this as urgent or a priority because the alternative wait and cat is acceptable! For the upcoming experiments I’d like to run #595 is most important. |
I'm just trying to grasp the use-case :) Because you mentioned that if you have multiple tasks, and/or multiple streams (stdout/stderr), you probably want to look at separate files anyway. And it's quite unusual to use HQ to execute only a single task with a single stream (although it could be useful for debugging). |
I think for a lot of cases, you'd just be interested in the output streamed from the main runner, although it might be using others for the work. E.g., think of LAMMPS, or a workflow engine tool. |
I can imagine that I would filter the streams so that I would only read the output of one "main" task. But I wonder how would that main task produce the output - in HQ, all tasks are independent and HQ is responsible for scheduling and executing them. The only way that one "special" task could produce output about the state of the computation is that it would have to read some external state (filesystem/DB), and run until it finds out that the other tasks are completed (?). It doesn't sound very compatible with the design of HQ, that's why I'm wondering how would it be used. |
So MPI would not work? E.g running LAMMPS? |
There are several approaches of combining MPI with HQ:
|
So to ask a very dumb question - if I give an mpirun command that hits an application, that seems to work using two nodes? Unless I just am reading this wrong? E.g., here I'm looking at the logs - we submit the job (mpirun) to hq, and ask for 2 nodes, and it reports 2 tasks (one thread each) which is what I would expect
Does all that seem OK / properly working to you? If so - this is really great! And my next question is - do you have a plan for a next release? I'm currently installing from the nightly release from today (the 20th). |
It's not a dumb question ;) The case that you have posted represents the case where HQ is aware of MPI (or rather it is aware of a multi-node task), and it looks reasonable. If you want to execute only a single job like this at a time, then streaming output to a client makes sense. Although I'm not sure if HQ helps in this case - you could just run I think that we can put out a new release in the coming week(s), as there are more new features. CC @spirali |
Hiya! I'm wondering if it might be possible to do the equivalent of a
flux run
, where instead of a submit, we hang in the terminal until it's running, and then stream the output to the terminal. The reason is that in a Kubernetes context, we often run one-off jobs and don't have access to the filesystem (and with hq we couldn't know which worker was writing the log file) so we'd maybe want to do:I was specifically looking here:
So I tried this:
but no cigar! I found cat, but it looks like it's having issues without the shared filesystem:
It looks like
--progress
can show me a waiting bar, but that's akin to wait:I was able to shell into different workers and then find the output, although that's not ideal. But I was able to add
--log
to get it to write specifically to the server, and then use--wait
so I know it's finished, and then "cat" at the end!It's not streaming (so we can watch it while it runs but it's definitely good for now)! I think this headless use case (of getting logs in stdout, real time) would be really fantastic if you want to chat about it!
The text was updated successfully, but these errors were encountered: