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

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

Enable use of multiple processes for DGA calculation

parent 333b0f05
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,8 @@ class Adga(object):
"""
def __init__(self, adga_root_path, adga_config_file_name,
two_particle_greens_function_file_name):
two_particle_greens_function_file_name, n_processes=1):
self.n_processes = n_processes
self.executable = adga_root_path + "/bin/abinitiodga"
self.symmetrize_script = adga_root_path + "/scripts/symmetrize.py"
self.config_file_name = adga_config_file_name
......@@ -50,7 +51,6 @@ class Adga(object):
for value_group in value_groups])
return worm_sample_generator
# TODO: Call abinitiodga with mpirun and n >= 1 processes
# TODO: "Rename" this into calculate_self_energy()
# TODO: Add calculate_susceptibility()
def __call__(self, two_particle_greens_function):
......@@ -87,8 +87,10 @@ class Adga(object):
self._replace_value_in_config_file("Outfile", self.output_file_name)
# Do the DGA calculation
print(self.executable + " " + self.config_file_name)
subprocess.call([self.executable, self.config_file_name])
print("mpirun" + " -np " + str(self.n_processes) + self.executable
+ " " + self.config_file_name)
subprocess.call(["mpirun", "-np", self.n_processes, self.executable,
self.config_file_name])
# TODO: Make a subroutine for getting the self-energy
adga_file = h5py.File(self.output_file_name, "r")
......
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