Check object initialization during adios2_open
Created by: kshitij-v-mehta
I forgot to call adios2_declare_io
before calling adios2_open
, and the code segfaulted with an invalid memory reference.
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x7f568926dd1d in ???
#1 0x7f568926cf7d in ???
#2 0x7f568878c05f in ???
#3 0x7f568ae9c1e9 in _ZN6adios22IO4OpenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_4ModeEi
at /home/kmehta/vshare/opt/adios2/source/adios2/core/IO.cpp:319
#4 0x7f568b040438 in adios2_open_new_comm
at /home/kmehta/vshare/opt/adios2/bindings/C/adios2/adios2_c_io.cpp:522
#5 0x7f568a5fe3fe in adios2_open_new_comm_f2c_
at /home/kmehta/vshare/opt/adios2/bindings/fortran/f2c/adios2_f2c_io.cpp:286
#6 0x7f568a6020bb in __adios2_io_open_MOD_adios2_open_new_comm
at /home/kmehta/vshare/opt/adios2/bindings/fortran/modules/mpi/adios2_io_open_mod.f90:43
#7 0x555777ee3d13 in __adios2_test_MOD_adios2_write_test
Maybe check to ensure jo object is initialized when adios2_open is called?