SCRIPTS SLURM job_array_exampleΒΆ

# -*-Python-*-
# Created by smithsp at 30 Nov 2018  21:54

"""
This script demonstrates the usage of OMFITx.job_array
"""
root['SETTINGS']['REMOTE_SETUP']['serverPicker'] = 'iris'
nparallel = 10
lines = []
outputs = []
for i in range(nparallel):
    lines.append('mkdir {0}; cd {0}; pwd > out.txt'.format(i))
    outputs.append('{0}/*'.format(i))
OMFITx.job_array(root, lines, outputs=outputs, partition='preemptable')
results = root['OUTPUTS'].setdefault('job_array', OMFITtree())
for i in range(nparallel):
    results[i] = OMFITascii('{0}/out.txt'.format(i))