Closed tanmaykm closed 3 years ago
looks good. but what is wrong with bpeek(manager...
and _launch(manager...
? shouldn't be any clashes as dispatch will choose the correct one based on the type of manager, no? i'd suggest sticking with the function names without the lsf_
prefix.
Thanks for revewing! Yes dispatch would take care, but would likely not serve any purpose? Because internal methods are unlikely to have any common purpose across managers. Also prefixing would avoid having another poorly qualified method of a different manager with same name trigger method ambiguities I felt.
Does this seem reasonable?
Unless there are any further major concerns, can this be merged?
i don't want to bikeshed, so i'll merge. will be great to have all i/o displayed by master. thanks!
but i will say that adding ::LSFManager
to the type signature of bpeek
and _launch
is all i believe that is needed to mitigate your concerns about clashes with other parts of the package. an unfortunate omission of mine when i wrote this code. sure, the lsf_
prefix makes it less likely they'll be a name clash, but is not a guarantee. doesn't seem very Julian to me either (Base is littered with underscore prefixes and method overloading).
thanks again!
Thanks! I was not so hung up on the naming too... agree with your points too. Maybe we need https://github.com/JuliaParallel/ClusterManagers.jl/issues/58 to avoid such worries. And many thanks for adding LSFManager to this package!
This updates the LSFManager to allow stdout and stderr streams of workers to be streamed (optionally) to master. The
bpeek
invocation when passed the-f
flag behaves similar totail -f
. This is the default set forbpeek_flags
. The resultant stream is then passed on to the Distributed module after parsing the worker connection string and some initial error handling for the case where job startup is delayed or failed. The Distributed module then takes over the subsequent display of worker's stdout messages on master.If streaming of worker's stdout messages is not desired, then the
-f
flag can be omitted frombpeek_flags
. Thenbpeek
behaves similar tocat
and is used only to read the initial connection string.As a positive side effect of this change, it now also avoids the earlier
redirect_stderr()
call which could have caused race conditions with multiple async invocations of thebpeek
method. Few methods are also renamed to have alsf_
prefix to avoid unnecessary clashes with other parts of the package.