magic-sph / magic

MagIC is a high-performance code that solves the magneto-hydrodynamics equations in rotating spherical shells
https://magic-sph.github.io/
80 stars 25 forks source link

problem with concatenation in MagicTs #23

Closed lakecity closed 4 years ago

lakecity commented 4 years ago

Hi!

There is a problem with concatenation of two long files in MagicTs:

MagicTs(field='e_kin',tag='1') ==> Figure_1 MagicTs(field='e_kin',tag='2') ==> Figure_2 MagicTs(field='e_kin',tag='[1,2]') ==> Figure_3

The time of the last checkpoint in log.1 corresponds to the end time in e_kin.1 and start in e_kin.2.

wc -l e_kin.1 ==> 26554 wc -l e_kin.2 ==> 26379

May be it is overflow? I used sngl precision output. Each run is 24hs.

For short time series it is OK.

I can provide the link to the data.

Figure_1 Figure_2 Figure_3

tgastine commented 4 years ago

As far as I can see what happened is that the concatenation took first the tag='2' and then the tag='1'. Since it uses access time to determine the ordering to concatenate the files, this likely means that your tag='1' files have been touched/accessed more recently than the others. To fix it you can simply touch the files in the working directory:

> touch *.1
> touch *.2

This should fix it.

lakecity commented 4 years ago

Thank you! It works! Usualy I make long simulations at the server and then copy it to the local pc. The order how it make copy is unpredictable ;) It was also suspicious for me: ! Storing checkpoint file: 107798 at time= 2.1833380460E+00 107799 step no.= -1 !!!!!!!!!!!!!!!!!!!! 107800 into file=checkpoint_ave.7 Thanks!

tgastine commented 4 years ago

You can try using rsync instead of scp it should maintain the access time of the files.