[Q-e-developers] Saving complex data for restarts
Martin Schlipf
martin.schlipf at gmail.com
Wed Sep 21 13:32:10 CEST 2016
Dear Ilya,
I would use the iotk_module, which is documented quite well. A minimal
example for writing would be
CALL iotk_open_write(unit, filename)
CALL iotk_write_dat(unit, label, data)
CALL iotk_close_write(unit)
and for reading
CALL iotk_open_read(unit, filename)
CALL iotk_scan_dat(unit, label, data)
CALL iotk_close_read(unit)
You can repeat the iotk_write_dat and iotk_scan_dat statement to write
multiple entries in the same file. The written file is xml compatible so
it's human readable if you choose the labels well. The formatting is all
done by the library.
Cheers,
Martin
On 21/09/16 12:11, Ilya Ryabinkin wrote:
> Colleagues:
> I'd like to save a few complex matrices, or to be precise, two complex
> vectors and a square complex matrix (of the same dimension) in an
> auxiliary file in order to implement restarting capabilities in my
> piece of code. The dimension is tiny (2-3, rarely less than 10).
>
> What is the "QE"-way for that? I know about diropn/davcio and
> seqopn/READ. I don't want to mess up with formatting though---the
> simplest solution is preferable.
>
>
> Thanks in advance,
> I.
>
--
Martin Schlipf
Department of Materials
University of Oxford
Parks Road
Oxford OX1 3PH, UK
More information about the developers
mailing list