Could be all that is needed is to add this:

mycluster ='sbatch --mail-type=FAIL --mail-user=<typeyouremailhere> -N 1 --ntasks-per-node=10 --partition=work --export=ALL -o <pathtohomes>/%(username)s/logs/job.%J.out- e <pathtohomes>/%(username)/logs/job.%J.err "%(command)s"'

and comment the lines

# if queue is not None ...
#   pbcmd = ...

with a hashtag.

you can also simplify the slurm command (remove the --mail flags and the -o logfile location flags) your cluster partition may not be called "work" either.

Best, Martin

Am 22.02.2018 um 16:43 schrieb Martin Reuter:

Hi Lea,

I wrote that script to simplify processing on our cluster which uses qsub PBS for submission. I have never used SLURM so far.

There is two functions that you (or someone who knows this stuff) would need to modify:

def submit


def wait_jobs

The submit procedure basically issues a submit command (stored in pbcmd). The examples there should help anyone who programs python to modify it for a slurm submission.

The wait_jobs scripts runs a different command (here qstat and grep user) to see how many jobs you are already running and waits until this number sinks below maxjobs, then it continues submitting new jobs. If you don't care about the number of submitted jobs (because your cluster does the scheduling anyway), you can just write

"    return" as the first line (before the "    users = os....." line).

Still the submit block would have to be rewritten for slurm.

Best, Martin

Am 17.02.2018 um 12:13 schrieb Backhausen, Lea:
Dear FS experts,

I am trying to do a longitudinal analysis of around 250 adolescents with up to 4 data points each. Given the complexity I would like to use the long_submit_jobs script which is described here: <>

Unfourtunately it does only run on launchpad and I would do the analyses with SLURM using bash system. Has anybody adopted the script so i will run with SLURM or does anybody know where I should look to get information on this?

I have little scripting experience so any help would be greatly appreciated!


Lea Backhausen, B.Sc.

Research assistant

Klinik und Poliklinik für Kinder- und Jugendpsychiatrie und –psychotherapie
Tel. +49 (0)351 458-7166
Fax +49 (0)351 458-5754

Universitätsklinikum Carl Gustav Carus
an der Technischen Universität Dresden
Anstalt des öffentlichen Rechts des Freistaates Sachsen
Fetscherstraße 74, 01307 Dresden
*MailScanner has detected a possible fraud attempt from "" claiming to be* _http://www.uniklinikum-dresden.de_ <>
Vorstand: Prof. Dr. med. D. M. Albrecht (Sprecher), Wilfried E. B. Winzer
Vorsitzender des Aufsichtsrates: Prof. Dr. med. Peter C. Scriba
USt.-IDNr.: DE 140 135 217, St.-Nr.: 203 145 03113

Freesurfer mailing list

Freesurfer mailing list

Freesurfer mailing list

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply via email to