-
Notifications
You must be signed in to change notification settings - Fork 17
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
Adds an option to append the Cluster and Job numbers to the output files #124
base: master
Are you sure you want to change the base?
Adds an option to append the Cluster and Job numbers to the output files #124
Conversation
Thanks for this contribution @GregoryAshton! Out of curiosity, what is your particular use case? You may be able to set job = pycondor.Job('examplejob',
executable='script.py',
error=error,
output=output,
log=log,
submit=submit,
queue=5)
job.add_arg('--argument', name='$(Process)')
job.build() That should avoid all of the jobs writing to the same file. |
Hi, thanks for the tip. I gave that a go, but I'm not sure it does what I need. The purpose of the MR is that ones ends up with a logs directory separate logs files for each of the queued jobs. E.g., logs/examplejob_ProcessID_ClusterID.log Where ProcessID and Cluster ID are the process and cluster's which produced the job. Perhaps it is already possible with the existing structure, but I'm not sure I see how. The method you suggested seems to add another job to the dag. |
Thanks for pointing that out. I was able to reproduce this unexpected behavior. I think the origin of this issue is that using |
Yes, this solves the issue. Please feel free to remove this MR! |
Actually, apologies, having tested this a bit further, this seems to create a second job with |
Quite possibly. The job = pycondor.Job(..., arguments='--some_option') will need to be replaced with job = pycondor.Job(..., arguments='--some_option')
job.add_arg('--some_option', name='$(Cluster)_$(Process)') |
For jobs with queus > 1, all the output is written to the same file. This provides a unique filename for the output files to avoid that. Off by default.
Let me know if there are any changes you'd like, e.g., the argument name is a bit wooly (or feel free to do it yourself).