Code Monkey home page Code Monkey logo

Comments (12)

manodeep avatar manodeep commented on May 22, 2024

Thanks for sending me the files. I can't seem to reproduce the bug either with the develop or the master branch. Which version of Corrfunc are you using?

from corrfunc.

manodeep avatar manodeep commented on May 22, 2024

Here is the command I used: ./DDrppi_mocks corrfunc_example.txt a corrfunc_example.txt a rp_bins.txt 80.0 1 1 > xx
corrfunc_example.txt
rp_bins.txt

Here's the output (I edited out the progressbar output, wasn't formatting):

Running `./DDrppi_mocks' with the parameters

             -------------------------------------
             file1      = corrfunc_example.txt 
             format1    = a 
             file2      = corrfunc_example.txt 
             format2    = a 
             binfile    = rp_bins.txt 
             pimax      = 80.0 
             cosmology flag = 1 
             Nthreads   = 1 


    io> WARNING: Could not parse all requested 3 fields in line 0. Skipping that line
    In gridlink_mocks_index_particles_double> Running with [nmesh_x, nmesh_y, nmesh_z]  = 5,6,7.  Time taken =   0.00 sec
    countpairs> gridlink seems inefficient - boosting bin refine factor - should lead to better performance
    In gridlink_mocks_index_particles_double> Running with [nmesh_x, nmesh_y, nmesh_z]  = 11,13,7.  Time taken =   0.00 sec
    (progressbar). Time taken =  0.178 secs
    DDrppi> Done -  ND1=6975 ND2=6975. Time taken =   0.22 seconds, read-in time =   0.01 seconds

from corrfunc.

j-dr avatar j-dr commented on May 22, 2024

It appears that when I run it from the command line it works for me as well. It only fails when it is called via the python interface. I am using commit e019e56.

from corrfunc.

manodeep avatar manodeep commented on May 22, 2024

That is a new failure mode !! Let me check out the python interface.

DDrppi_mocks simply calls the countpairs_rp_pi_mocks API, as does the python interface after some type-checking. My hunch is that there is a data-type mismatch somehow, although numpy should throw a RuntimeError during the type-checking/conversion.

Either way, I need to add checks in the gridlink_* routines to ensure that the number of grids, after taking the floor, is at least 1.

from corrfunc.

manodeep avatar manodeep commented on May 22, 2024

Still can't reproduce the bug from current master or develop or from commit e019e56

I tried with np.float and np.float32 for all cases. No crashes. Since I can't seem to figure out why you are getting the error, do you mind upgrading to the newer version. Hopefully, that bug will go away.

Here's the code I used: gist

from corrfunc.

j-dr avatar j-dr commented on May 22, 2024

I just realized that due to a bug in my own code, I didn't give you a catalog that actually caused this error. Please see corrfunc_example_2.txt for the right file. This now fails both at the command line and using python. Sorry to lead you astray yesterday.

The main difference in this catalog is that the lower redshift limit is actually ~0.01, which I believe you said should still work. I upgraded to the current version of the code on the master branch and I'm still getting the error.

from corrfunc.

manodeep avatar manodeep commented on May 22, 2024

Yup. I can reproduce the bug now - exists in current master but not in current develop.

I am glad that the command-line and the python extension are behaving consistently, because that was one of the design goals.

from corrfunc.

manodeep avatar manodeep commented on May 22, 2024

I have added a fix to ensure number of cells is at least 1 and that fixes the issue, at least on my end. Will you check if this commit fixes your issue? git pull && python setup.py install in the source directory should be enough.

from corrfunc.

j-dr avatar j-dr commented on May 22, 2024

That did it, thanks for being so responsive!

from corrfunc.

manodeep avatar manodeep commented on May 22, 2024

Awesome! And not a problem at all.

Do you mind if I keep this issue open as a reminder that the develop branch also needs to have this bug fixed ?

from corrfunc.

j-dr avatar j-dr commented on May 22, 2024

Not at all, go for it.

from corrfunc.

manodeep avatar manodeep commented on May 22, 2024

Possible similar issue has now been fixed in the develop branch for the upcoming v2.0 release.

from corrfunc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.