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

Specific error obtained with Qhull #44

Open
Rekyt opened this issue Oct 14, 2021 · 3 comments
Open

Specific error obtained with Qhull #44

Rekyt opened this issue Oct 14, 2021 · 3 comments

Comments

@Rekyt
Copy link
Member

Rekyt commented Oct 14, 2021

Here is an issue that aims to be a list of specific errors due to Qhull to better manage #38 in the future.

I obtained the following error in Qhull:

Error: Received error code 5 from qhull. Qhull error:
QH6271 qhull precision error (qh_check_dupridge): wide merge (1122660224434 times wider) due to duplicate ridge with nearly coincident points (0.027) between f102531 and f102515, merge dist 0.093, while processing p2261

  • Ignore error with option 'Q12'
  • To be fixed in a later version of Qhull
  • Vertex distance 0.027 is greater than 100 times maximum distance 8.3e-14
    Please report to bradb@shore.net with steps to reproduce and all output
    ERRONEOUS FACET:
  • f102531
    • flags: top new seen mergehorizon dupridge mergeridge2
    • normal: 0.05806 0.1744 -0.5788 0.7752 -0.174
    • offset: 0.1009689
    • vertices: p2261(v1312) p2266(v1046) p2272(v799) p2262(v289) p2265(v160)
    • neighboring facets: f12145 f12159 f102533 f102515 f102532
    • ridges:
    • r74938 tested
      vertices: p2266(v1046) p2272(v799) p2262(v289) p2265(v160)
      between f102531 and f12145
    • r97773
      vertices: p2261(v13

When running the inst/new_benchmark.R script with the following parameter: 50 sites, 5 traits, 200 species, code at c9d85d8 commit.

@Bisaloo
Copy link
Collaborator

Bisaloo commented Oct 26, 2021

Somewhat smaller reprexes:

Trimmed down inst/new_benchmark.R
pkgload::load_all()  # Need last version of fundiversity
source(here::here("inst", "benchmark_fcts", "make_data.R"))

n_sites   = c(5e1)

n_traits  = c(5)

n_species = c(2e2)

set.seed(20210906)
given_data = make_data(n_species, n_traits, n_sites)

fd_fric_intersect(given_data[["traits"]], given_data[["site_sp"]])
Actual reprex
given_data <- dget("https://gist.githubusercontent.com/Bisaloo/f3a8042be8a55a887e1f9a2bbcce9a8d/raw/dea950268d971229cd1b91bda47c45f31d418acb/fundiversity_qhull_error.txt")

library(fundiversity)
fd_fric_intersect(given_data[["traits"]], given_data[["site_sp"]])
#> Error in convhulln(ps, "n FA"): Received error code 5 from qhull. Qhull error:
#> QH6271 qhull precision error (qh_check_dupridge): wide merge (798797635164 times wider) due to duplicate ridge with nearly coincident points (0.0055) between f159315 and f159297, merge dist 0.028, while processing p3702
#> - Ignore error with option 'Q12'
#> - To be fixed in a later version of Qhull
#> - Vertex distance 0.0055 is greater than 100 times maximum distance 3.5e-14
#>   Please report to bradb@shore.net with steps to reproduce and all output
#> ERRONEOUS FACET:
#> - f159315
#>     - flags: top new seen mergehorizon dupridge mergeridge2
#>     - normal:   0.04571 -0.002063  -0.0352 -0.08176    0.995
#>     - offset: -0.8682543
#>     - vertices: p3702(v2235) p6412(v1056) p2282(v632) p3731(v13) p4214(v3)
#>     - neighboring facets: f35106 f159297 f159316 f159325
#>     - ridges:
#>      - r36029 tested
#>            vertices: p6412(v1056) p2282(v632) p3731(v13) p4214(v3)
#>            between f159315 and f35106
#>      - r113711
#>            vertices: p3702(v2235) p2282(v632) p

Created on 2021-10-26 by the reprex package (v2.0.1.9000)

I feel like this can be trimmed down even more but it's a good start.

@Rekyt
Copy link
Member Author

Rekyt commented Jul 6, 2022

Not actually a reprex but:

> fd_benchmark_multicore(fd_fric_intersect)
Running with:
  n_sites n_traits n_species
1     100        4       200
 Error: Received error code 5 from qhull. Qhull error:
QH6271 qhull precision error (qh_check_dupridge): wide merge (10000524017918 times wider) due to duplicate ridge with nearly coincident points (0.002) between f2144 and f2123, merge dist 0.59, while processing p118
- Ignore error with option 'Q12'
- To be fixed in a later version of Qhull
- Vertex distance 0.002 is greater than 100 times maximum distance 5.9e-14
Please report to bradb@shore.net with steps to reproduce and all output
ERRONEOUS FACET:
- f2144
- flags: top new seen mergehorizon dupridge mergeridge2
- normal: 0.1284 -0.5988 0.3437 0.7119
- offset: 0.1695765
- vertices: p118(v130) p128(v108) p347(v52) p125(v0)
- neighboring facets: f1022 f2123 f2145
- ridges:
- r778
vertices: p128(v108) p347(v52) p125(v0)
between f2144 and f1022
- r1071
vertices: p118(v130) p128(v108) p347(v52)
between f1022 and f2144
- r1069
vertices

@Rekyt
Copy link
Member Author

Rekyt commented Jul 6, 2022

Another case with fd_fric_intersect()

fd_fric_intersect 
Running with:
  n_sites n_traits n_species
1      50        4       500
Error: Received error code 5 from qhull. Qhull error:
QH6271 qhull precision error (qh_check_dupridge): wide merge (6453987413504 times wider) due to duplicate ridge with nearly coincident points (0.0038) between f3040 and f3036, merge dist 0.35, while processing p539
- Ignore error with option 'Q12'
- To be fixed in a later version of Qhull
- Vertex distance 0.0038 is greater than 100 times maximum distance 5.5e-14
  Please report to bradb@shore.net with steps to reproduce and all output
ERRONEOUS FACET:
- f3040
    - flags: top new seen mergehorizon dupridge mergeridge2
    - normal:   -0.7599   0.2833   0.4993   0.3051
    - offset: -0.4838983
    - vertices: p539(v191) p540(v146) p543(v137) p132(v74)
    - neighboring facets: f2198 f3041 f3036
    - ridges:
     - r1112
           vertices: p540(v146) p543(v137) p132(v74)
           between f3040 and f2198
     - r1614
           vertices: p539(v191) p543(v137) p132(v74)
           between f2198 and f3040
     - r1616
           ve

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

No branches or pull requests

2 participants