Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing C++ and Fortran example to correctly read in files #4233

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions examples/hello/bpFWriteCRead/CppReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ int main(int argc, char *argv[])

bpReader.EndStep();

bpReader.Close();

std::cout << "Selection size: " << bpData.SelectionSize() << "\n";
for (size_t i = 0; i < bpData.Count()[0]; ++i)
{
Expand All @@ -70,6 +68,9 @@ int main(int argc, char *argv[])
std::cout << "\n";
}
std::cout << "\n";

bpReader.Close();

}

MPI_Finalize();
Expand Down
4 changes: 4 additions & 0 deletions examples/hello/bpFWriteCRead/FReader.f90
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ program FReader
! Open in write mode, this launches an engine
call adios2_open(engine, io, "CppWriter.bp", adios2_mode_read, ierr)

call adios2_begin_step(engine, ierr)

call adios2_inquire_variable(var, io, 'data2D', ierr)

if( ierr == adios2_found ) then
Expand Down Expand Up @@ -56,6 +58,8 @@ program FReader

end if

call adios2_end_step(engine, ierr)

call adios2_close(engine, ierr)
call adios2_finalize(adios, ierr)

Expand Down
Loading