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

Parse hdf5 as inputs #4

Closed
edoyango opened this issue Feb 15, 2023 · 5 comments
Closed

Parse hdf5 as inputs #4

edoyango opened this issue Feb 15, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@edoyango
Copy link
Owner

Currently hardcoded virtual and real particle generation is sub-optimal. Greater coding burden on the user.

Allowing an input hdf5 file to be parsed would make things much easier.

A user could generate one via python/c++/fortran as needed. Maybe helper python package could be created too.

@edoyango
Copy link
Owner Author

edoyango commented Mar 2, 2023

parallel hdf5 implemented, still need serial/hl version 03bb957

@edoyango
Copy link
Owner Author

edoyango commented Mar 4, 2023

CAF version now only utilizes hdf5 files to define particle arrangement and initial density, and velocty 6f38500

See example h5dump headers output

$ h5dump -H example/dambreak.h5 
HDF5 "example/dambreak.h5" {
GROUP "/" {
   GROUP "halo" {
      ATTRIBUTE "n" {
         DATATYPE  H5T_STD_I32LE
         DATASPACE  SCALAR
      }
   }
   GROUP "real" {
      ATTRIBUTE "n" {
         DATATYPE  H5T_STD_I32LE
         DATASPACE  SCALAR
      }
      DATASET "ind" {
         DATATYPE  H5T_STD_I32LE
         DATASPACE  SIMPLE { ( 62500 ) / ( 62500 ) }
      }
      DATASET "p" {
         DATATYPE  H5T_IEEE_F64LE
         DATASPACE  SIMPLE { ( 62500 ) / ( 62500 ) }
      }
      DATASET "procid" {
         DATATYPE  H5T_STD_I32LE
         DATASPACE  SIMPLE { ( 62500 ) / ( 62500 ) }
      }
      DATASET "rho" {
         DATATYPE  H5T_IEEE_F64LE
         DATASPACE  SIMPLE { ( 62500 ) / ( 62500 ) }
      }
      DATASET "type" {
         DATATYPE  H5T_STD_I32LE
         DATASPACE  SIMPLE { ( 62500 ) / ( 62500 ) }
      }
      DATASET "v" {
         DATATYPE  H5T_IEEE_F64LE
         DATASPACE  SIMPLE { ( 62500, 3 ) / ( 62500, 3 ) }
      }
      DATASET "x" {
         DATATYPE  H5T_IEEE_F64LE
         DATASPACE  SIMPLE { ( 62500, 3 ) / ( 62500, 3 ) }
      }
   }
   GROUP "virt" {
      ATTRIBUTE "n" {
         DATATYPE  H5T_STD_I32LE
         DATASPACE  SCALAR
      }
      DATASET "ind" {
         DATATYPE  H5T_STD_I32LE
         DATASPACE  SIMPLE { ( 188112 ) / ( 188112 ) }
      }
      DATASET "p" {
         DATATYPE  H5T_IEEE_F64LE
         DATASPACE  SIMPLE { ( 188112 ) / ( 188112 ) }
      }
      DATASET "procid" {
         DATATYPE  H5T_STD_I32LE
         DATASPACE  SIMPLE { ( 188112 ) / ( 188112 ) }
      }
      DATASET "rho" {
         DATATYPE  H5T_IEEE_F64LE
         DATASPACE  SIMPLE { ( 188112 ) / ( 188112 ) }
      }
      DATASET "type" {
         DATATYPE  H5T_STD_I32LE
         DATASPACE  SIMPLE { ( 188112 ) / ( 188112 ) }
      }
      DATASET "v" {
         DATATYPE  H5T_IEEE_F64LE
         DATASPACE  SIMPLE { ( 188112, 3 ) / ( 188112, 3 ) }
      }
      DATASET "x" {
         DATATYPE  H5T_IEEE_F64LE
         DATASPACE  SIMPLE { ( 188112, 3 ) / ( 188112, 3 ) }
      }
   }
}
}

Work still needed:

  • README and detailed instructions on webpage
    • how to install hdf5 (apt, from source, spack, brew etc) for both serial and parallel
    • how to compile with hdf5 (setting flags)
    • other considerations e.g., ensuring same Fortran compiler version used
    • explanation of structure of hdf5 file
  • Same IO functionality for GPU code
  • Potentially unify IO subroutines between src_CAF and src_GPU
  • Examples scripts for preparing input file (Python, Matlab)

@edoyango
Copy link
Owner Author

edoyango commented Mar 5, 2023

Same IO functionality for GPU code DONE 66a7fd2

@edoyango
Copy link
Owner Author

edoyango commented Mar 5, 2023

Examples scripts for preparing input file (Python, Matlab) DONE 92eed18

@edoyango
Copy link
Owner Author

README and detailed instructions on webpage (first version) DONE https://ed-yang.com/docs/docs/input.

Of the tasks I set, I just need to merge the IO subroutines. I think I'll put that into a bigger project of merging similar subroutines.

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

No branches or pull requests

1 participant