Skip to content
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

HTCondorSubmitter changes for WIPAC #420

Merged
merged 4 commits into from
Feb 18, 2025
Merged

HTCondorSubmitter changes for WIPAC #420

merged 4 commits into from
Feb 18, 2025

Conversation

sathanas31
Copy link
Contributor

@sathanas31 sathanas31 commented Feb 14, 2025

Make our lives simpler and have the submit file written in the flarestack scratch for both DESY & WIPAC. Before, the submit file was saved on the (NPX submit nodes) /scratch/<username>, so you had to run the script(s) on the submit node itself (which is not advisable). With this change, scripts can run on the cobalts and the jobs can only be manually submitted, or on the submit node itself and submit them manually or automatically. However, there is a caveat in the latter case: the FLARESTACK_SCRATCH_DIR needs to be set to a path that is accessible by the submit node (ie /data/user on cobalts).

Also change how the logdir is made. If jobs are run on DESY, the log, out, and err files are saved in the same directory under /cluster in the flarestack scratch. So when get_logfile_path is called in make_submit_file() it creates the folder and the path exists when the select_logdir() is called for the out and err files paths. However, if jobs are run on WIPAC cluster, the logfile path is set to /scratch and the directory under FLARESTACK_SCRATCH_DIR/cluster needs to be made for the out and err files to be saved. Thus, create it once when calling get_outfile_path() for the stdout file in make_submit_file, which sets create_new = True in select_logdir(), and the same dir is used for the stderr file.

1. submit file savepath in flarestack_scratch for both DESY & WIPAC hosts
2. add  make_dir arg in get_outfile_path()
3. when making submit file, if running on WIPAC set make_dir = True for making outfile subdir
@JannisNe
Copy link
Collaborator

I think the black related changes should stay in #415

This reverts commit 67501ae.
@JannisNe JannisNe requested a review from mlincett February 14, 2025 14:50
@mlincett
Copy link
Collaborator

Looks reasonable to me!

Note for the future: when I touch code that has to do with paths I try to convert the code to use pathlib for better readability and maintainability, but for the scope of this PR it is not necessary.

@JannisNe JannisNe merged commit a6e9403 into master Feb 18, 2025
15 of 23 checks passed
@JannisNe JannisNe deleted the npx_submitter branch February 18, 2025 08:58
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