-
Notifications
You must be signed in to change notification settings - Fork 287
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
Update vsc_calcua #725
Update vsc_calcua #725
Conversation
The host variable started throwing errors upon launch. The reason was that the defined host variable was being called inside the local scope of a function, where it was not accessible. To fix it, either the partition_checker() function could be tweaked to take an original parameter (String host), or the host variable could just be omitted in favour of the underlying logic (= fetching the content of an environment variable). The latter option was chosen.
The function that tests whether nextflow is running on the correct slurm partition was broken; try-catch was used instead of conditionals and a missing == comparison. Now the code correctly warns the user if nextflow is running on a login node, and aborts the run if the current partition does not match the requested one (in the -profile flag). It does not abort runs launched on the login node to allow easier debugging.
…ables Improves checks for the environment variables for singularity/apptainer/nextflow cache and tmp dirs: - APPTAINER_TMPDIR/SINGULARITY_TMPDIR, - APPTAINER_CACHEDIR/SINGULARITY_CACHEDIR or - NXF_APPTAINER_CACHEDIR/NXF_SINGULARITY_CACHEDIR Only the nextflow cache is set to a default value if it is not set in the launch environment (via singularity.cacheDir). Before, this location was always set and any value set in the env var was ignored. The other two cannot be overriden in the env scope because that only affects the task environment variables, not the environment in which nextflow is launched. See: https://www.nextflow.io/docs/latest/config.html#scope-env Warnings are issued for the user when any of these variables are not set. Also clarifies code comments and updates documentation.
The automatic resource allocation for local node execution now also works when memory is specified via --mem, i.e. total node memory, instead of only looking at --mem-per-cpu. These SLURM environment variables (SLURM_MEM_PER_CPU and SLURM_MEM_PER_NODE) are not both dynamically set based on the value of the other. As before, if these env vars are not set, there is still a fallback to the profile's default max mem/cpu values.
That should be it for now... Thanks in advance for the review! |
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.
OK this is a ultra-mega-complicated-config 😅 , but assuming it's been tested, I don't see anything majorly flawed 👍
I might have gone a little overboard with this one... The basic premises are:
I'm open to any and all suggestions to improve this config though, especially if they can simplify this behemoth of a config! I just noticed that the vsc_ugent.config recently switched to dynamically determining the current SLURM partition, which eliminates the needs for different subprofiles. So I might put that on my todo list. I'd still need two subprofiles to specify SLURM vs local executor, but if one of them is set as the default, that'd still simplify things. |
I don't have time to read through fully currently (in the middle of running/teaching a summer school), so I would say you can merge in otherwise, depending on @nvnieuwk 's comment :) |
Makes warning messages more clear to the user and differentiates between warnings and errors. Exits out in case singularity/apptainer cache is not set. Improves docs related to cache and temp dirs.
Incorporated your suggestions and tried to improve the docs/comments a bit more. Ready for merging! Thanks for the help! |
Some bugfixes and improvements for the CalcUA VSC config.