Skip to content

Added Support for --reservation Flag for srun_fastsurfer.sh #586

@xuansean

Description

@xuansean

Feature Description

I am proposing adding support for a --reservation flag to the srun_fastsurfer.sh script. This would allow users to specify a reservation when submitting jobs to SLURM clusters using reserved GPU nodes.

Motivation

The FastSurfer script does not currently have an option to handle SLURM jobs that need to run on reserved GPU nodes. Without a --reservation flag, users have to manually modify the script, as I did, to submit jobs using a reservation. Adding this feature would streamline the process for users who need to specify a reservation on clusters with dedicated resources.

Although not everyone may need reserved nodes, I believe this would streamline the workflow for those who do.

Additional Context

I have already implemented this change in my local version of the srun_fastsurfer.sh script. Users would define the reservation as:
--reservation <reservation_name>

The changes I made locally:
Define the reservation variable at the beginning of the script:
reservation=""
Add a new case for the --reservation flag in the argument parser:

--reservation)
  reservation="$1"
  shift
  ;;

Update the SLURM job submission section to include the reservation flag if it is defined:

if [[ -n "$reservation" ]]; then
  seg_slurm_sched=(--reservation="$reservation" "${seg_slurm_sched[@]}")
fi

The changes I made are very simple and short, but I hope they help to make FastSurfer even better for users with similar needs.
I’ll leave it up to you to decide whether this would be useful to add to the official script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions