batch_dosy | index /Users/mad/Documents/Developpement/repository/NMRnotebook/NPK/trunk/python/NPK/util/batch_dosy.py |
batch_dosy
This utility is meant for starting a DOSY process in batch on a remote cluster or on a multiproc desktop
First prepare every thing for running, in a parameter files, say param.gtb
Then dump the processing parameters with the actions:
dump_preset ( dump all the parameters to a .gtb file)
execute_ilt (realizes or not the ilt operation)
for instance :
NPK DOSY2D file.gs2 dosy.gs2 param.gtb dump_preset=1 dump_preset_file=preset.gtb execute_ilt=0
then starts the processing in batch with:
NPK PDOSY2D file.gs2 dosy.gs2 preset.gtb { N_JOBS=8 }
or
NPK -e batch_dosy.py LAUNCH file.gs2 dosy.gs2 preset.gtb { N_JOBS=8 }
with N_JOBS=x being an optionnal parameter
The job is then split in N_JOBS pieces, the presetes are stored in N_JOBS sub-directories called ldirXX
the jobs are then started in each sub-directories
Two modes are available :
- on a cluster running PBS (qsub), N_JOBS cluster tasks are started
plus one which wait for the completion of the others and stores the final result
- on a Dekstop running Linux/MacOsX, N_JOBS sub-shells are started,
and the current process waits for the completion of the sub-shells.
The code should be adapted to your own needs directly in the code itself :
NPK how to call NPK on your system
N_JOBS default number of jobs
BATCH Determine which mode is to be used S:shell Q:qsub
PREBATCH_Q default prefix for qsub system
PREBATCH_S default prefix for shell system
POSTBATCH_Q default postfix for qsub system
POSTBATCH_S default postfix for shell system
FINAL_PHASE either FINAL or FINALZ used by qsub system
WAIT_DELAY wait delay when pooling for output files, used by shell system
Functions | ||
|
Data | ||
BATCH = 'Q' FINAL_PHASE = 'FINALZ' NPK = '~/bin/NPK' N_JOBS = 8 POSTBATCH_Q = ' | qsub -j oe -q serial_24h -d $PWD' POSTBATCH_S = '&' PREBATCH_Q = 'echo' PREBATCH_S = 'nice' WAIT_DELAY = 10 |