seismology / mc_kernel

Calculate seismic sensitivity kernels using Axisem
GNU General Public License v3.0
24 stars 8 forks source link

submit script available #36

Closed sstaehler closed 9 years ago

sstaehler commented 9 years ago

General idea

It's a little Python program that makes extensive use of the argument parser to make interaction with the input file unnecessary in most daily use cases. The script creates a rundir and copies all necessary files, including the inversion grid files there. It does not copy the AxiSEM wavefields, obviously.

Basic run with default settings

The only necessary option is a job name, which will become the name of the rundir.

python submit.py kerner_run

It will create a job with default settings and 2 slaves using the receiver and filter and stf files in the main directory and AxiSEM wavefields at wavefield/fwd and wavefield/bwd

Basic run with settings from inparam file

That's obvioisly not very useful, if your files are elsewhere, so you can specify these settings in an inparam_basic file somewhere, especially those which do not change (like the wavefield dirs) and invoke it with

python submit.py -i inparam_basic kerner_run

This will use the settings in inparam_basic.

Basic run with settings from inparam file and some specific settings

The new thing is that you can easily override the settings in inparam_basic now, e.g. by

python submit.py -i inparam_basic -rec_file receivers_USARRAY.dat -src_file CMTSOLUTION_VIRGINIA -n 15 kerner_run

which will use the receiver and source files specified above, 15 slaves and otherwise the settings from inparam_basic.

Help

All possible options are available via the help pages

python submit.py -h

Job submission message (description)

Another feature is that you have to add a description of the run. I tried to mimic the functionality of git commit as much as possible. You can give a short description with the -m option

python submit.py testrun -m "Just a test run"

If -m is not added, an EDITOR window opens up during submission, where you can enter a more detailed description of your job. Either way, the description will be written into a file README.run in the rundir.

Things to add:

Please keep me informed about any issues!

sstaehler commented 9 years ago

The option -a MEMORY_IN_MB now allows to set the available memory d27977f3c954e65e9f1ff79ccc88dbd596ab2eca, from which buffer sizes are determined. My prediction of memory usage is correct by 10% so far, but I will be happy to hear other results.