vatlab / sos-pbs

PBS task engine for SoS
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Expanding task_template with arbitrary keyword arguments #7

Open BoPeng opened 4 years ago

BoPeng commented 4 years ago
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.