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

DIVAnd test failed during Pkg.test("DVAnd")[🐞] #142

Open
paolo-oliveri opened this issue Feb 8, 2024 · 4 comments
Open

DIVAnd test failed during Pkg.test("DVAnd")[🐞] #142

paolo-oliveri opened this issue Feb 8, 2024 · 4 comments

Comments

@paolo-oliveri
Copy link

paolo-oliveri commented Feb 8, 2024

Describe the bug
After the installation of DIVAnd v2.7..11 on julia 1.10.0 the following test:

test_fit.jl

fails.

Environment

  • Julia version: 1.10.0
  • Operating system: CentOS Linux 7

Installed modules

[efc8151c] DIVAnd v2.7.11
  [7073ff75] IJulia v1.24.2
  [860ef19b] StableRNGs v1.0.1

To Reproduce
Execute julia test_fit.jl and see its output

Full screen output

┌ Debug: alpha                                                                                                                                                                                                            
│   alpha =                                                                                                                                                                                                               
│    3-element Vector{Float64}:                                                                                                                                                                                           
│     1.0                                                                                                                                                                                                                 
│     2.0                                                                                                                                                                                                                 
│     1.0                                                                                                                                                                                                                 
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/DIVAnd_background.jl:68                                                                                                                                                   
┌ Debug: scaling                                                                                                                                                                                                          
│   len_scale = 0.9999999980209395                                                                                                                                                                                        
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/DIVAnd_background.jl:69                                                                                                                                                   
┌ Debug: effective number of dimensions (neff): 2                                                                                                                                                                         
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/DIVAnd_background.jl:86                                                                                                                                                   
┌ Debug: normalization coeff: 0.03141592666024602                                                                                                                                                                         
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/DIVAnd_background.jl:136                                                                                                                                                  
┌ Debug: Number of data points: 200                                                                                                                                                                                       
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:472                                                                                                                                                                
┌ Debug: data mean: 246.01068529999984                                                                                                                                                                                    
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:473                                                                                                                                                                
┌ Debug: data variance: 41.36316321254708                                                                                                                                                                                 
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:474                                                                                                                                                                
┌ Debug: Now calculating distance distribution                                                                                                                                                                            
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:476                                                                                                                                                                
┌ Debug: Number of data couples considered: 19900.0                                                                                                                                                                       
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:503                                                                                                                                                                
┌ Debug: maximum distance between points: 16.97159028266061                                                                                                                                                               
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:506                                                                                                                                                                
┌ Debug: Mean distance between points: 5.583151970243796                                                                                                                                                                  
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:508                                                                                                                                                                
┌ Debug: Number of probable active bins: 80.0                                                                                                                                                                             
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:516                                                                                                                                                                
┌ Debug: distance for binning: 0.06978939962804745                                                                                                                                                                        
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:527                                                                                                                                                                
┌ Debug: maximum number of bins: 244                                                                                                                                                                                      
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:528                                                                                                                                                                
┌ Debug: Average number of pairs in each bin: 81.9672131147541                                                                                                                                                            
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:531                                                                                                                                                                
┌ Debug: First zero crossing: 44 0.06978939962804745 3.070733583634088                                                                                                                                                    
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:610                                                                                                                                                                
┌ Debug: Now trying to fit Bessel covariance function                                                                                                                                                                     
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:627                                                                                                                                                                
┌ Debug: Best fit: 1.4371033171407532 24.115944919300375                                                                                                                                                                  
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:670                                                                                                                                                                
┌ Debug: S/N: 1.3982512721256248                                                                                                                                                                                          
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:678                                                                                                                                                                
┌ Debug: Relative misfit of fit: 0.24093217594665423                                                                                                                                                                      
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:679                                                                                                                                                                
┌ Debug: will generate random couples                                                                                                                                                                                     
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:401                                                                                                                                                                
┌ Debug: Number of data points: 200                                                                                                                                                                                       
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:472                                                                                                                                                                
┌ Debug: data mean: 246.01068529999984                                                                                                                                                                                    
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:473                                                                                                                                                                
┌ Debug: data variance: 41.36316321254708                                                                                                                                                                                 
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:474                                                                                                                                                                
┌ Debug: Now calculating distance distribution                                                                                                                                                                            
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:476
┌ Debug: Number of data couples considered: 11175.0                                                                                                                                                                       
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:503                                                                                                                                                                
┌ Debug: maximum distance between points: 16.97159028266061                                                                                                                                                               
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:506                                                                                                                                                                
┌ Debug: Mean distance between points: 5.576156219180542                                                                                                                                                                  
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:508                                                                                                                                                                
┌ Debug: Number of probable active bins: 80.0                                                                                                                                                                             
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:516                                                                                                                                                                
┌ Debug: distance for binning: 0.06970195273975678                                                                                                                                                                        
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:527                                                                                                                                                                
┌ Debug: maximum number of bins: 244                                                                                                                                                                                      
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:528                                                                                                                                                                
┌ Debug: Average number of pairs in each bin: 46.10655737704918                                                                                                                                                           
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:533                                                                                                                                                                
┌ Debug: First zero crossing: 43 0.06970195273975678 2.9971839678095415                                                                                                                                                   
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:610                                                                                                                                                                
┌ Debug: Now trying to fit Bessel covariance function                                                                                                                                                                     
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:627                                                                                                                                                                
┌ Debug: Best fit: 1.6184793426171522 23.425097759577064                                                                                                                                                                  
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:670                                                                                                                                                                
┌ Debug: S/N: 1.3058876287893113                                                                                                                                                                                          
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:678                                                                                                                                                                
┌ Debug: Relative misfit of fit: 0.3114106875746346                                                                                                                                                                       
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/fit.jl:679                                                                                                                                                                
┌ Debug: alpha                                                                                                                                                                                                            
│   alpha =                                                                                                                                                                                                               
│    4-element Vector{Float64}:                                                                                                                                                                                           
│     1.0                                                                                                                                                                                                                 
│     3.0                                                                                                                                                                                                                 
│     3.0                                                                                                                                                                                                                 
│     1.0                                                                                                                                                                                                                 
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/DIVAnd_background.jl:68
┌ Debug: scaling                                                                                                                                                                                                          
│   len_scale = 1.3709373160963878                                                                                                                                                                                        
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/DIVAnd_background.jl:69                                                                                                                                                   
┌ Debug: effective number of dimensions (neff): 3                                                                                                                                                                         
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/DIVAnd_background.jl:86                                                                                                                                                   
┌ Debug: normalization coeff: 0.31213110117546744                                                                                                                                                                         
└ @ DIVAnd [JULIADIR]/packages/DIVAnd/EG6qD/src/DIVAnd_background.jl:136                                                                                                                                                  
ERROR: LoadError: There was an error during testing                                                                                                                                                                       
in expression starting at [JULIADIR]/packages/DIVAnd/EG6qD/test/test_fit.jl:154                                                                                                                                           
Test Failed at [JULIADIR]/packages/DIVAnd/EG6qD/test/test_fit.jl:154                                                                                                                                                      
  Expression: ≈(median(fitlenxy), lenx, rtol = 0.3)                                                                                                                                                                       
   Evaluated: 0.11841887698717246 ≈ 0.2 (rtol=0.3) 

** Full stack trace with error message**

Test Failed at [JULIADIR]/packages/DIVAnd/EG6qD/test/test_fit.jl:154
  Expression: ≈(median(fitlenxy), lenx, rtol = 0.3)
   Evaluated: 0.11841887698717246 ≈ 0.2 (rtol=0.3)

ERROR: LoadError: There was an error during testing
in expression starting at [JULIADIR]/packages/DIVAnd/EG6qD/test/test_fit.jl:154
@jmbeckers
Copy link
Member

I confirm the same output under Windows11, Julia 1.10.0 and DIVAnd 2.7.11

DIVAnd: Test Failed at C:\Users\jmbeckers\.julia\packages\DIVAnd\EG6qD\test\test_fit.jl:154
  Expression: ≈(median(fitlenxy), lenx, rtol = 0.3)
   Evaluated: 0.11841887698717246 ≈ 0.2 (rtol=0.3)

@ignasivalles
Copy link

Same for mac, is that relevant?

@jmbeckers
Copy link
Member

Same for mac, is that relevant?

I do not think it is critical. I suspect a random seed problem.

If at all, it could have an impact on the automatic parameter estimation if you use it and which needs to be critically assessed anyway.

@ctroupin
Copy link
Member

Shall we edit the test

(median(fitlenxy), lenx, rtol = 0.3)

to have that test passing?

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

4 participants