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

hdf5 for FastLightCones #131

Open
rbmetcalf opened this issue Jul 3, 2017 · 12 comments
Open

hdf5 for FastLightCones #131

rbmetcalf opened this issue Jul 3, 2017 · 12 comments
Assignees

Comments

@rbmetcalf
Copy link
Member

@mpellejero lets continue our discussion of this here.

@mpellejero
Copy link

mpellejero commented Jul 6, 2017 via email

@rbmetcalf
Copy link
Member Author

rbmetcalf commented Jul 6, 2017

It would be better to derive a new class and redefine scan_block() instead of making a new function scan_blockH5() because FastLightCone is template to accept a structure ASCII_ ... and uses what function it has called scan_block(). I did this so that the other parts of FastLightCone don't need to be changes for different situations. FastLightCone can be used for halos or particles or for different input formats by just changing the template argument. This makes it much easier to use from the outside and reduces duplicate code.

@rbmetcalf
Copy link
Member Author

@ntessore can you help us with linking the HDF5 library through cmake?

@ntessore
Copy link
Contributor

ntessore commented Jul 7, 2017

Is this going to be an optional dependency going on the master branch? If so I will add a PR for it

@ntessore
Copy link
Contributor

ntessore commented Jul 7, 2017

I have pushed a branch to the glamer repository where ENABLE_HDF5 exists, which should then build projects with HDF5 support. Will HDF5 be necessary for SLsimLib itself?

@mpellejero
Copy link

mpellejero commented Jul 7, 2017 via email

@ntessore
Copy link
Contributor

ntessore commented Jul 7, 2017

Ok, to test this, try and do the following three steps:

  1. update and checkout the test branch for the glamer folder:

    $ cd glamer
    $ git pull && git checkout nt/hdf5
    
  2. update and checkout the test branch for the SLsimLib folder:

     $ cd SLsimLib
     $ git pull && git checkout nt/hdf5
    
  3. add the (unfortunately necessary) definitions to your project's CMakeLists.txt:

     # somewhere in file CMakeLists.txt
     ...
     
     find_package(GLAMER NO_MODULE REQUIRED)
     
     include_directories(${GLAMER_INCLUDE_DIRS})
     add_definitions(${GLAMER_DEFINITIONS})                # <-- this line is new
     
     ...
    

Then you should be able to use cmake .. -DENABLE_HDF5=1 when building GLAMER to find the HDF5 library. Subsequently building your project should no longer need any intervention.

@mpellejero
Copy link

mpellejero commented Jul 7, 2017 via email

@mpellejero
Copy link

mpellejero commented Jul 7, 2017 via email

@ntessore
Copy link
Contributor

ntessore commented Jul 7, 2017

You are probably not using a version-controlled source then. Perhaps @rbmetcalf could test it instead.

@rbmetcalf
Copy link
Member Author

Hi Marcos. You can make a pull request with your changes and we can
review it for you. I have been away, but maybe this coming week
we can sit down in a video con and work through how to use some of these development tools.

@mpellejero
Copy link

mpellejero commented Jul 10, 2017 via email

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

No branches or pull requests

3 participants