*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit ae2d9959 authored by Patrick Kappl's avatar Patrick Kappl
Browse files

Add n_processes as optional command line argument

parent 96bb2079
No related merge requests found
......@@ -9,11 +9,13 @@ import h5py
# %%
# TODO: Use a config file for this
infix = ""
n_processes = 1
if len(sys.argv) < 4:
print("""Command line argument missing. Please specify the ADGA root
directory, the configuration file and the 2-particle Green's
function file. The infix for the output file is an optional
4th argument.""")
function file. The infix for the output file as well as the
number of MPI process to use for the DGA calculation are the
optional 4th and 5th argument respectively.""")
sys.exit(1)
if len(sys.argv) >= 4:
adga_root = sys.argv[1]
......@@ -21,14 +23,18 @@ if len(sys.argv) >= 4:
two_particle_file = sys.argv[3]
if len(sys.argv) >= 5:
infix = sys.argv[4]
if len(sys.argv) > 5:
if len(sys.argv) >= 6:
n_processes = sys.argv[5]
if len(sys.argv) > 6:
print("""Too many command line arguments. Please specify only the
ADGA root directory, the configuration file the 2-particle
ADGA root directory, the configuration file, the 2-particle
Green's function file and optionally the infix for the output
file name.""")
file name as well as the number of MPI processes to use for
the DGA calculation.""")
sys.exit(2)
abinitio_dga = adga.Adga(adga_root, adga_config, two_particle_file)
abinitio_dga = adga.Adga(adga_root, adga_config, two_particle_file,
n_processes)
x_generator = abinitio_dga.get_worm_sample_generator()
n = abinitio_dga.n_worm_samples
f = abinitio_dga.__call__
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment