ornladios / ADIOS

The old ADIOS 1.x code repository. Look for ADIOS2 for new repo
https://csmd.ornl.gov/adios
Other
54 stars 40 forks source link

transform: fix adios_schedule_read #163

Closed psychocoderHPC closed 6 years ago

psychocoderHPC commented 6 years ago

adios_schedule_read is reading the whole variable if the selection is NULL. This creates an invalid memory access if the variable is using adios transforms.

Reading a transformed variable with the following commands produce the issue

    size_t start = 0;
    size_t end = vi->dims[0];
    ADIOS_SELECTION* fSel = adios_selection_boundingbox(1, &start , &end);
    adios_schedule_read(fp, NULL, "VARIABLENAME", 0, 1, ptr);

    ADIOS_CMD(adios_perform_reads(fp, 1));
pnorbert commented 6 years ago

Please note, that using adios_selection, which are part of the C api but are not present in the Fortran library, broke the full build. I replaced them for a2sel. Please update your master branch. In general, adios() functions are only in C, and they just call common_adios(), or in case of selections, a2sel*().