Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Expanding task_template with arbitrary keyword arguments #7

@BoPeng

Description

@BoPeng
task: mem='1G', cores=1, walltime='1m', modules=['R/3.6.1', 'anaconda3/2019.10']

with task_template

            #!/bin/bash
            #PBS -N {task}
            #PBS -l nodes={nodes}:ppn={ppn}
            #PBS -l walltime={walltime}
            #PBS -l mem={mem//10**9}GB
            #PBS -o /home/{user_name}/.sos/tasks/{task}.out
            #PBS -e /home/{user_name}/.sos/tasks/{task}.err
            #PBS -m ae
            #PBS -M email@address
            #PBS -v {workdir}

            module load {' '.join(modules)}
            {command}

does not work because keyword argument modules is not passed to template. As far as I remember, it was designed to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions