From 929b4596811bbe1e5433021e7f44e296465fa903 Mon Sep 17 00:00:00 2001 From: Manuel Zingl Date: Mon, 10 Aug 2015 16:14:51 +0200 Subject: [PATCH] Removes work around for issue #41 --- python/converters/wien2k_converter.py | 4 ++-- python/sumk_dft.py | 4 ++-- python/sumk_dft_tools.py | 2 +- python/symmetry.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python/converters/wien2k_converter.py b/python/converters/wien2k_converter.py index 56de47fc..8be718c1 100644 --- a/python/converters/wien2k_converter.py +++ b/python/converters/wien2k_converter.py @@ -445,7 +445,7 @@ class Wien2kConverter(ConverterTools): if not (mpi.is_master_node()): return # Check if SP, SO and n_k are already in h5 - ar = HDFArchive(self.hdf_file, 'a') + ar = HDFArchive(self.hdf_file, 'r') if not (self.dft_subgrp in ar): raise IOError, "convert_misc_input: No %s subgroup in hdf file found! Call convert_dft_input first." %self.dft_subgrp SP = ar[self.dft_subgrp]['SP'] SO = ar[self.dft_subgrp]['SO'] @@ -557,7 +557,7 @@ class Wien2kConverter(ConverterTools): if not (mpi.is_master_node()): return # Check if SP, SO and n_k are already in h5 - ar = HDFArchive(self.hdf_file, 'a') + ar = HDFArchive(self.hdf_file, 'r') if not (self.dft_subgrp in ar): raise IOError, "convert_transport_input: No %s subgroup in hdf file found! Call convert_dft_input first." %self.dft_subgrp SP = ar[self.dft_subgrp]['SP'] SO = ar[self.dft_subgrp]['SO'] diff --git a/python/sumk_dft.py b/python/sumk_dft.py index 54721ca4..a2a2557f 100644 --- a/python/sumk_dft.py +++ b/python/sumk_dft.py @@ -162,7 +162,7 @@ class SumkDFT: subgroup_present = 0 if mpi.is_master_node(): - ar = HDFArchive(self.hdf_file,'a') + ar = HDFArchive(self.hdf_file,'r') if subgrp in ar: subgroup_present = True # first read the necessary things: @@ -227,7 +227,7 @@ class SumkDFT: """ if not (mpi.is_master_node()): return # do nothing on nodes - ar = HDFArchive(self.hdf_file,'a') + ar = HDFArchive(self.hdf_file,'r') if not subgrp in ar: mpi.report("Loading %s failed!"%subgrp) list_to_return = [] for it in things_to_load: diff --git a/python/sumk_dft_tools.py b/python/sumk_dft_tools.py index 41870c30..1f63ac7b 100644 --- a/python/sumk_dft_tools.py +++ b/python/sumk_dft_tools.py @@ -600,7 +600,7 @@ class SumkDFTTools(SumkDFT): # Check if wien converter was called and read transport subgroup form hdf file if mpi.is_master_node(): - ar = HDFArchive(self.hdf_file, 'a') + ar = HDFArchive(self.hdf_file, 'r') if not (self.transp_data in ar): raise IOError, "transport_distribution: No %s subgroup in hdf file found! Call convert_transp_input first." %self.transp_data self.read_transport_input_from_hdf() diff --git a/python/symmetry.py b/python/symmetry.py index ad9d3720..2ddec363 100644 --- a/python/symmetry.py +++ b/python/symmetry.py @@ -53,7 +53,7 @@ class Symmetry: if mpi.is_master_node(): #Read the stuff on master: - ar = HDFArchive(hdf_file,'a') + ar = HDFArchive(hdf_file,'r') if subgroup is None: ar2 = ar else: