Skip to content

Adds methods for iterating and visiting #52

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

14NGiestas
Copy link
Contributor

Hi

This pull request introduces new functionalities for iterating over and visiting datasets in HDF5 files, along with some minor fixes and improvements. The most important changes include the addition of iterate and visit procedures, updates to CMakeLists.txt to accommodate new source files, and corrections to existing error messages.

New functionalities:

  • Added iterate and visit procedures to the h5fortran module for iterating over and visiting datasets in HDF5 files. (src/interface.f90, src/iterate.f90, src/visit.f90) [1] [2] [3] [4]

Build system updates:

  • Updated CMakeLists.txt to include new source files iterate.f90 and visit.f90. (src/CMakeLists.txt)

Documentation updates:

  • Added documentation for the new iterate and visit procedures in API.md. (API.md)

Minor fixes:

  • Corrected spelling error in README.md from "impementation" to "implementation". (README.md)
  • Fixed error messages related to dataset slicing and dimensions in utils.f90 and write.f90. (src/utils.f90, src/write.f90) [1] [2] [3]

Testing updates:

  • Added new tests for iterate and visit procedures in CMakeLists.txt for tests. (test/CMakeLists.txt)

14NGiestas and others added 7 commits February 7, 2025 16:34
build/dependencies/h5fortran/src/write.f90:95:132:

   95 |     if(any(iend - istart > ddims)) error stop 'ERROR:h5fortran:create: iend - istart > dset_dims'  // dname // ' in ' // self%filename
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
build/dependencies/h5fortran/src/write.f90:95:132:

   95 |     if(any(iend - istart > ddims)) error stop 'ERROR:h5fortran:create: iend - istart > dset_dims'  // dname // ' in ' // self%filename
      |                                                                                                                                    1

Error: ‘filena’ at (1) is not a member of the ‘hdf5_file’ structure; did you mean ‘filename’?
compilation terminated due to -fmax-errors=1.
f951: some warnings being treated as errors
<ERROR> Compilation failed for object " build_dependencies_h5fortran_src_write.f90.o "
<ERROR> stopping due to failed compilation
STOP 1
@14NGiestas 14NGiestas changed the title Adds methods for iterating and visiting Add methods for iterating and visiting Feb 10, 2025
@14NGiestas 14NGiestas changed the title Add methods for iterating and visiting Adds methods for iterating and visiting Feb 10, 2025
@scivision scivision force-pushed the main branch 2 times, most recently from f849e62 to 9a1e6ac Compare June 4, 2025 20:08
@scivision
Copy link
Member

thanks, this was added in d79ec48 0cf897b

@scivision scivision closed this Jun 4, 2025
@scivision scivision reopened this Jun 5, 2025
@scivision
Copy link
Member

actually when implementing this, I found that it segfaults on GCC in Linux

@14NGiestas

This comment was marked as outdated.

@14NGiestas
Copy link
Contributor Author

Ok, the problem was much simpler to solve: the variable i in the test was not initialized 🤣
I placed a workaround to the unused variables warnings turned into errors (I'm not sure I took the best approach)
and removed the h5fortran module so flang doesn't complain.

@14NGiestas
Copy link
Contributor Author

However ci_windows and oneapi_linux are still failing, I'm working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants