Attribute read wrong value
Created by: jychoi-hpc
I am trying to read attr values but getting incorrect values. To reproduce this, I used the heat2d example with the following modification:
Writing (io_adios2.F90)
call adios2_define_attribute(attr_test, io, "myattr", 4, adios2_err);
Reading (heatAnalysis_adios2_file.F90)
call adios2_get(fh, "myattr", myattr, adios2_mode_sync, ierr)
print *, 'myattr', myattr
Then, I got the following output (it should be 4):
Input file: heat.bp
myattr 0
myattr 0
myattr 0
bpls shows correct numbers:
$ bpls heat.bp
File info:
of variables: 1
of attributes: 3
statistics: Min / Max
double T 6*{768, 1024} = 0 / 200
string T/description attr = "Temperature from simulation"
string T/unit attr = "C"
int myattr attr = 4
I tried also the followings without any success
call adios2_define_attribute(attr_test, io, "myattr", 4, "", adios2_err);
call adios2_define_attribute(attr_test, io, "myattr", 4, "T", adios2_err);