C API: cannot write a string value
Created by: pnorbert
A string value will cause the write to fail with buffer overflow:
Write a string testStr = [A string variable]
ERROR: buffer overflow when resizing to 7917544755212288000 bytes, when resizing buffer to 7917544755212288000bytes, in call to variable varStr Put
Extending the test testing/adios2/bindings/C/TestBPWriteReadMultiblock.cpp exhibits the problem.
const char testStr[] = "A string variable";
adios2_variable *varStr =
adios2_define_variable(ioH, "varStr", adios2_type_string, 0, nullptr,
nullptr, nullptr, adios2_constant_dims_true);
...
printf("Write a string testStr = [%s]\n", testStr);
adios2_put(engineH, varStr, testStr, adios2_mode_deferred);