Skip to content

absence of __complex__ attribute in h5 file #22

@dombrno

Description

@dombrno

Good morning,
I use ALPSCORE/CT-HYB for computing G1 and G2, and then post process the output data, using C++ code using the same ALPSCORE libraries. In my own C++ code, I read and write code from and to hdf5, using the same process as that used in ALPSCORE/CT-HYB. For example in this code snippet, I save a complex boost multiarray to hdf5:

https://github.com/dombrno/SC_Loop_ALPSCore/blob/eb14d7459b248b7a3d7f01a19c0c68fda22b59cc/src/greens_function.cpp#L207-L225

This seems to me the same exact process used to save, e.g. the G2_LEGENDRE data in ALPSCORE/CT-HYB:

https://github.com/dombrno/CT-HYB-1/blob/adbb7b81f16e85f5d86748649af5fb6bb06cb39a/src/postprocess.hpp#L297-L357

Nevertheless, in the case of my code, the hdf5 dataset ends up being equipped with the attribute complex = 1, while in the case of ALPSCORE/CT-HYB, this attribute is not created.

It is not a big problem, but that leads me to having to use two different procedures for reading data, depending on whether they were generating by ALPSCORE/CT-HYB, or by my own CT-QMC code (2-orbital version of CT-HYB-SEGMENT): if the data comes from ALPSCORE/CT-HYB, I need to recombine the real and imaginary parts into a complex boost::multiarray, while the reading of complex data works direct when coming from my other code (also using ALPSCORE libraries), thanks to the attribute being present.

https://github.com/dombrno/SC_Loop_ALPSCore/blob/eb14d7459b248b7a3d7f01a19c0c68fda22b59cc/src/greens_function.cpp#L244-L269

I am using ALPSCORE c6eddbb9326a82a970a5a73569bc61f82cc1b46f , and ALPSCORE/CT-HYB 26f6acf , i.e. relatively recent versions from end of March.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions